SAP OIJ_FILL_IREF_FOR_DOCNR Function Module for Fill internal OIJ_EL_DOC_I_REF for DOCNR
OIJ_FILL_IREF_FOR_DOCNR is a standard oij fill iref for docnr SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Fill internal OIJ_EL_DOC_I_REF for DOCNR 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 fill iref for docnr FM, simply by entering the name OIJ_FILL_IREF_FOR_DOCNR into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIJ_EL_B
Program Name: SAPLOIJ_EL_B
Main Program: SAPLOIJ_EL_B
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIJ_FILL_IREF_FOR_DOCNR 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_FILL_IREF_FOR_DOCNR'"Fill internal OIJ_EL_DOC_I_REF for DOCNR.
EXPORTING
I_VBELN = "Sales and Distribution Document Number
I_VBTYP = "SD document category
* I_POSNR = "Item number of the SD document
* I_NOMTK = "Nomination (technical) Key
* I_NOMIT = "Nomination Key Item
* IV_BYPASSING_BUFFER = "boolean variable (X=true, -=false, space=unknown)
* IV_REFRESH_BUFFER = "boolean variable (X=true, -=false, space=unknown)
TABLES
ET_OIJ_EL_DOC_I_REF = "Document item reference to nomination
EXCEPTIONS
NO_ENTRY_FOUND = 1 WRONG_INPUT = 2
IMPORTING Parameters details for OIJ_FILL_IREF_FOR_DOCNR
I_VBELN - Sales and Distribution Document Number
Data type: VBELNOptional: No
Call by Reference: Yes
I_VBTYP - SD document category
Data type: VBTYPOptional: No
Call by Reference: Yes
I_POSNR - Item number of the SD document
Data type: POSNROptional: Yes
Call by Reference: Yes
I_NOMTK - Nomination (technical) Key
Data type: OIJ_NOMTKOptional: Yes
Call by Reference: Yes
I_NOMIT - Nomination Key Item
Data type: OIJ_ITEMOptional: Yes
Call by Reference: Yes
IV_BYPASSING_BUFFER - boolean variable (X=true, -=false, space=unknown)
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_REFRESH_BUFFER - boolean variable (X=true, -=false, space=unknown)
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for OIJ_FILL_IREF_FOR_DOCNR
ET_OIJ_EL_DOC_I_REF - Document item reference to nomination
Data type: OIJ_EL_DOC_I_REFOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_ENTRY_FOUND - No entry found
Data type:Optional: No
Call by Reference: Yes
WRONG_INPUT - Wrong input
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for OIJ_FILL_IREF_FOR_DOCNR 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_vbeln | TYPE VBELN, " | |||
| lv_no_entry_found | TYPE VBELN, " | |||
| lt_et_oij_el_doc_i_ref | TYPE STANDARD TABLE OF OIJ_EL_DOC_I_REF, " | |||
| lv_i_vbtyp | TYPE VBTYP, " | |||
| lv_wrong_input | TYPE VBTYP, " | |||
| lv_i_posnr | TYPE POSNR, " | |||
| lv_i_nomtk | TYPE OIJ_NOMTK, " | |||
| lv_i_nomit | TYPE OIJ_ITEM, " | |||
| lv_iv_bypassing_buffer | TYPE BOOLEAN, " | |||
| lv_iv_refresh_buffer | TYPE BOOLEAN. " |
|   CALL FUNCTION 'OIJ_FILL_IREF_FOR_DOCNR' "Fill internal OIJ_EL_DOC_I_REF for DOCNR |
| EXPORTING | ||
| I_VBELN | = lv_i_vbeln | |
| I_VBTYP | = lv_i_vbtyp | |
| I_POSNR | = lv_i_posnr | |
| I_NOMTK | = lv_i_nomtk | |
| I_NOMIT | = lv_i_nomit | |
| IV_BYPASSING_BUFFER | = lv_iv_bypassing_buffer | |
| IV_REFRESH_BUFFER | = lv_iv_refresh_buffer | |
| TABLES | ||
| ET_OIJ_EL_DOC_I_REF | = lt_et_oij_el_doc_i_ref | |
| EXCEPTIONS | ||
| NO_ENTRY_FOUND = 1 | ||
| WRONG_INPUT = 2 | ||
| . " OIJ_FILL_IREF_FOR_DOCNR | ||
ABAP code using 7.40 inline data declarations to call FM OIJ_FILL_IREF_FOR_DOCNR
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.Search for further information about these or an SAP related objects