SAP EXIT_SAPLOIJP_002 Function Module for OIL-TSW: Customer exit for dynamic safety stock calculation logic









EXIT_SAPLOIJP_002 is a standard exit saploijp 002 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for OIL-TSW: Customer exit for dynamic safety stock calculation logic processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for exit saploijp 002 FM, simply by entering the name EXIT_SAPLOIJP_002 into the relevant SAP transaction such as SE37 or SE38.

Function Group: XOIJ
Program Name: SAPLXOIJ
Main Program: SAPLXOIJ
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function EXIT_SAPLOIJP_002 pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'EXIT_SAPLOIJP_002'"OIL-TSW: Customer exit for dynamic safety stock calculation logic
EXPORTING
I_COVER = "Coverage period in days
I_TFACD_WA = "Factory calendar definition
I_OIJSCAL_WA = "Calendar usage profile
I_OIJLOCMAT_WA = "Location-material record
* I_SFT_STK_ABOVE_MIN = ' ' "Flag indic. for adding sftstk above min. inv.

IMPORTING
E_SAFETY = "safety stock level

EXCEPTIONS
PARAMETER_ERROR = 1 SAFETY_STOCK_FAILED = 2
.



Related Function Modules

Below is a list of related SAP function modules this CUSTOMER FUNCTION exit / user exit is relevant for.
OIJP_BUFFER_MKAL_FOR_LOCATION IS-OIL TSW : Read DB-Table MKAL for a LocationĀ“s PWERK and PMATNR
OIJP_BUFFER_OIJLOCMAT IS-OIL TSW : Read DB-Table OIJTSMAT
OIJP_BUFFER_OIJLOCMAT_PLAN_USD IS-OIL TSW : Read DB-Table OIJLOCMAT for all LOC. as Demand in Plan. Sequ.
OIJP_BUFFER_OIJPLSEQ IS-OIL TSW : Read DB-Table OIJPLSEQ
OIJP_BUFFER_OIJTSMAT IS-OIL TSW : Read DB-Table OIJTSMAT
OIJP_BUFFER_OIJTSMAT_PLAN_USD IS-OIL TSW : Read DB-Table OIJTSMAT for all TS. as Demand in Plan. Sequ.
OIJP_BUILD_SUPPL_CHAIN IS-OIL TSW Sort Table to build up TSW Supply Chain for Planning Functions
OIJP_CALCULATE_INF IS-OIL TSW: Calculates Inflation Ratio Using SD Ratio(Safety Stock)
OIJP_CALC_ADDITIONAL_CALENTR IS-OIL TSW : Calculate new entries in OIJPLCAL with CYCLE-steps
OIJP_CHECK_HOLIDAY IS-OIL TSW : Determines if a given date is a holiday or not
OIJP_CHECK_PRODUCT_VERSIONS IS-OIL TSW : Compare BOMMAT in Planning Seq. with Master Data Settings
OIJP_CYCLE_DETECTION OIL TSW: Cycle detection for planning locations
OIJP_DELETE_PLAN_PROPOSALS IS-OIL TSW: Deletes planning proposals and associated WL entries
OIJP_DETERMINE_PLANNING_FUNC IS-OIL TSW : Determine used Planning Function based on PLTYP/CALFLG
OIJP_DETERMINE_SFTSTK_ROUTINE IS-OIL TSW : Determine used safety stock calc. routine based on SFTTYPE
OIJP_DETERMINE_TGTSTK_ROUTINE IS-OIL TSW: Determine target stock calculation routine
OIJP_FILL_PLANNING_TABLE IS-OIL TSW : Fills the internal planning table
OIJP_FILL_STANDARD_DAY_RATIO IS OIL-TSW: Fills the standard day ratio according to the day no. passed
OIJP_FIND_CIRCLE_SIMPLE IS-OIL TSW : Checks,if a Loc. has TS as Source and TS has this Loc. as Src
OIJP_GET_CALENDAR_PROFILE IS-OIL TSW : Reads calendar usage profile record from database
OIJP_GET_PLANNING_CALENDAR IS-OIL TSW : Read the Planning Calendar for a Planning Object
OIJP_GET_SFTSTK_DATA IS-OIL TSW : Update Safety Stock in OIJLOCMAT table
OIJP_GET_TGTSTK_DATA IS-OIL TSW: Get target stock data
OIJP_INIT_SUPPL_CHAIN_TABLE IS-OIL TSW : Build initial Supply Chain Table from OIJLOCMAT/OIJTSMAT
OIJP_INTERIM_CHECK IS-OIL TSW - Interim Check Routine
OIJP_PLANNING_CP IS-OIL TSW - Planning proposal routine CP (Customer inventory planning)
OIJP_PLANNING_MC IS-OIL TSW - Planning proposal routine MC (Max. inventory with calendar)
OIJP_PLANNING_MR IS-OIL TSW - Planning proposal routine MR (Max. inventory Reorder )
OIJP_PLANNING_RC IS-OIL TSW - Planning proposal routine RC (Rep. inventory with calendar)
OIJP_PLANNING_RR IS-OIL TSW - Planning proposal routine RR (Rep. inventory Reorder )
OIJP_PLANNING_TC IS-OIL TSW - Planning proposal routine TC (Tgt. inventory with calendar)
OIJP_PLANNING_TR IS-OIL TSW - Planning proposal routine TR (Tgt. inventory Reorder )
OIJP_PVMAT_DRILL_DOWN IS-OIL TSW : Read MKAL for Mat. Prod. Version --> Get matching BOM
OIJP_READ_OIJRDPLAN IS-OIL TSW - Read planning proposal table
OIJP_READ_OIJRDPLAN_DATE_RANGE IS-OIL TSW - Read planning table with date range
OIJP_READ_RUNDOWNS Read all SP tables into buffer
OIJP_REFRESH_BASES IS-OIL TSW - Refresh IBASE & Obase in internal planning table
OIJP_REFRESH_IBASE IS-OIL TSW - Refresh IBASE in internal planning table
OIJP_REFRESH_OBASE IS-OIL TSW - Refresh OBASE in internal planning table
OIJP_REFRESH_SOURCE_IBASE IS-OIL TSW - Update IBASE for source object
OIJP_SAFETY_STOCK_CUSTOMER IS-OIL TSW : Customer user-exit for dynamic safety stock routine
OIJP_SAFETY_STOCK_ROUTINE IS-OIL TSW : SAP supplied dynamic safety stock calculation routine
OIJP_TARGET_STOCK_CUSTOMER IS-OIL TSW : Customer exit for dynamic target stock routine
OIJP_TARGET_STOCK_SAP IS-OIL TSW: SAP TSW target stock calculation
OIJP_TGT_CALCULATE_INF OIL TSW: calculates inflation ratio using SD ratio(target stock)
OIJP_TGT_FILL_STANDARD_DAY_RAT OIL-TSW: Fills the standard day ratio according to the day no. passed
OIJP_UPDATE_OIJPLCAL IS-OIL TSW : Planning calendar definitions Update
OIJP_UPDATE_OIJPLSEQ IS-OIL TSW : Planning Sequence Table Update
OIJP_UPDATE_OIJRDPLAN IS-OIL TSW - Update proposals drill-down table
OIJP_UPDATE_OIJX_PLANNING_FLAG IS-Oil TSW: update Table OIJX planning flag
OIJP_UPDATE_PV_OIJLOCMAT To update PV fields in OIJLOCMAT from MKAL
OIJP_UPDATE_RUNDOWN IS-OIL TSW - Update rundown tables with planning proposals
OIJP_UPDATE_RUNDOWNS IS-OIL TSW: Update all rundowns & cross reference tables for planning
OIJP_UPDATE_SAFETY_STOCK IS-OIL TSW : Update Safety Stock in OIJLOCMAT table
OIJP_UPDATE_SOURCE IS-OIL TSW - Copy planning proposals to source object
OIJP_UPDATE_TARGET_STOCK IS-OIL TSW: Calculate target stock and update

IMPORTING Parameters details for EXIT_SAPLOIJP_002

I_COVER - Coverage period in days

Data type: OIJLOCMAT-COVER
Optional: No
Call by Reference: No ( called with pass by value option)

I_TFACD_WA - Factory calendar definition

Data type: TFACD
Optional: No
Call by Reference: No ( called with pass by value option)

I_OIJSCAL_WA - Calendar usage profile

Data type: OIJSCAL
Optional: No
Call by Reference: No ( called with pass by value option)

I_OIJLOCMAT_WA - Location-material record

Data type: OIJLOCMAT
Optional: No
Call by Reference: No ( called with pass by value option)

I_SFT_STK_ABOVE_MIN - Flag indic. for adding sftstk above min. inv.

Data type: C
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for EXIT_SAPLOIJP_002

E_SAFETY - safety stock level

Data type: OIJLOCMAT-SAFETY
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

PARAMETER_ERROR - Parameter error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SAFETY_STOCK_FAILED - safety stock calculation failed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for EXIT_SAPLOIJP_002 Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_i_cover  TYPE OIJLOCMAT-COVER, "   
lv_e_safety  TYPE OIJLOCMAT-SAFETY, "   
lv_parameter_error  TYPE OIJLOCMAT, "   
lv_i_tfacd_wa  TYPE TFACD, "   
lv_safety_stock_failed  TYPE TFACD, "   
lv_i_oijscal_wa  TYPE OIJSCAL, "   
lv_i_oijlocmat_wa  TYPE OIJLOCMAT, "   
lv_i_sft_stk_above_min  TYPE C. "   ' '

  CALL FUNCTION 'EXIT_SAPLOIJP_002'  "OIL-TSW: Customer exit for dynamic safety stock calculation logic
    EXPORTING
         I_COVER = lv_i_cover
         I_TFACD_WA = lv_i_tfacd_wa
         I_OIJSCAL_WA = lv_i_oijscal_wa
         I_OIJLOCMAT_WA = lv_i_oijlocmat_wa
         I_SFT_STK_ABOVE_MIN = lv_i_sft_stk_above_min
    IMPORTING
         E_SAFETY = lv_e_safety
    EXCEPTIONS
        PARAMETER_ERROR = 1
        SAFETY_STOCK_FAILED = 2
. " EXIT_SAPLOIJP_002




ABAP code using 7.40 inline data declarations to call FM EXIT_SAPLOIJP_002

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single COVER FROM OIJLOCMAT INTO @DATA(ld_i_cover).
 
"SELECT single SAFETY FROM OIJLOCMAT INTO @DATA(ld_e_safety).
 
 
 
 
 
 
DATA(ld_i_sft_stk_above_min) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!