SAP Function Modules

HR_REPRESENTANT_GET_DATA SAP Function module







HR_REPRESENTANT_GET_DATA is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name HR_REPRESENTANT_GET_DATA into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: HRMR
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM HR_REPRESENTANT_GET_DATA - HR REPRESENTANT GET DATA





CALL FUNCTION 'HR_REPRESENTANT_GET_DATA' "
  EXPORTING
    p_pernr =                   " hrmr_rep-person_no
*   p_date_from = SY-DATUM      " hrmr_rep-date_from
*   p_private_address =         " hrmr_rep-private_data
*   p_auth_check_off =          " hrmr_rep-auth_check_off
  IMPORTING
    p_hrmr_rep =                " hrmr_rep
  EXCEPTIONS
    PERNR_NOT_FOUND = 1         "
    NO_AUTHORIZATION = 2        "
    PAREA_NOT_FOUND = 3         "
    ADDRESS_NOT_FOUND = 4       "
    .  "  HR_REPRESENTANT_GET_DATA

ABAP code example for Function Module HR_REPRESENTANT_GET_DATA





The ABAP code below is a full code listing to execute function module HR_REPRESENTANT_GET_DATA including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_p_hrmr_rep  TYPE HRMR_REP .


DATA(ld_p_pernr) = Check type of data required

DATA(ld_p_date_from) = 20210129

DATA(ld_p_private_address) = some text here

DATA(ld_p_auth_check_off) = some text here . CALL FUNCTION 'HR_REPRESENTANT_GET_DATA' EXPORTING p_pernr = ld_p_pernr * p_date_from = ld_p_date_from * p_private_address = ld_p_private_address * p_auth_check_off = ld_p_auth_check_off IMPORTING p_hrmr_rep = ld_p_hrmr_rep EXCEPTIONS PERNR_NOT_FOUND = 1 NO_AUTHORIZATION = 2 PAREA_NOT_FOUND = 3 ADDRESS_NOT_FOUND = 4 . " HR_REPRESENTANT_GET_DATA
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_p_hrmr_rep  TYPE HRMR_REP ,
ld_p_pernr  TYPE HRMR_REP-PERSON_NO ,
ld_p_date_from  TYPE HRMR_REP-DATE_FROM ,
ld_p_private_address  TYPE HRMR_REP-PRIVATE_DATA ,
ld_p_auth_check_off  TYPE HRMR_REP-AUTH_CHECK_OFF .


ld_p_pernr = Check type of data required

ld_p_date_from = 20210129

ld_p_private_address = some text here

ld_p_auth_check_off = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name HR_REPRESENTANT_GET_DATA or its description.