SAP OIJ_RU_PO_CREATE Function Module for Create Purchase Order (Hold)
OIJ_RU_PO_CREATE is a standard oij ru po create 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 Purchase Order (Hold) 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 oij ru po create FM, simply by entering the name OIJ_RU_PO_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIJ_RU_TREXP
Program Name: SAPLOIJ_RU_TREXP
Main Program: SAPLOIJ_RU_TREXP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIJ_RU_PO_CREATE 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 'OIJ_RU_PO_CREATE'"Create Purchase Order (Hold).
EXPORTING
I_WERKS = "Plant
I_LIFNR = "Different Invoicing Party
I_EKORG = "Purchasing organization
I_EKGRP = "Purchasing group
* I_BSART = 'NB' "Order Type (Purchasing)
* I_TEST = 'X' "Single-Character Flag
IT_ITEMS = "Transportation Expenses - Uploading Item Table
IMPORTING
E_EBELN = "Purchasing Document Number
E_RETURN = "Return parameter table
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for OIJ_RU_PO_CREATE
I_WERKS - Plant
Data type: T001W-WERKSOptional: No
Call by Reference: Yes
I_LIFNR - Different Invoicing Party
Data type: RBKP-LIFNROptional: No
Call by Reference: Yes
I_EKORG - Purchasing organization
Data type: EKORGOptional: No
Call by Reference: Yes
I_EKGRP - Purchasing group
Data type: EKGRPOptional: No
Call by Reference: Yes
I_BSART - Order Type (Purchasing)
Data type: BSARTDefault: 'NB'
Optional: Yes
Call by Reference: Yes
I_TEST - Single-Character Flag
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: Yes
IT_ITEMS - Transportation Expenses - Uploading Item Table
Data type: OIJ_RU_TREXP_UPLOAD_ITEM_TOptional: No
Call by Reference: Yes
EXPORTING Parameters details for OIJ_RU_PO_CREATE
E_EBELN - Purchasing Document Number
Data type: EBELNOptional: No
Call by Reference: Yes
E_RETURN - Return parameter table
Data type: BAPIRET2_TOptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for OIJ_RU_PO_CREATE 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_error | TYPE STRING, " | |||
| lv_e_ebeln | TYPE EBELN, " | |||
| lv_i_werks | TYPE T001W-WERKS, " | |||
| lv_i_lifnr | TYPE RBKP-LIFNR, " | |||
| lv_e_return | TYPE BAPIRET2_T, " | |||
| lv_i_ekorg | TYPE EKORG, " | |||
| lv_i_ekgrp | TYPE EKGRP, " | |||
| lv_i_bsart | TYPE BSART, " 'NB' | |||
| lv_i_test | TYPE CHAR1, " 'X' | |||
| lv_it_items | TYPE OIJ_RU_TREXP_UPLOAD_ITEM_T. " |
|   CALL FUNCTION 'OIJ_RU_PO_CREATE' "Create Purchase Order (Hold) |
| EXPORTING | ||
| I_WERKS | = lv_i_werks | |
| I_LIFNR | = lv_i_lifnr | |
| I_EKORG | = lv_i_ekorg | |
| I_EKGRP | = lv_i_ekgrp | |
| I_BSART | = lv_i_bsart | |
| I_TEST | = lv_i_test | |
| IT_ITEMS | = lv_it_items | |
| IMPORTING | ||
| E_EBELN | = lv_e_ebeln | |
| E_RETURN | = lv_e_return | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| . " OIJ_RU_PO_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM OIJ_RU_PO_CREATE
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 WERKS FROM T001W INTO @DATA(ld_i_werks). | ||||
| "SELECT single LIFNR FROM RBKP INTO @DATA(ld_i_lifnr). | ||||
| DATA(ld_i_bsart) | = 'NB'. | |||
| DATA(ld_i_test) | = 'X'. | |||
Search for further information about these or an SAP related objects