SAP HR_BG_GET_PERNR_NAME Function Module for Get pernr name









HR_BG_GET_PERNR_NAME is a standard hr bg get pernr name SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get pernr name 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 hr bg get pernr name FM, simply by entering the name HR_BG_GET_PERNR_NAME into the relevant SAP transaction such as SE37 or SE38.

Function Group: 3BG2
Program Name: SAPL3BG2
Main Program: SAPL3BG2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HR_BG_GET_PERNR_NAME 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_BG_GET_PERNR_NAME'"Get pernr name
EXPORTING
* I_PERNR = "Standard Selections for HR Master Data Reporting
* I_STATUTORY = ' ' "Names are used for statutory reporting
* I_REPID = ' ' "Name of current program
* I_BEGDA = "Start Date
* I_ENDDA = "End Date
* I_LANGU = SY-LANGU "Language Key
* I_MOLGA = 'BG' "Country Grouping
* I_NAMEL = "Length of the formatted employee's name
* I_PPINFTV = "Infotype view containing sec writing style
* I0002 = ' ' "HR Master Record: Infotype 0002 (Personal Data)
* I0021 = ' ' "HR Master Record: Infotype 0021 (Family)

IMPORTING
E_VORNA = "First Name
E_MIDNM = "Middle Name
E_NACHN = "Last Name
E_CNAME = "Complete Name
E_INITI = "Initials of Name
E_I0002 = "HR Master Record: Infotype 0002 (Personal Data)

EXCEPTIONS
INFTY_0002_NOT_FOUND = 1
.



IMPORTING Parameters details for HR_BG_GET_PERNR_NAME

I_PERNR - Standard Selections for HR Master Data Reporting

Data type: PERNR-PERNR
Optional: Yes
Call by Reference: Yes

I_STATUTORY - Names are used for statutory reporting

Data type: X_OR_SPACE
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_REPID - Name of current program

Data type: SY-REPID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BEGDA - Start Date

Data type: BEGDA
Optional: Yes
Call by Reference: Yes

I_ENDDA - End Date

Data type: ENDDA
Optional: Yes
Call by Reference: Yes

I_LANGU - Language Key

Data type: LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: Yes

I_MOLGA - Country Grouping

Data type: MOLGA
Default: 'BG'
Optional: Yes
Call by Reference: Yes

I_NAMEL - Length of the formatted employee's name

Data type: PAD_NAMEL
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PPINFTV - Infotype view containing sec writing style

Data type:
Optional: Yes
Call by Reference: No ( called with pass by value option)

I0002 - HR Master Record: Infotype 0002 (Personal Data)

Data type: P0002
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I0021 - HR Master Record: Infotype 0021 (Family)

Data type: P0021
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for HR_BG_GET_PERNR_NAME

E_VORNA - First Name

Data type:
Optional: No
Call by Reference: Yes

E_MIDNM - Middle Name

Data type:
Optional: No
Call by Reference: Yes

E_NACHN - Last Name

Data type:
Optional: No
Call by Reference: Yes

E_CNAME - Complete Name

Data type:
Optional: No
Call by Reference: Yes

E_INITI - Initials of Name

Data type:
Optional: No
Call by Reference: Yes

E_I0002 - HR Master Record: Infotype 0002 (Personal Data)

Data type: P0002
Optional: No
Call by Reference: Yes

EXCEPTIONS details

INFTY_0002_NOT_FOUND - Infotype 0002 is not found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for HR_BG_GET_PERNR_NAME 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_e_vorna  TYPE STRING, "   
lv_i_pernr  TYPE PERNR-PERNR, "   
lv_infty_0002_not_found  TYPE PERNR, "   
lv_i_statutory  TYPE X_OR_SPACE, "   SPACE
lv_i_repid  TYPE SY-REPID, "   SPACE
lv_e_midnm  TYPE SY, "   
lv_i_begda  TYPE BEGDA, "   
lv_e_nachn  TYPE BEGDA, "   
lv_i_endda  TYPE ENDDA, "   
lv_e_cname  TYPE ENDDA, "   
lv_i_langu  TYPE LANGU, "   SY-LANGU
lv_e_initi  TYPE LANGU, "   
lv_i_molga  TYPE MOLGA, "   'BG'
lv_e_i0002  TYPE P0002, "   
lv_i_namel  TYPE PAD_NAMEL, "   
lv_i_ppinftv  TYPE PAD_NAMEL, "   
lv_i0002  TYPE P0002, "   SPACE
lv_i0021  TYPE P0021. "   SPACE

  CALL FUNCTION 'HR_BG_GET_PERNR_NAME'  "Get pernr name
    EXPORTING
         I_PERNR = lv_i_pernr
         I_STATUTORY = lv_i_statutory
         I_REPID = lv_i_repid
         I_BEGDA = lv_i_begda
         I_ENDDA = lv_i_endda
         I_LANGU = lv_i_langu
         I_MOLGA = lv_i_molga
         I_NAMEL = lv_i_namel
         I_PPINFTV = lv_i_ppinftv
         I0002 = lv_i0002
         I0021 = lv_i0021
    IMPORTING
         E_VORNA = lv_e_vorna
         E_MIDNM = lv_e_midnm
         E_NACHN = lv_e_nachn
         E_CNAME = lv_e_cname
         E_INITI = lv_e_initi
         E_I0002 = lv_e_i0002
    EXCEPTIONS
        INFTY_0002_NOT_FOUND = 1
. " HR_BG_GET_PERNR_NAME




ABAP code using 7.40 inline data declarations to call FM HR_BG_GET_PERNR_NAME

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 PERNR INTO @DATA(ld_i_pernr).
 
 
DATA(ld_i_statutory) = ' '.
 
"SELECT single REPID FROM SY INTO @DATA(ld_i_repid).
DATA(ld_i_repid) = ' '.
 
 
 
 
 
 
DATA(ld_i_langu) = SY-LANGU.
 
 
DATA(ld_i_molga) = 'BG'.
 
 
 
 
DATA(ld_i0002) = ' '.
 
DATA(ld_i0021) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!