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

Function HR_MAINTAIN_MASTERDATA 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 'HR_MAINTAIN_MASTERDATA'".
EXPORTING
* PERNR = '00000000' "
* SUBTY = "
* WERKS = "
* PERSG = "
* PERSK = "
* PLANS = "
* DIALOG_MODE = '0' "
* LUW_MODE = '1' "
* NO_EXISTENCE_CHECK = ' ' "
* NO_ENQUEUE = ' ' "
* MASSN = "
* ACTIO = 'INS' "
* TCLAS = 'A' "
* BEGDA = SY-DATUM "
* ENDDA = '99991231' "
* OBJPS = "
* SEQNR = "
* SPRPS = "
IMPORTING
RETURN = "
RETURN1 = "
HR_RETURN = "
TABLES
PROPOSED_VALUES = "
* MODIFIED_KEYS = "
IMPORTING Parameters details for HR_MAINTAIN_MASTERDATA
PERNR -
Data type: PSPAR-PERNRDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUBTY -
Data type: PSPAR-SUBTYOptional: Yes
Call by Reference: No ( called with pass by value option)
WERKS -
Data type: PSPAR-WERKSOptional: Yes
Call by Reference: No ( called with pass by value option)
PERSG -
Data type: PSPAR-PERSGOptional: Yes
Call by Reference: No ( called with pass by value option)
PERSK -
Data type: PSPAR-PERSKOptional: Yes
Call by Reference: No ( called with pass by value option)
PLANS -
Data type: PSPAR-PLANSOptional: Yes
Call by Reference: No ( called with pass by value option)
DIALOG_MODE -
Data type: CDefault: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LUW_MODE -
Data type: CDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_EXISTENCE_CHECK -
Data type: CDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_ENQUEUE -
Data type: CDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MASSN -
Data type: PSPAR-MASSNOptional: Yes
Call by Reference: No ( called with pass by value option)
ACTIO -
Data type: PSPAR-ACTIODefault: 'INS'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TCLAS -
Data type: PSPAR-TCLASDefault: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BEGDA -
Data type: PSPAR-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA -
Data type: PSPAR-ENDDADefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJPS -
Data type: PSPAR-OBJPSOptional: Yes
Call by Reference: No ( called with pass by value option)
SEQNR -
Data type: PSPAR-SEQNROptional: Yes
Call by Reference: No ( called with pass by value option)
SPRPS -
Data type: PSPAR-SPRPSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_MAINTAIN_MASTERDATA
RETURN -
Data type: BAPIRETURNOptional: No
Call by Reference: No ( called with pass by value option)
RETURN1 -
Data type: BAPIRETURN1Optional: No
Call by Reference: No ( called with pass by value option)
HR_RETURN -
Data type: HRHRMM_MSGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HR_MAINTAIN_MASTERDATA
PROPOSED_VALUES -
Data type: PPROPOptional: No
Call by Reference: No ( called with pass by value option)
MODIFIED_KEYS -
Data type: PSKEYOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_MAINTAIN_MASTERDATA 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_pernr | TYPE PSPAR-PERNR, " '00000000' | |||
| lv_return | TYPE BAPIRETURN, " | |||
| lt_proposed_values | TYPE STANDARD TABLE OF PPROP, " | |||
| lv_subty | TYPE PSPAR-SUBTY, " | |||
| lv_werks | TYPE PSPAR-WERKS, " | |||
| lv_persg | TYPE PSPAR-PERSG, " | |||
| lv_persk | TYPE PSPAR-PERSK, " | |||
| lv_plans | TYPE PSPAR-PLANS, " | |||
| lv_dialog_mode | TYPE C, " '0' | |||
| lv_luw_mode | TYPE C, " '1' | |||
| lv_no_existence_check | TYPE C, " ' ' | |||
| lv_no_enqueue | TYPE C, " ' ' | |||
| lv_massn | TYPE PSPAR-MASSN, " | |||
| lv_return1 | TYPE BAPIRETURN1, " | |||
| lt_modified_keys | TYPE STANDARD TABLE OF PSKEY, " | |||
| lv_actio | TYPE PSPAR-ACTIO, " 'INS' | |||
| lv_hr_return | TYPE HRHRMM_MSG, " | |||
| lv_tclas | TYPE PSPAR-TCLAS, " 'A' | |||
| lv_begda | TYPE PSPAR-BEGDA, " SY-DATUM | |||
| lv_endda | TYPE PSPAR-ENDDA, " '99991231' | |||
| lv_objps | TYPE PSPAR-OBJPS, " | |||
| lv_seqnr | TYPE PSPAR-SEQNR, " | |||
| lv_sprps | TYPE PSPAR-SPRPS. " |
|   CALL FUNCTION 'HR_MAINTAIN_MASTERDATA' " |
| EXPORTING | ||
| PERNR | = lv_pernr | |
| SUBTY | = lv_subty | |
| WERKS | = lv_werks | |
| PERSG | = lv_persg | |
| PERSK | = lv_persk | |
| PLANS | = lv_plans | |
| DIALOG_MODE | = lv_dialog_mode | |
| LUW_MODE | = lv_luw_mode | |
| NO_EXISTENCE_CHECK | = lv_no_existence_check | |
| NO_ENQUEUE | = lv_no_enqueue | |
| MASSN | = lv_massn | |
| ACTIO | = lv_actio | |
| TCLAS | = lv_tclas | |
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| OBJPS | = lv_objps | |
| SEQNR | = lv_seqnr | |
| SPRPS | = lv_sprps | |
| IMPORTING | ||
| RETURN | = lv_return | |
| RETURN1 | = lv_return1 | |
| HR_RETURN | = lv_hr_return | |
| TABLES | ||
| PROPOSED_VALUES | = lt_proposed_values | |
| MODIFIED_KEYS | = lt_modified_keys | |
| . " HR_MAINTAIN_MASTERDATA | ||
ABAP code using 7.40 inline data declarations to call FM HR_MAINTAIN_MASTERDATA
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 PERNR FROM PSPAR INTO @DATA(ld_pernr). | ||||
| DATA(ld_pernr) | = '00000000'. | |||
| "SELECT single SUBTY FROM PSPAR INTO @DATA(ld_subty). | ||||
| "SELECT single WERKS FROM PSPAR INTO @DATA(ld_werks). | ||||
| "SELECT single PERSG FROM PSPAR INTO @DATA(ld_persg). | ||||
| "SELECT single PERSK FROM PSPAR INTO @DATA(ld_persk). | ||||
| "SELECT single PLANS FROM PSPAR INTO @DATA(ld_plans). | ||||
| DATA(ld_dialog_mode) | = '0'. | |||
| DATA(ld_luw_mode) | = '1'. | |||
| DATA(ld_no_existence_check) | = ' '. | |||
| DATA(ld_no_enqueue) | = ' '. | |||
| "SELECT single MASSN FROM PSPAR INTO @DATA(ld_massn). | ||||
| "SELECT single ACTIO FROM PSPAR INTO @DATA(ld_actio). | ||||
| DATA(ld_actio) | = 'INS'. | |||
| "SELECT single TCLAS FROM PSPAR INTO @DATA(ld_tclas). | ||||
| DATA(ld_tclas) | = 'A'. | |||
| "SELECT single BEGDA FROM PSPAR INTO @DATA(ld_begda). | ||||
| DATA(ld_begda) | = SY-DATUM. | |||
| "SELECT single ENDDA FROM PSPAR INTO @DATA(ld_endda). | ||||
| DATA(ld_endda) | = '99991231'. | |||
| "SELECT single OBJPS FROM PSPAR INTO @DATA(ld_objps). | ||||
| "SELECT single SEQNR FROM PSPAR INTO @DATA(ld_seqnr). | ||||
| "SELECT single SPRPS FROM PSPAR INTO @DATA(ld_sprps). | ||||
Search for further information about these or an SAP related objects