SAP OIK_BSP_CREATE_REPLENMENT_ORDE Function Module for Create replenishment orders (Standard order OR & Outbound Delivery)
OIK_BSP_CREATE_REPLENMENT_ORDE is a standard oik bsp create replenment orde SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create replenishment orders (Standard order OR & Outbound Delivery) 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 oik bsp create replenment orde FM, simply by entering the name OIK_BSP_CREATE_REPLENMENT_ORDE into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIK_BSP
Program Name: SAPLOIK_BSP
Main Program: SAPLOIK_BSP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function OIK_BSP_CREATE_REPLENMENT_ORDE 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 'OIK_BSP_CREATE_REPLENMENT_ORDE'"Create replenishment orders (Standard order OR & Outbound Delivery).
EXPORTING
I_SYUNAME = "Customer number
I_COMMIT_WORK = "commit work yes if 'X'
IMPORTING
E_KDAUF = "Sales Order Number
E_MSGTY = "Messages, message type
E_MSGNO = "Messages, message number
E_VBELN = "Sales Document: Header Data
E_SUBRC = "Return value, return value after ABAP statements
E_LIEFN = "Delivery
E_R_TYPE = "Message type: S Success, E Error, W Warning, I Info, A Abort
E_R_ID = "Messages, message class
E_R_NUMBER = "Messages, message number
E_R_MESSAGE = "Message text
E_MSGID = "Messages, message class
TABLES
T_INPUT_TAB = "Table for replenishment order input via WebInterface
IMPORTING Parameters details for OIK_BSP_CREATE_REPLENMENT_ORDE
I_SYUNAME - Customer number
Data type: KNA1-KUNNROptional: No
Call by Reference: No ( called with pass by value option)
I_COMMIT_WORK - commit work yes if 'X'
Data type: STRINGOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for OIK_BSP_CREATE_REPLENMENT_ORDE
E_KDAUF - Sales Order Number
Data type: ROIKEXPORT-KDAUFOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGTY - Messages, message type
Data type: ROIKEXPORT-MSGTYOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGNO - Messages, message number
Data type: ROIKEXPORT-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
E_VBELN - Sales Document: Header Data
Data type: VBAK-VBELNOptional: No
Call by Reference: No ( called with pass by value option)
E_SUBRC - Return value, return value after ABAP statements
Data type: ROIKEXPORT-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
E_LIEFN - Delivery
Data type: ROIKEXPORT-LIEFNOptional: No
Call by Reference: No ( called with pass by value option)
E_R_TYPE - Message type: S Success, E Error, W Warning, I Info, A Abort
Data type: BAPIRETURN1-TYPEOptional: No
Call by Reference: No ( called with pass by value option)
E_R_ID - Messages, message class
Data type: BAPIRETURN1-IDOptional: No
Call by Reference: No ( called with pass by value option)
E_R_NUMBER - Messages, message number
Data type: BAPIRETURN1-NUMBEROptional: No
Call by Reference: No ( called with pass by value option)
E_R_MESSAGE - Message text
Data type: BAPIRETURN1-MESSAGEOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGID - Messages, message class
Data type: ROIKEXPORT-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for OIK_BSP_CREATE_REPLENMENT_ORDE
T_INPUT_TAB - Table for replenishment order input via WebInterface
Data type: OIK_MQUDOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for OIK_BSP_CREATE_REPLENMENT_ORDE 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_e_kdauf | TYPE ROIKEXPORT-KDAUF, " | |||
| lv_i_syuname | TYPE KNA1-KUNNR, " | |||
| lt_t_input_tab | TYPE STANDARD TABLE OF OIK_MQUD, " | |||
| lv_e_msgty | TYPE ROIKEXPORT-MSGTY, " | |||
| lv_e_msgno | TYPE ROIKEXPORT-MSGNO, " | |||
| lv_e_vbeln | TYPE VBAK-VBELN, " | |||
| lv_i_commit_work | TYPE STRING, " | |||
| lv_e_subrc | TYPE ROIKEXPORT-SUBRC, " | |||
| lv_e_liefn | TYPE ROIKEXPORT-LIEFN, " | |||
| lv_e_r_type | TYPE BAPIRETURN1-TYPE, " | |||
| lv_e_r_id | TYPE BAPIRETURN1-ID, " | |||
| lv_e_r_number | TYPE BAPIRETURN1-NUMBER, " | |||
| lv_e_r_message | TYPE BAPIRETURN1-MESSAGE, " | |||
| lv_e_msgid | TYPE ROIKEXPORT-MSGID. " |
|   CALL FUNCTION 'OIK_BSP_CREATE_REPLENMENT_ORDE' "Create replenishment orders (Standard order OR & Outbound Delivery) |
| EXPORTING | ||
| I_SYUNAME | = lv_i_syuname | |
| I_COMMIT_WORK | = lv_i_commit_work | |
| IMPORTING | ||
| E_KDAUF | = lv_e_kdauf | |
| E_MSGTY | = lv_e_msgty | |
| E_MSGNO | = lv_e_msgno | |
| E_VBELN | = lv_e_vbeln | |
| E_SUBRC | = lv_e_subrc | |
| E_LIEFN | = lv_e_liefn | |
| E_R_TYPE | = lv_e_r_type | |
| E_R_ID | = lv_e_r_id | |
| E_R_NUMBER | = lv_e_r_number | |
| E_R_MESSAGE | = lv_e_r_message | |
| E_MSGID | = lv_e_msgid | |
| TABLES | ||
| T_INPUT_TAB | = lt_t_input_tab | |
| . " OIK_BSP_CREATE_REPLENMENT_ORDE | ||
ABAP code using 7.40 inline data declarations to call FM OIK_BSP_CREATE_REPLENMENT_ORDE
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 KDAUF FROM ROIKEXPORT INTO @DATA(ld_e_kdauf). | ||||
| "SELECT single KUNNR FROM KNA1 INTO @DATA(ld_i_syuname). | ||||
| "SELECT single MSGTY FROM ROIKEXPORT INTO @DATA(ld_e_msgty). | ||||
| "SELECT single MSGNO FROM ROIKEXPORT INTO @DATA(ld_e_msgno). | ||||
| "SELECT single VBELN FROM VBAK INTO @DATA(ld_e_vbeln). | ||||
| "SELECT single SUBRC FROM ROIKEXPORT INTO @DATA(ld_e_subrc). | ||||
| "SELECT single LIEFN FROM ROIKEXPORT INTO @DATA(ld_e_liefn). | ||||
| "SELECT single TYPE FROM BAPIRETURN1 INTO @DATA(ld_e_r_type). | ||||
| "SELECT single ID FROM BAPIRETURN1 INTO @DATA(ld_e_r_id). | ||||
| "SELECT single NUMBER FROM BAPIRETURN1 INTO @DATA(ld_e_r_number). | ||||
| "SELECT single MESSAGE FROM BAPIRETURN1 INTO @DATA(ld_e_r_message). | ||||
| "SELECT single MSGID FROM ROIKEXPORT INTO @DATA(ld_e_msgid). | ||||
Search for further information about these or an SAP related objects