SAP Function Modules

HR_ADD_APPLICANT_DATA SAP Function module







HR_ADD_APPLICANT_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_ADD_APPLICANT_DATA into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RPAP
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM HR_ADD_APPLICANT_DATA - HR ADD APPLICANT DATA





CALL FUNCTION 'HR_ADD_APPLICANT_DATA' "
  EXPORTING
    applicantnumber =           " p0001-pernr
    begda =                     " p0001-endda
    endda =                     " p0001-begda
*   infty_0001 =                " p0001
*   infty_0002 =                " p0002
*   infty_0006 =                " p0006
*   dialog_mode = '0'           " c
*   nocommit =                  " bapi_stand-no_commit
  IMPORTING
    return =                    " bapireturn1
* TABLES
*   infty_0022 =                " p0022
*   infty_0023 =                " p0023
*   infty_0024 =                " p0024
    .  "  HR_ADD_APPLICANT_DATA

ABAP code example for Function Module HR_ADD_APPLICANT_DATA





The ABAP code below is a full code listing to execute function module HR_ADD_APPLICANT_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_return  TYPE BAPIRETURN1 ,
it_infty_0022  TYPE STANDARD TABLE OF P0022,"TABLES PARAM
wa_infty_0022  LIKE LINE OF it_infty_0022 ,
it_infty_0023  TYPE STANDARD TABLE OF P0023,"TABLES PARAM
wa_infty_0023  LIKE LINE OF it_infty_0023 ,
it_infty_0024  TYPE STANDARD TABLE OF P0024,"TABLES PARAM
wa_infty_0024  LIKE LINE OF it_infty_0024 .


DATA(ld_applicantnumber) = Check type of data required

DATA(ld_begda) = 20210129

DATA(ld_endda) = 20210129
DATA(ld_infty_0001) = 'Check type of data required'.
DATA(ld_infty_0002) = 'Check type of data required'.
DATA(ld_infty_0006) = 'Check type of data required'.
DATA(ld_dialog_mode) = 'Check type of data required'.

DATA(ld_nocommit) = some text here

"populate fields of struture and append to itab
append wa_infty_0022 to it_infty_0022.

"populate fields of struture and append to itab
append wa_infty_0023 to it_infty_0023.

"populate fields of struture and append to itab
append wa_infty_0024 to it_infty_0024. . CALL FUNCTION 'HR_ADD_APPLICANT_DATA' EXPORTING applicantnumber = ld_applicantnumber begda = ld_begda endda = ld_endda * infty_0001 = ld_infty_0001 * infty_0002 = ld_infty_0002 * infty_0006 = ld_infty_0006 * dialog_mode = ld_dialog_mode * nocommit = ld_nocommit IMPORTING return = ld_return * TABLES * infty_0022 = it_infty_0022 * infty_0023 = it_infty_0023 * infty_0024 = it_infty_0024 . " HR_ADD_APPLICANT_DATA
IF SY-SUBRC EQ 0. "All OK 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_return  TYPE BAPIRETURN1 ,
ld_applicantnumber  TYPE P0001-PERNR ,
it_infty_0022  TYPE STANDARD TABLE OF P0022 ,
wa_infty_0022  LIKE LINE OF it_infty_0022,
ld_begda  TYPE P0001-ENDDA ,
it_infty_0023  TYPE STANDARD TABLE OF P0023 ,
wa_infty_0023  LIKE LINE OF it_infty_0023,
ld_endda  TYPE P0001-BEGDA ,
it_infty_0024  TYPE STANDARD TABLE OF P0024 ,
wa_infty_0024  LIKE LINE OF it_infty_0024,
ld_infty_0001  TYPE P0001 ,
ld_infty_0002  TYPE P0002 ,
ld_infty_0006  TYPE P0006 ,
ld_dialog_mode  TYPE C ,
ld_nocommit  TYPE BAPI_STAND-NO_COMMIT .


ld_applicantnumber = Check type of data required

"populate fields of struture and append to itab
append wa_infty_0022 to it_infty_0022.

ld_begda = 20210129

"populate fields of struture and append to itab
append wa_infty_0023 to it_infty_0023.

ld_endda = 20210129

"populate fields of struture and append to itab
append wa_infty_0024 to it_infty_0024.
ld_infty_0001 = 'Check type of data required'.
ld_infty_0002 = 'Check type of data required'.
ld_infty_0006 = 'Check type of data required'.
ld_dialog_mode = 'Check type of data required'.

ld_nocommit = 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_ADD_APPLICANT_DATA or its description.