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

Function RH_PART_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_PART_MAINTAIN'".
EXPORTING
PLVAR = "
PRTPE = "
* PARID = "
* FCODE = 'DISP' "
* BEGDA = SY-DATUM "
* ENDDA = '99991231' "
IMPORTING
NEW_PARID = "
EXCEPTIONS
FCODE_INVALID = 1 NO_DATA_FOUND = 2 PART_TYPE_INVALID = 3 NO_MAINT_AUTH = 4
IMPORTING Parameters details for RH_PART_MAINTAIN
PLVAR -
Data type: HRVPAR-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
PRTPE -
Data type: HRVPV-PRTPEOptional: No
Call by Reference: No ( called with pass by value option)
PARID -
Data type: OBJEC-REALOOptional: Yes
Call by Reference: No ( called with pass by value option)
FCODE -
Data type: PPPAR-FCODEDefault: 'DISP'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BEGDA -
Data type: OBJEC-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA -
Data type: OBJEC-ENDDADefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_PART_MAINTAIN
NEW_PARID -
Data type: OBJEC-REALOOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FCODE_INVALID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DATA_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PART_TYPE_INVALID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_MAINT_AUTH -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_PART_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_plvar | TYPE HRVPAR-PLVAR, " | |||
| lv_new_parid | TYPE OBJEC-REALO, " | |||
| lv_fcode_invalid | TYPE OBJEC, " | |||
| lv_prtpe | TYPE HRVPV-PRTPE, " | |||
| lv_no_data_found | TYPE HRVPV, " | |||
| lv_parid | TYPE OBJEC-REALO, " | |||
| lv_part_type_invalid | TYPE OBJEC, " | |||
| lv_fcode | TYPE PPPAR-FCODE, " 'DISP' | |||
| lv_no_maint_auth | TYPE PPPAR, " | |||
| lv_begda | TYPE OBJEC-BEGDA, " SY-DATUM | |||
| lv_endda | TYPE OBJEC-ENDDA. " '99991231' |
|   CALL FUNCTION 'RH_PART_MAINTAIN' " |
| EXPORTING | ||
| PLVAR | = lv_plvar | |
| PRTPE | = lv_prtpe | |
| PARID | = lv_parid | |
| FCODE | = lv_fcode | |
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| IMPORTING | ||
| NEW_PARID | = lv_new_parid | |
| EXCEPTIONS | ||
| FCODE_INVALID = 1 | ||
| NO_DATA_FOUND = 2 | ||
| PART_TYPE_INVALID = 3 | ||
| NO_MAINT_AUTH = 4 | ||
| . " RH_PART_MAINTAIN | ||
ABAP code using 7.40 inline data declarations to call FM RH_PART_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 PLVAR FROM HRVPAR INTO @DATA(ld_plvar). | ||||
| "SELECT single REALO FROM OBJEC INTO @DATA(ld_new_parid). | ||||
| "SELECT single PRTPE FROM HRVPV INTO @DATA(ld_prtpe). | ||||
| "SELECT single REALO FROM OBJEC INTO @DATA(ld_parid). | ||||
| "SELECT single FCODE FROM PPPAR INTO @DATA(ld_fcode). | ||||
| DATA(ld_fcode) | = 'DISP'. | |||
| "SELECT single BEGDA FROM OBJEC INTO @DATA(ld_begda). | ||||
| DATA(ld_begda) | = SY-DATUM. | |||
| "SELECT single ENDDA FROM OBJEC INTO @DATA(ld_endda). | ||||
| DATA(ld_endda) | = '99991231'. | |||
Search for further information about these or an SAP related objects