SAP MMHR_REPRESENTANT_GET_DATA Function Module for NOTRANSL: Lesen persönlicher Daten zum Einkäufer
MMHR_REPRESENTANT_GET_DATA is a standard mmhr representant get data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Lesen persönlicher Daten zum Einkäufer 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 mmhr representant get data FM, simply by entering the name MMHR_REPRESENTANT_GET_DATA into the relevant SAP transaction such as SE37 or SE38.
Function Group: WY09
Program Name: SAPLWY09
Main Program: SAPLWY09
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MMHR_REPRESENTANT_GET_DATA 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 'MMHR_REPRESENTANT_GET_DATA'"NOTRANSL: Lesen persönlicher Daten zum Einkäufer.
EXPORTING
PI_PERNR = "Personnel Number
* PI_DATE_FROM = SY-DATUM "
* PI_PRIVATE_ADDRESS = ' ' "
IMPORTING
PE_HRMR_REP = "
EXCEPTIONS
PERNR_NOT_FOUND = 1 NO_AUTHORIZATION = 2 PAREA_NOT_FOUND = 3 ADDRESS_NOT_FOUND = 4
IMPORTING Parameters details for MMHR_REPRESENTANT_GET_DATA
PI_PERNR - Personnel Number
Data type: WYT3-PERNROptional: No
Call by Reference: No ( called with pass by value option)
PI_DATE_FROM -
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_PRIVATE_ADDRESS -
Data type: RF02K-XASELDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MMHR_REPRESENTANT_GET_DATA
PE_HRMR_REP -
Data type: HRMR_REPOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PERNR_NOT_FOUND - Personnel number does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORIZATION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PAREA_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ADDRESS_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MMHR_REPRESENTANT_GET_DATA 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_pi_pernr | TYPE WYT3-PERNR, " | |||
| lv_pe_hrmr_rep | TYPE HRMR_REP, " | |||
| lv_pernr_not_found | TYPE HRMR_REP, " | |||
| lv_pi_date_from | TYPE SY-DATUM, " SY-DATUM | |||
| lv_no_authorization | TYPE SY, " | |||
| lv_parea_not_found | TYPE SY, " | |||
| lv_pi_private_address | TYPE RF02K-XASEL, " SPACE | |||
| lv_address_not_found | TYPE RF02K. " |
|   CALL FUNCTION 'MMHR_REPRESENTANT_GET_DATA' "NOTRANSL: Lesen persönlicher Daten zum Einkäufer |
| EXPORTING | ||
| PI_PERNR | = lv_pi_pernr | |
| PI_DATE_FROM | = lv_pi_date_from | |
| PI_PRIVATE_ADDRESS | = lv_pi_private_address | |
| IMPORTING | ||
| PE_HRMR_REP | = lv_pe_hrmr_rep | |
| EXCEPTIONS | ||
| PERNR_NOT_FOUND = 1 | ||
| NO_AUTHORIZATION = 2 | ||
| PAREA_NOT_FOUND = 3 | ||
| ADDRESS_NOT_FOUND = 4 | ||
| . " MMHR_REPRESENTANT_GET_DATA | ||
ABAP code using 7.40 inline data declarations to call FM MMHR_REPRESENTANT_GET_DATA
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 WYT3 INTO @DATA(ld_pi_pernr). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_pi_date_from). | ||||
| DATA(ld_pi_date_from) | = SY-DATUM. | |||
| "SELECT single XASEL FROM RF02K INTO @DATA(ld_pi_private_address). | ||||
| DATA(ld_pi_private_address) | = ' '. | |||
Search for further information about these or an SAP related objects