SAP HR_NO_GET_YRKE Function Module for Determine the professional code of an employee









HR_NO_GET_YRKE is a standard hr no get yrke SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine the professional code of an employee 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 no get yrke FM, simply by entering the name HR_NO_GET_YRKE into the relevant SAP transaction such as SE37 or SE38.

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



Function HR_NO_GET_YRKE 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_NO_GET_YRKE'"Determine the professional code of an employee
EXPORTING
PERNR = "Personnel Number
* BEGDA = '19000101' "Start Date
* ENDDA = '99991231' "End Date

IMPORTING
SUBRC = "Return Value, Return Value After ABAP Statements

TABLES
* I0001 = "HR Master Record: Infotype 0001 (Org. Assignment)
* I0033 = "Infotype 0033: Statistics Exceptions
* I0509 = "HR-AU-PS: Master Data (Higher Duty Allowance)
YRKE_TAB = "Structure for storing Norwegian occupational codes
ERROR_TAB = "Transfer table for HR error handling
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLHR_NO_AA_REGISTER_001 HR-NO: Flexible handling of worktime

IMPORTING Parameters details for HR_NO_GET_YRKE

PERNR - Personnel Number

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

BEGDA - Start Date

Data type: P0001-BEGDA
Default: '19000101'
Optional: Yes
Call by Reference: Yes

ENDDA - End Date

Data type: P0001-ENDDA
Default: '99991231'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for HR_NO_GET_YRKE

SUBRC - Return Value, Return Value After ABAP Statements

Data type: SY-SUBRC
Optional: No
Call by Reference: Yes

TABLES Parameters details for HR_NO_GET_YRKE

I0001 - HR Master Record: Infotype 0001 (Org. Assignment)

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

I0033 - Infotype 0033: Statistics Exceptions

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

I0509 - HR-AU-PS: Master Data (Higher Duty Allowance)

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

YRKE_TAB - Structure for storing Norwegian occupational codes

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

ERROR_TAB - Transfer table for HR error handling

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

Copy and paste ABAP code example for HR_NO_GET_YRKE 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:
lt_i0001  TYPE STANDARD TABLE OF P0001, "   
lv_pernr  TYPE P0001-PERNR, "   
lv_subrc  TYPE SY-SUBRC, "   
lv_begda  TYPE P0001-BEGDA, "   '19000101'
lt_i0033  TYPE STANDARD TABLE OF P0033, "   
lv_endda  TYPE P0001-ENDDA, "   '99991231'
lt_i0509  TYPE STANDARD TABLE OF P0509, "   
lt_yrke_tab  TYPE STANDARD TABLE OF P20_YRKE_LINE, "   
lt_error_tab  TYPE STANDARD TABLE OF HRERROR. "   

  CALL FUNCTION 'HR_NO_GET_YRKE'  "Determine the professional code of an employee
    EXPORTING
         PERNR = lv_pernr
         BEGDA = lv_begda
         ENDDA = lv_endda
    IMPORTING
         SUBRC = lv_subrc
    TABLES
         I0001 = lt_i0001
         I0033 = lt_i0033
         I0509 = lt_i0509
         YRKE_TAB = lt_yrke_tab
         ERROR_TAB = lt_error_tab
. " HR_NO_GET_YRKE




ABAP code using 7.40 inline data declarations to call FM HR_NO_GET_YRKE

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 P0001 INTO @DATA(ld_pernr).
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_subrc).
 
"SELECT single BEGDA FROM P0001 INTO @DATA(ld_begda).
DATA(ld_begda) = '19000101'.
 
 
"SELECT single ENDDA FROM P0001 INTO @DATA(ld_endda).
DATA(ld_endda) = '99991231'.
 
 
 
 


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!