SAP GENIL_CREATE Function Module for Root Object Create
GENIL_CREATE is a standard genil 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 Root Object Create 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 genil create FM, simply by entering the name GENIL_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: GENIL_RFCL
Program Name: SAPLGENIL_RFCL
Main Program: SAPLGENIL_RFCL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function GENIL_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 'GENIL_CREATE'"Root Object Create.
EXPORTING
IV_OBJECT_NAME = "
* IV_NUMBER = 1 "
* IV_GLOBAL_MESSAGES_REQ = "Logical Variable, Similar To ABAP_BOOL from Type Pool ABAP
* IV_OBJ_MESSAGES_REQ = "Logical Variable, Similar To ABAP_BOOL from Type Pool ABAP
* IV_MESSAGE_TYPE = "Message type: S Success, E Error, W Warning, I Info, A All, C Abort
* IV_MSG_LEVEL = "Message Level
* IV_FOR_DISPLAY = "Logical Variable, Similar To ABAP_BOOL from Type Pool ABAP
TABLES
IT_PARAMETERS = "Parameter as Name-Value Pair
ET_DATA_HDR = "
ET_DATA_ATTR = "
ET_DATA_RELS = "
ET_DATA_REL_OBJ = "Objects in Relation in RFC Data Container
* ET_GLOBAL_MESSAGES = "Return Parameter
* ET_OBJ_MESSAGES_HDR = "Header table for object related messages
* ET_OBJ_MESSAGES = "Return Parameter
EXCEPTIONS
ERROR_OCCURED = 1
IMPORTING Parameters details for GENIL_CREATE
IV_OBJECT_NAME -
Data type: CRMT_EXT_OBJ_NAMEOptional: No
Call by Reference: No ( called with pass by value option)
IV_NUMBER -
Data type: INT4Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_GLOBAL_MESSAGES_REQ - Logical Variable, Similar To ABAP_BOOL from Type Pool ABAP
Data type: CRMT_GENIL_BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_OBJ_MESSAGES_REQ - Logical Variable, Similar To ABAP_BOOL from Type Pool ABAP
Data type: CRMT_GENIL_BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MESSAGE_TYPE - Message type: S Success, E Error, W Warning, I Info, A All, C Abort
Data type: BAPI_MTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MSG_LEVEL - Message Level
Data type: CRMT_GENIL_MSG_LEVELOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_FOR_DISPLAY - Logical Variable, Similar To ABAP_BOOL from Type Pool ABAP
Data type: CRMT_GENIL_BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for GENIL_CREATE
IT_PARAMETERS - Parameter as Name-Value Pair
Data type: GENILRFCT_NAME_VALUE_PAIROptional: No
Call by Reference: Yes
ET_DATA_HDR -
Data type: CRMT_GENIL_RFC_DATA_HDROptional: No
Call by Reference: No ( called with pass by value option)
ET_DATA_ATTR -
Data type: CRMT_GENIL_RFC_DATA_ATTROptional: No
Call by Reference: No ( called with pass by value option)
ET_DATA_RELS -
Data type: CRMT_GENIL_RFC_DATA_RELOptional: No
Call by Reference: No ( called with pass by value option)
ET_DATA_REL_OBJ - Objects in Relation in RFC Data Container
Data type: CRMT_GENIL_RFC_DATA_REL_OBJOptional: No
Call by Reference: Yes
ET_GLOBAL_MESSAGES - Return Parameter
Data type: GENILRFCT_MESSAGEOptional: Yes
Call by Reference: Yes
ET_OBJ_MESSAGES_HDR - Header table for object related messages
Data type: GENILRFCT_OBJ_MESSAGE_HDROptional: Yes
Call by Reference: Yes
ET_OBJ_MESSAGES - Return Parameter
Data type: GENILRFCT_OBJ_MESSAGEOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
ERROR_OCCURED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for GENIL_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_occured | TYPE STRING, " | |||
| lt_it_parameters | TYPE STANDARD TABLE OF GENILRFCT_NAME_VALUE_PAIR, " | |||
| lv_iv_object_name | TYPE CRMT_EXT_OBJ_NAME, " | |||
| lv_iv_number | TYPE INT4, " 1 | |||
| lt_et_data_hdr | TYPE STANDARD TABLE OF CRMT_GENIL_RFC_DATA_HDR, " | |||
| lt_et_data_attr | TYPE STANDARD TABLE OF CRMT_GENIL_RFC_DATA_ATTR, " | |||
| lv_iv_global_messages_req | TYPE CRMT_GENIL_BOOLEAN, " | |||
| lt_et_data_rels | TYPE STANDARD TABLE OF CRMT_GENIL_RFC_DATA_REL, " | |||
| lv_iv_obj_messages_req | TYPE CRMT_GENIL_BOOLEAN, " | |||
| lt_et_data_rel_obj | TYPE STANDARD TABLE OF CRMT_GENIL_RFC_DATA_REL_OBJ, " | |||
| lv_iv_message_type | TYPE BAPI_MTYPE, " | |||
| lv_iv_msg_level | TYPE CRMT_GENIL_MSG_LEVEL, " | |||
| lt_et_global_messages | TYPE STANDARD TABLE OF GENILRFCT_MESSAGE, " | |||
| lv_iv_for_display | TYPE CRMT_GENIL_BOOLEAN, " | |||
| lt_et_obj_messages_hdr | TYPE STANDARD TABLE OF GENILRFCT_OBJ_MESSAGE_HDR, " | |||
| lt_et_obj_messages | TYPE STANDARD TABLE OF GENILRFCT_OBJ_MESSAGE. " |
|   CALL FUNCTION 'GENIL_CREATE' "Root Object Create |
| EXPORTING | ||
| IV_OBJECT_NAME | = lv_iv_object_name | |
| IV_NUMBER | = lv_iv_number | |
| IV_GLOBAL_MESSAGES_REQ | = lv_iv_global_messages_req | |
| IV_OBJ_MESSAGES_REQ | = lv_iv_obj_messages_req | |
| IV_MESSAGE_TYPE | = lv_iv_message_type | |
| IV_MSG_LEVEL | = lv_iv_msg_level | |
| IV_FOR_DISPLAY | = lv_iv_for_display | |
| TABLES | ||
| IT_PARAMETERS | = lt_it_parameters | |
| ET_DATA_HDR | = lt_et_data_hdr | |
| ET_DATA_ATTR | = lt_et_data_attr | |
| ET_DATA_RELS | = lt_et_data_rels | |
| ET_DATA_REL_OBJ | = lt_et_data_rel_obj | |
| ET_GLOBAL_MESSAGES | = lt_et_global_messages | |
| ET_OBJ_MESSAGES_HDR | = lt_et_obj_messages_hdr | |
| ET_OBJ_MESSAGES | = lt_et_obj_messages | |
| EXCEPTIONS | ||
| ERROR_OCCURED = 1 | ||
| . " GENIL_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM GENIL_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.| DATA(ld_iv_number) | = 1. | |||
Search for further information about these or an SAP related objects