SAP RH_RELATION_MAINTAIN Function Module for
RH_RELATION_MAINTAIN is a standard rh relation maintain 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 relation maintain FM, simply by entering the name RH_RELATION_MAINTAIN into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHWC
Program Name: SAPLRHWC
Main Program: SAPLRHWC
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RH_RELATION_MAINTAIN 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_RELATION_MAINTAIN'".
EXPORTING
ACT_FCODE = "
* ACT_BEGDA = SY-DATUM "
* ACT_ENDDA = '99991231' "
* ACT_PRIOX = "
* ACT_PROZT = "
* ACT_ADATA = "
ACT_PLVAR = "
ACT_OTYPE = "
ACT_OBJID = "
* ACT_ISTAT = 1 "
ACT_RSIGN = "
ACT_RELAT = "
ACT_SCLAS = "
ACT_SOBID = "
IMPORTING
REL_ISTAT = "
REL_RSIGN = "
REL_RELAT = "
REL_SCLAS = "
REL_SOBID = "
REL_BEGDA = "
REL_ENDDA = "
EXCEPTIONS
MAINTAINANCE_FAILED = 1
IMPORTING Parameters details for RH_RELATION_MAINTAIN
ACT_FCODE -
Data type: T77FC-FCODEOptional: No
Call by Reference: No ( called with pass by value option)
ACT_BEGDA -
Data type: P1001-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_ENDDA -
Data type: P1001-ENDDADefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_PRIOX -
Data type: P1001-PRIOXOptional: Yes
Call by Reference: No ( called with pass by value option)
ACT_PROZT -
Data type: P1001-PROZTOptional: Yes
Call by Reference: No ( called with pass by value option)
ACT_ADATA -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_PLVAR -
Data type: P1001-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
ACT_OTYPE -
Data type: P1001-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
ACT_OBJID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ACT_ISTAT -
Data type: P1001-ISTATDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_RSIGN -
Data type: P1001-RSIGNOptional: No
Call by Reference: No ( called with pass by value option)
ACT_RELAT -
Data type: P1001-RELATOptional: No
Call by Reference: No ( called with pass by value option)
ACT_SCLAS -
Data type: P1001-SCLASOptional: No
Call by Reference: No ( called with pass by value option)
ACT_SOBID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_RELATION_MAINTAIN
REL_ISTAT -
Data type: P1001-ISTATOptional: No
Call by Reference: No ( called with pass by value option)
REL_RSIGN -
Data type: P1001-RSIGNOptional: No
Call by Reference: No ( called with pass by value option)
REL_RELAT -
Data type: P1001-RELATOptional: No
Call by Reference: No ( called with pass by value option)
REL_SCLAS -
Data type: P1001-SCLASOptional: No
Call by Reference: No ( called with pass by value option)
REL_SOBID -
Data type: P1001-SOBIDOptional: No
Call by Reference: No ( called with pass by value option)
REL_BEGDA -
Data type: P1001-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
REL_ENDDA -
Data type: P1001-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
MAINTAINANCE_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_RELATION_MAINTAIN 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_act_fcode | TYPE T77FC-FCODE, " | |||
| lv_rel_istat | TYPE P1001-ISTAT, " | |||
| lv_maintainance_failed | TYPE P1001, " | |||
| lv_act_begda | TYPE P1001-BEGDA, " SY-DATUM | |||
| lv_act_endda | TYPE P1001-ENDDA, " '99991231' | |||
| lv_act_priox | TYPE P1001-PRIOX, " | |||
| lv_act_prozt | TYPE P1001-PROZT, " | |||
| lv_act_adata | TYPE P1001, " | |||
| lv_act_plvar | TYPE P1001-PLVAR, " | |||
| lv_rel_rsign | TYPE P1001-RSIGN, " | |||
| lv_act_otype | TYPE P1001-OTYPE, " | |||
| lv_rel_relat | TYPE P1001-RELAT, " | |||
| lv_act_objid | TYPE P1001, " | |||
| lv_rel_sclas | TYPE P1001-SCLAS, " | |||
| lv_act_istat | TYPE P1001-ISTAT, " 1 | |||
| lv_rel_sobid | TYPE P1001-SOBID, " | |||
| lv_act_rsign | TYPE P1001-RSIGN, " | |||
| lv_rel_begda | TYPE P1001-BEGDA, " | |||
| lv_act_relat | TYPE P1001-RELAT, " | |||
| lv_rel_endda | TYPE P1001-ENDDA, " | |||
| lv_act_sclas | TYPE P1001-SCLAS, " | |||
| lv_act_sobid | TYPE P1001. " |
|   CALL FUNCTION 'RH_RELATION_MAINTAIN' " |
| EXPORTING | ||
| ACT_FCODE | = lv_act_fcode | |
| ACT_BEGDA | = lv_act_begda | |
| ACT_ENDDA | = lv_act_endda | |
| ACT_PRIOX | = lv_act_priox | |
| ACT_PROZT | = lv_act_prozt | |
| ACT_ADATA | = lv_act_adata | |
| ACT_PLVAR | = lv_act_plvar | |
| ACT_OTYPE | = lv_act_otype | |
| ACT_OBJID | = lv_act_objid | |
| ACT_ISTAT | = lv_act_istat | |
| ACT_RSIGN | = lv_act_rsign | |
| ACT_RELAT | = lv_act_relat | |
| ACT_SCLAS | = lv_act_sclas | |
| ACT_SOBID | = lv_act_sobid | |
| IMPORTING | ||
| REL_ISTAT | = lv_rel_istat | |
| REL_RSIGN | = lv_rel_rsign | |
| REL_RELAT | = lv_rel_relat | |
| REL_SCLAS | = lv_rel_sclas | |
| REL_SOBID | = lv_rel_sobid | |
| REL_BEGDA | = lv_rel_begda | |
| REL_ENDDA | = lv_rel_endda | |
| EXCEPTIONS | ||
| MAINTAINANCE_FAILED = 1 | ||
| . " RH_RELATION_MAINTAIN | ||
ABAP code using 7.40 inline data declarations to call FM RH_RELATION_MAINTAIN
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 FCODE FROM T77FC INTO @DATA(ld_act_fcode). | ||||
| "SELECT single ISTAT FROM P1001 INTO @DATA(ld_rel_istat). | ||||
| "SELECT single BEGDA FROM P1001 INTO @DATA(ld_act_begda). | ||||
| DATA(ld_act_begda) | = SY-DATUM. | |||
| "SELECT single ENDDA FROM P1001 INTO @DATA(ld_act_endda). | ||||
| DATA(ld_act_endda) | = '99991231'. | |||
| "SELECT single PRIOX FROM P1001 INTO @DATA(ld_act_priox). | ||||
| "SELECT single PROZT FROM P1001 INTO @DATA(ld_act_prozt). | ||||
| "SELECT single PLVAR FROM P1001 INTO @DATA(ld_act_plvar). | ||||
| "SELECT single RSIGN FROM P1001 INTO @DATA(ld_rel_rsign). | ||||
| "SELECT single OTYPE FROM P1001 INTO @DATA(ld_act_otype). | ||||
| "SELECT single RELAT FROM P1001 INTO @DATA(ld_rel_relat). | ||||
| "SELECT single SCLAS FROM P1001 INTO @DATA(ld_rel_sclas). | ||||
| "SELECT single ISTAT FROM P1001 INTO @DATA(ld_act_istat). | ||||
| DATA(ld_act_istat) | = 1. | |||
| "SELECT single SOBID FROM P1001 INTO @DATA(ld_rel_sobid). | ||||
| "SELECT single RSIGN FROM P1001 INTO @DATA(ld_act_rsign). | ||||
| "SELECT single BEGDA FROM P1001 INTO @DATA(ld_rel_begda). | ||||
| "SELECT single RELAT FROM P1001 INTO @DATA(ld_act_relat). | ||||
| "SELECT single ENDDA FROM P1001 INTO @DATA(ld_rel_endda). | ||||
| "SELECT single SCLAS FROM P1001 INTO @DATA(ld_act_sclas). | ||||
Search for further information about these or an SAP related objects