SAP Function Modules

BP_CENTRALPERSON_GET SAP Function module







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

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


Pattern for FM BP_CENTRALPERSON_GET - BP CENTRALPERSON GET





CALL FUNCTION 'BP_CENTRALPERSON_GET' "
* EXPORTING
*   iv_person_id =              " personid      Person Number
*   iv_bu_partner_guid =        " bu_partner_guid  GUID of a Business Partner Address
*   iv_employee_id =            " pernr_d       Personnel Number
*   iv_username =               " syuname       SAP System, User Logon Name
  IMPORTING
    ev_person_id =              " personid      Person Number
    ev_bu_partner_guid =        " bu_partner_guid  GUID of a Business Partner Address
    ev_username =               " syuname       SAP System, User Logon Name
    et_employee_id =            " bpemployeet   HR Employee Numbers
    ev_name =                   " emnam         Formatted Name of Employee or Applicant
    et_users =                  " swdtuser
    et_employee_id_stat2 =      " bpemployee_stat2_t
  EXCEPTIONS
    NO_CENTRAL_PERSON = 1       "               No central person is assigned
    NO_BUSINESS_PARTNER = 2     "               No business partner is assigned
    NO_ID = 3                   "               At least one ID must be filled
    .  "  BP_CENTRALPERSON_GET

ABAP code example for Function Module BP_CENTRALPERSON_GET





The ABAP code below is a full code listing to execute function module BP_CENTRALPERSON_GET 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_ev_person_id  TYPE PERSONID ,
ld_ev_bu_partner_guid  TYPE BU_PARTNER_GUID ,
ld_ev_username  TYPE SYUNAME ,
ld_et_employee_id  TYPE BPEMPLOYEET ,
ld_ev_name  TYPE EMNAM ,
ld_et_users  TYPE SWDTUSER ,
ld_et_employee_id_stat2  TYPE BPEMPLOYEE_STAT2_T .

DATA(ld_iv_person_id) = 'Check type of data required'.
DATA(ld_iv_bu_partner_guid) = 'Check type of data required'.
DATA(ld_iv_employee_id) = 'Check type of data required'.
DATA(ld_iv_username) = 'some text here'. . CALL FUNCTION 'BP_CENTRALPERSON_GET' * EXPORTING * iv_person_id = ld_iv_person_id * iv_bu_partner_guid = ld_iv_bu_partner_guid * iv_employee_id = ld_iv_employee_id * iv_username = ld_iv_username IMPORTING ev_person_id = ld_ev_person_id ev_bu_partner_guid = ld_ev_bu_partner_guid ev_username = ld_ev_username et_employee_id = ld_et_employee_id ev_name = ld_ev_name et_users = ld_et_users et_employee_id_stat2 = ld_et_employee_id_stat2 EXCEPTIONS NO_CENTRAL_PERSON = 1 NO_BUSINESS_PARTNER = 2 NO_ID = 3 . " BP_CENTRALPERSON_GET
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 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_ev_person_id  TYPE PERSONID ,
ld_iv_person_id  TYPE PERSONID ,
ld_ev_bu_partner_guid  TYPE BU_PARTNER_GUID ,
ld_iv_bu_partner_guid  TYPE BU_PARTNER_GUID ,
ld_ev_username  TYPE SYUNAME ,
ld_iv_employee_id  TYPE PERNR_D ,
ld_et_employee_id  TYPE BPEMPLOYEET ,
ld_iv_username  TYPE SYUNAME ,
ld_ev_name  TYPE EMNAM ,
ld_et_users  TYPE SWDTUSER ,
ld_et_employee_id_stat2  TYPE BPEMPLOYEE_STAT2_T .

ld_iv_person_id = 'some text here'.
ld_iv_bu_partner_guid = 'some text here'.
ld_iv_employee_id = 'some text here'.
ld_iv_username = '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 BP_CENTRALPERSON_GET or its description.