SAP HR_BR_CONSTRUCT_KEY_DATE Function Module for









HR_BR_CONSTRUCT_KEY_DATE is a standard hr br construct key date SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 br construct key date FM, simply by entering the name HR_BR_CONSTRUCT_KEY_DATE into the relevant SAP transaction such as SE37 or SE38.

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



Function HR_BR_CONSTRUCT_KEY_DATE 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_BR_CONSTRUCT_KEY_DATE'"
EXPORTING
* PERIOD_MODIFIER = '01' "
* PAYROLL_YEAR = SY-DATUM(4) "
* PAYROLL_PERIOD = SY-DATUM+4(2) "
* SW_LOG = ' ' "

IMPORTING
KEY_DATE = "
END_KEY_DATE = "

EXCEPTIONS
PERIOD_NOT_FOUND = 1 INVALID_DATE = 2 ERROR = 3
.



IMPORTING Parameters details for HR_BR_CONSTRUCT_KEY_DATE

PERIOD_MODIFIER -

Data type: PERMO
Default: '01'
Optional: Yes
Call by Reference: Yes

PAYROLL_YEAR -

Data type: PABRJ
Default: SY-DATUM(4)
Optional: Yes
Call by Reference: Yes

PAYROLL_PERIOD -

Data type: PABRP
Default: SY-DATUM+4(2)
Optional: Yes
Call by Reference: Yes

SW_LOG -

Data type: XFLAG
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for HR_BR_CONSTRUCT_KEY_DATE

KEY_DATE -

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

END_KEY_DATE -

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

EXCEPTIONS details

PERIOD_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

INVALID_DATE -

Data type:
Optional: No
Call by Reference: Yes

ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for HR_BR_CONSTRUCT_KEY_DATE 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_key_date  TYPE D, "   
lv_period_modifier  TYPE PERMO, "   '01'
lv_period_not_found  TYPE PERMO, "   
lv_end_key_date  TYPE D, "   
lv_invalid_date  TYPE D, "   
lv_payroll_year  TYPE PABRJ, "   SY-DATUM(4)
lv_error  TYPE PABRJ, "   
lv_payroll_period  TYPE PABRP, "   SY-DATUM+4(2)
lv_sw_log  TYPE XFLAG. "   SPACE

  CALL FUNCTION 'HR_BR_CONSTRUCT_KEY_DATE'  "
    EXPORTING
         PERIOD_MODIFIER = lv_period_modifier
         PAYROLL_YEAR = lv_payroll_year
         PAYROLL_PERIOD = lv_payroll_period
         SW_LOG = lv_sw_log
    IMPORTING
         KEY_DATE = lv_key_date
         END_KEY_DATE = lv_end_key_date
    EXCEPTIONS
        PERIOD_NOT_FOUND = 1
        INVALID_DATE = 2
        ERROR = 3
. " HR_BR_CONSTRUCT_KEY_DATE




ABAP code using 7.40 inline data declarations to call FM HR_BR_CONSTRUCT_KEY_DATE

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.

 
DATA(ld_period_modifier) = '01'.
 
 
 
 
DATA(ld_payroll_year) = SY-DATUM.
 
 
DATA(ld_payroll_period) = SY-DATUM+4.
 
DATA(ld_sw_log) = ' '.
 


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!