SAP RH_INSERT_OBJECTS Function Module for
RH_INSERT_OBJECTS is a standard rh insert objects SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 rh insert objects FM, simply by entering the name RH_INSERT_OBJECTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHGB
Program Name: SAPLRHGB
Main Program: SAPLRHGB
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RH_INSERT_OBJECTS 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 'RH_INSERT_OBJECTS'".
EXPORTING
SPLVAR = "Plan version
* IISTAT = "Object status for insert
* REL = "(Insert) relationship -> (selected node)
* TITEL = "Dialog box title (' ': no set title bar)
* PFKEY = 'LD_ADD' "PF key status dialog box (' ' see above, LD_ADD_S with status)
* NUMPAG = 10 "Input list page number 0 < numpag < 26
* NUMPP = 5 "Input list line number 0 < numpp < 6
* NO_SCREEN = ' ' "Do not update tree (RS_TREE_LIST_DISPLAY): 'X'
* EXT_UPD = ' ' "External DB update: 'X'
* RELATION_USE_PNNNN = "
* SHOW_RELATION = "
SOTYPE = "Node type (selected)
* PISTAT = 'POD' "'Name' for Get parameter plan status
* POBEG = 'DFB' "'Name' for Get parameter start date
* NO_T777I_MAINT = "
SOBJID = "Name of node (selected) where objects are inserted
* SISTAT = '1' "
* SSHORT = "Short text (selected node)
* SSTEXT = "Long text (selected node)
* SBEGDA = "Start date (selected node)
* SENDDA = "End date (selected node)
* OTYPE = "Object type for insert
TABLES
* INFO1000 = "Infotype table 1000 will be inserted
* INFO1001 = "Infotype table 1001 will be inserted
EXCEPTIONS
NO_AUTHORIZATION = 1 ERROR_DURING_INSERT = 2 NOT_FOUND = 3 OTYPE_ERROR = 4
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLRHGB_001 Additional information on / off
EXIT_SAPLRHGB_002 Text Fill Customer-Specific Field
EXIT_SAPLRHGB_003 Header Fill Customer-Specific Field
IMPORTING Parameters details for RH_INSERT_OBJECTS
SPLVAR - Plan version
Data type: OBJEC-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
IISTAT - Object status for insert
Data type: OBJEC-ISTATOptional: Yes
Call by Reference: No ( called with pass by value option)
REL - (Insert) relationship -> (selected node)
Data type: PLOG-SUBTYOptional: Yes
Call by Reference: No ( called with pass by value option)
TITEL - Dialog box title (SPACE: no set title bar)
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
PFKEY - PF key status dialog box (SPACE see above, LD_ADD_S with status)
Data type: SY-PFKEYDefault: 'LD_ADD'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NUMPAG - Input list page number 0 < numpag < 26
Data type:Default: 10
Optional: Yes
Call by Reference: No ( called with pass by value option)
NUMPP - Input list line number 0 < numpp < 6
Data type:Default: 5
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_SCREEN - Do not update tree (RS_TREE_LIST_DISPLAY): 'X'
Data type: OBJEC-HISTODefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXT_UPD - External DB update: 'X'
Data type: OBJEC-HISTODefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RELATION_USE_PNNNN -
Data type: OBJEC-HISTOOptional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_RELATION -
Data type: OBJEC-HISTOOptional: Yes
Call by Reference: No ( called with pass by value option)
SOTYPE - Node type (selected)
Data type: OBJEC-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
PISTAT - 'Name' for Get parameter plan status
Data type: TPARA-PARAMIDDefault: 'POD'
Optional: Yes
Call by Reference: No ( called with pass by value option)
POBEG - 'Name' for Get parameter start date
Data type: TPARA-PARAMIDDefault: 'DFB'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_T777I_MAINT -
Data type: OBJEC-HISTOOptional: Yes
Call by Reference: No ( called with pass by value option)
SOBJID - Name of node (selected) where objects are inserted
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SISTAT -
Data type: OBJEC-ISTATDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SSHORT - Short text (selected node)
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
SSTEXT - Long text (selected node)
Data type: OBJEC-STEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
SBEGDA - Start date (selected node)
Data type: OBJEC-BEGDAOptional: Yes
Call by Reference: No ( called with pass by value option)
SENDDA - End date (selected node)
Data type: OBJEC-ENDDAOptional: Yes
Call by Reference: No ( called with pass by value option)
OTYPE - Object type for insert
Data type: OBJEC-OTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RH_INSERT_OBJECTS
INFO1000 - Infotype table 1000 will be inserted
Data type: P1000Optional: Yes
Call by Reference: No ( called with pass by value option)
INFO1001 - Infotype table 1001 will be inserted
Data type: P1001Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_AUTHORIZATION - No authorization to insert infotype
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_DURING_INSERT - Error while inserting infotype
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND - Parent object could not be found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OTYPE_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_INSERT_OBJECTS 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_splvar | TYPE OBJEC-PLVAR, " | |||
| lt_info1000 | TYPE STANDARD TABLE OF P1000, " | |||
| lv_no_authorization | TYPE P1000, " | |||
| lv_iistat | TYPE OBJEC-ISTAT, " | |||
| lv_rel | TYPE PLOG-SUBTY, " | |||
| lv_titel | TYPE PLOG, " | |||
| lv_pfkey | TYPE SY-PFKEY, " 'LD_ADD' | |||
| lv_numpag | TYPE SY, " 10 | |||
| lv_numpp | TYPE SY, " 5 | |||
| lv_no_screen | TYPE OBJEC-HISTO, " SPACE | |||
| lv_ext_upd | TYPE OBJEC-HISTO, " SPACE | |||
| lv_relation_use_pnnnn | TYPE OBJEC-HISTO, " | |||
| lv_show_relation | TYPE OBJEC-HISTO, " | |||
| lv_sotype | TYPE OBJEC-OTYPE, " | |||
| lt_info1001 | TYPE STANDARD TABLE OF P1001, " | |||
| lv_error_during_insert | TYPE P1001, " | |||
| lv_pistat | TYPE TPARA-PARAMID, " 'POD' | |||
| lv_pobeg | TYPE TPARA-PARAMID, " 'DFB' | |||
| lv_no_t777i_maint | TYPE OBJEC-HISTO, " | |||
| lv_sobjid | TYPE OBJEC, " | |||
| lv_not_found | TYPE OBJEC, " | |||
| lv_sistat | TYPE OBJEC-ISTAT, " '1' | |||
| lv_otype_error | TYPE OBJEC, " | |||
| lv_sshort | TYPE C, " | |||
| lv_sstext | TYPE OBJEC-STEXT, " | |||
| lv_sbegda | TYPE OBJEC-BEGDA, " | |||
| lv_sendda | TYPE OBJEC-ENDDA, " | |||
| lv_otype | TYPE OBJEC-OTYPE. " |
|   CALL FUNCTION 'RH_INSERT_OBJECTS' " |
| EXPORTING | ||
| SPLVAR | = lv_splvar | |
| IISTAT | = lv_iistat | |
| REL | = lv_rel | |
| TITEL | = lv_titel | |
| PFKEY | = lv_pfkey | |
| NUMPAG | = lv_numpag | |
| NUMPP | = lv_numpp | |
| NO_SCREEN | = lv_no_screen | |
| EXT_UPD | = lv_ext_upd | |
| RELATION_USE_PNNNN | = lv_relation_use_pnnnn | |
| SHOW_RELATION | = lv_show_relation | |
| SOTYPE | = lv_sotype | |
| PISTAT | = lv_pistat | |
| POBEG | = lv_pobeg | |
| NO_T777I_MAINT | = lv_no_t777i_maint | |
| SOBJID | = lv_sobjid | |
| SISTAT | = lv_sistat | |
| SSHORT | = lv_sshort | |
| SSTEXT | = lv_sstext | |
| SBEGDA | = lv_sbegda | |
| SENDDA | = lv_sendda | |
| OTYPE | = lv_otype | |
| TABLES | ||
| INFO1000 | = lt_info1000 | |
| INFO1001 | = lt_info1001 | |
| EXCEPTIONS | ||
| NO_AUTHORIZATION = 1 | ||
| ERROR_DURING_INSERT = 2 | ||
| NOT_FOUND = 3 | ||
| OTYPE_ERROR = 4 | ||
| . " RH_INSERT_OBJECTS | ||
ABAP code using 7.40 inline data declarations to call FM RH_INSERT_OBJECTS
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 PLVAR FROM OBJEC INTO @DATA(ld_splvar). | ||||
| "SELECT single ISTAT FROM OBJEC INTO @DATA(ld_iistat). | ||||
| "SELECT single SUBTY FROM PLOG INTO @DATA(ld_rel). | ||||
| "SELECT single PFKEY FROM SY INTO @DATA(ld_pfkey). | ||||
| DATA(ld_pfkey) | = 'LD_ADD'. | |||
| DATA(ld_numpag) | = 10. | |||
| DATA(ld_numpp) | = 5. | |||
| "SELECT single HISTO FROM OBJEC INTO @DATA(ld_no_screen). | ||||
| DATA(ld_no_screen) | = ' '. | |||
| "SELECT single HISTO FROM OBJEC INTO @DATA(ld_ext_upd). | ||||
| DATA(ld_ext_upd) | = ' '. | |||
| "SELECT single HISTO FROM OBJEC INTO @DATA(ld_relation_use_pnnnn). | ||||
| "SELECT single HISTO FROM OBJEC INTO @DATA(ld_show_relation). | ||||
| "SELECT single OTYPE FROM OBJEC INTO @DATA(ld_sotype). | ||||
| "SELECT single PARAMID FROM TPARA INTO @DATA(ld_pistat). | ||||
| DATA(ld_pistat) | = 'POD'. | |||
| "SELECT single PARAMID FROM TPARA INTO @DATA(ld_pobeg). | ||||
| DATA(ld_pobeg) | = 'DFB'. | |||
| "SELECT single HISTO FROM OBJEC INTO @DATA(ld_no_t777i_maint). | ||||
| "SELECT single ISTAT FROM OBJEC INTO @DATA(ld_sistat). | ||||
| DATA(ld_sistat) | = '1'. | |||
| "SELECT single STEXT FROM OBJEC INTO @DATA(ld_sstext). | ||||
| "SELECT single BEGDA FROM OBJEC INTO @DATA(ld_sbegda). | ||||
| "SELECT single ENDDA FROM OBJEC INTO @DATA(ld_sendda). | ||||
| "SELECT single OTYPE FROM OBJEC INTO @DATA(ld_otype). | ||||
Search for further information about these or an SAP related objects