SAP HR_E_GET_CONTRACT_DURATION Function Module for
HR_E_GET_CONTRACT_DURATION is a standard hr e get contract duration 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 e get contract duration FM, simply by entering the name HR_E_GET_CONTRACT_DURATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: 34CS
Program Name: SAPL34CS
Main Program: SAPL34CS
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function HR_E_GET_CONTRACT_DURATION 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_E_GET_CONTRACT_DURATION'".
EXPORTING
* P_PERNR = "
P_DATE = "
* P_LESS_EXCLUDING_YEAR = "
IMPORTING
P_UNLIMITED = "
P_BEGDA = "
P_ENDDA = "
P_LESS_ONE_YEAR = "
TABLES
* T0000 = "
* T0016 = "
* T0061 = "
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for HR_E_GET_CONTRACT_DURATION
P_PERNR -
Data type: PERNR-PERNROptional: Yes
Call by Reference: No ( called with pass by value option)
P_DATE -
Data type: PREL-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
P_LESS_EXCLUDING_YEAR -
Data type: PES_XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_E_GET_CONTRACT_DURATION
P_UNLIMITED -
Data type: PES_XFELDOptional: No
Call by Reference: No ( called with pass by value option)
P_BEGDA -
Data type: PREL-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
P_ENDDA -
Data type: PREL-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
P_LESS_ONE_YEAR -
Data type: PES_XFELDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HR_E_GET_CONTRACT_DURATION
T0000 -
Data type: P0000Optional: Yes
Call by Reference: No ( called with pass by value option)
T0016 -
Data type: P0016Optional: Yes
Call by Reference: No ( called with pass by value option)
T0061 -
Data type: P0061Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_E_GET_CONTRACT_DURATION 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_error | TYPE STRING, " | |||
lt_t0000 | TYPE STANDARD TABLE OF P0000, " | |||
lv_p_pernr | TYPE PERNR-PERNR, " | |||
lv_p_unlimited | TYPE PES_XFELD, " | |||
lt_t0016 | TYPE STANDARD TABLE OF P0016, " | |||
lv_p_date | TYPE PREL-BEGDA, " | |||
lv_p_begda | TYPE PREL-BEGDA, " | |||
lt_t0061 | TYPE STANDARD TABLE OF P0061, " | |||
lv_p_endda | TYPE PREL-ENDDA, " | |||
lv_p_less_excluding_year | TYPE PES_XFELD, " | |||
lv_p_less_one_year | TYPE PES_XFELD. " |
  CALL FUNCTION 'HR_E_GET_CONTRACT_DURATION' " |
EXPORTING | ||
P_PERNR | = lv_p_pernr | |
P_DATE | = lv_p_date | |
P_LESS_EXCLUDING_YEAR | = lv_p_less_excluding_year | |
IMPORTING | ||
P_UNLIMITED | = lv_p_unlimited | |
P_BEGDA | = lv_p_begda | |
P_ENDDA | = lv_p_endda | |
P_LESS_ONE_YEAR | = lv_p_less_one_year | |
TABLES | ||
T0000 | = lt_t0000 | |
T0016 | = lt_t0016 | |
T0061 | = lt_t0061 | |
EXCEPTIONS | ||
ERROR = 1 | ||
. " HR_E_GET_CONTRACT_DURATION |
ABAP code using 7.40 inline data declarations to call FM HR_E_GET_CONTRACT_DURATION
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_p_pernr). | ||||
"SELECT single BEGDA FROM PREL INTO @DATA(ld_p_date). | ||||
"SELECT single BEGDA FROM PREL INTO @DATA(ld_p_begda). | ||||
"SELECT single ENDDA FROM PREL INTO @DATA(ld_p_endda). | ||||
Search for further information about these or an SAP related objects