SAP OIRE_GENERATE_ABAP Function Module for Generation of ABAP
OIRE_GENERATE_ABAP is a standard oire generate abap SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generation of ABAP 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 oire generate abap FM, simply by entering the name OIRE_GENERATE_ABAP into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIRE_ARCHIVE
Program Name: SAPLOIRE_ARCHIVE
Main Program: SAPLOIRE_ARCHIVE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIRE_GENERATE_ABAP 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 'OIRE_GENERATE_ABAP'"Generation of ABAP.
EXPORTING
* DEL_LABEL = ' ' "Lines to Be Deleted
* I_GENFLAG = 'T' "Generation flag
* I_FIXPT = 'X' "Fixed point arithmetic
I_STATUS = "System Status
* BUKRS = "Company Code
SSR_CCINS = "SSR PC: Payment Card Type
ARCH_OBJ_SUFFIX = "DTF Archiving Object Suffix
FCODE = "Function Code
* MODEL = "Reference
PROGRAM = "Program
* PROG_TYPE = ' ' "Program Type
* I_DEVCLASS = 'OIR_G0' "Package
IMPORTING
E_SUBRC = "
EXCEPTIONS
DELETE_ERROR = 1 GENERATION_ERROR = 2 MODEL_NOT_FOUND = 3 PROGRAM_NOT_FOUND = 4 ENQUEUE_LOCK = 5
IMPORTING Parameters details for OIRE_GENERATE_ABAP
DEL_LABEL - Lines to Be Deleted
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_GENFLAG - Generation flag
Data type: TADIR-GENFLAGDefault: 'T'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FIXPT - Fixed point arithmetic
Data type: TRDIR-FIXPTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_STATUS - System Status
Data type: ITCDA-TDSTATUSOptional: No
Call by Reference: No ( called with pass by value option)
BUKRS - Company Code
Data type: OIRECCTYP-BUKRSOptional: Yes
Call by Reference: No ( called with pass by value option)
SSR_CCINS - SSR PC: Payment Card Type
Data type: OIRECCTYP-SSR_CCINSOptional: No
Call by Reference: No ( called with pass by value option)
ARCH_OBJ_SUFFIX - DTF Archiving Object Suffix
Data type: OIRE_ARCH_OBJ_SUFFIXOptional: No
Call by Reference: No ( called with pass by value option)
FCODE - Function Code
Data type: SY-PFKEYOptional: No
Call by Reference: No ( called with pass by value option)
MODEL - Reference
Data type: RS38M-PROGRAMMOptional: Yes
Call by Reference: No ( called with pass by value option)
PROGRAM - Program
Data type: RS38M-PROGRAMMOptional: No
Call by Reference: No ( called with pass by value option)
PROG_TYPE - Program Type
Data type: TRDIR-SUBCDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DEVCLASS - Package
Data type: TADIR-DEVCLASSDefault: 'OIR_G0'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for OIRE_GENERATE_ABAP
E_SUBRC -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DELETE_ERROR - Error in deletion
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GENERATION_ERROR - Error in generation
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MODEL_NOT_FOUND - Reference is not available
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROGRAM_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ENQUEUE_LOCK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for OIRE_GENERATE_ABAP 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_subrc | TYPE SY-SUBRC, " | |||
| lv_del_label | TYPE SY, " SPACE | |||
| lv_delete_error | TYPE SY, " | |||
| lv_i_genflag | TYPE TADIR-GENFLAG, " 'T' | |||
| lv_i_fixpt | TYPE TRDIR-FIXPT, " 'X' | |||
| lv_i_status | TYPE ITCDA-TDSTATUS, " | |||
| lv_bukrs | TYPE OIRECCTYP-BUKRS, " | |||
| lv_generation_error | TYPE OIRECCTYP, " | |||
| lv_ssr_ccins | TYPE OIRECCTYP-SSR_CCINS, " | |||
| lv_model_not_found | TYPE OIRECCTYP, " | |||
| lv_arch_obj_suffix | TYPE OIRE_ARCH_OBJ_SUFFIX, " | |||
| lv_program_not_found | TYPE OIRE_ARCH_OBJ_SUFFIX, " | |||
| lv_fcode | TYPE SY-PFKEY, " | |||
| lv_enqueue_lock | TYPE SY, " | |||
| lv_model | TYPE RS38M-PROGRAMM, " | |||
| lv_program | TYPE RS38M-PROGRAMM, " | |||
| lv_prog_type | TYPE TRDIR-SUBC, " SPACE | |||
| lv_i_devclass | TYPE TADIR-DEVCLASS. " 'OIR_G0' |
|   CALL FUNCTION 'OIRE_GENERATE_ABAP' "Generation of ABAP |
| EXPORTING | ||
| DEL_LABEL | = lv_del_label | |
| I_GENFLAG | = lv_i_genflag | |
| I_FIXPT | = lv_i_fixpt | |
| I_STATUS | = lv_i_status | |
| BUKRS | = lv_bukrs | |
| SSR_CCINS | = lv_ssr_ccins | |
| ARCH_OBJ_SUFFIX | = lv_arch_obj_suffix | |
| FCODE | = lv_fcode | |
| MODEL | = lv_model | |
| PROGRAM | = lv_program | |
| PROG_TYPE | = lv_prog_type | |
| I_DEVCLASS | = lv_i_devclass | |
| IMPORTING | ||
| E_SUBRC | = lv_e_subrc | |
| EXCEPTIONS | ||
| DELETE_ERROR = 1 | ||
| GENERATION_ERROR = 2 | ||
| MODEL_NOT_FOUND = 3 | ||
| PROGRAM_NOT_FOUND = 4 | ||
| ENQUEUE_LOCK = 5 | ||
| . " OIRE_GENERATE_ABAP | ||
ABAP code using 7.40 inline data declarations to call FM OIRE_GENERATE_ABAP
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 SUBRC FROM SY INTO @DATA(ld_e_subrc). | ||||
| DATA(ld_del_label) | = ' '. | |||
| "SELECT single GENFLAG FROM TADIR INTO @DATA(ld_i_genflag). | ||||
| DATA(ld_i_genflag) | = 'T'. | |||
| "SELECT single FIXPT FROM TRDIR INTO @DATA(ld_i_fixpt). | ||||
| DATA(ld_i_fixpt) | = 'X'. | |||
| "SELECT single TDSTATUS FROM ITCDA INTO @DATA(ld_i_status). | ||||
| "SELECT single BUKRS FROM OIRECCTYP INTO @DATA(ld_bukrs). | ||||
| "SELECT single SSR_CCINS FROM OIRECCTYP INTO @DATA(ld_ssr_ccins). | ||||
| "SELECT single PFKEY FROM SY INTO @DATA(ld_fcode). | ||||
| "SELECT single PROGRAMM FROM RS38M INTO @DATA(ld_model). | ||||
| "SELECT single PROGRAMM FROM RS38M INTO @DATA(ld_program). | ||||
| "SELECT single SUBC FROM TRDIR INTO @DATA(ld_prog_type). | ||||
| DATA(ld_prog_type) | = ' '. | |||
| "SELECT single DEVCLASS FROM TADIR INTO @DATA(ld_i_devclass). | ||||
| DATA(ld_i_devclass) | = 'OIR_G0'. | |||
Search for further information about these or an SAP related objects