SAP HRCO_TERMINATION_DATA Function Module for
HRCO_TERMINATION_DATA is a standard hrco termination data 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 hrco termination data FM, simply by entering the name HRCO_TERMINATION_DATA into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPADCOMSEV_FUNC
Program Name: SAPLHRPADCOMSEV_FUNC
Main Program: SAPLHRPADCOMSEV_FUNC
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HRCO_TERMINATION_DATA 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 'HRCO_TERMINATION_DATA'".
EXPORTING
TD_PERNR = "
* TD_BEGDA = 18000101 "
* TD_ENDDA = 99991231 "
CHANGING
* TD_HIRING_DATE = 00000000 "
* TD_FIRING_DATE = 00000000 "
* MASSN = "
* MASSG = "
* REHIRE = "
IMPORTING Parameters details for HRCO_TERMINATION_DATA
TD_PERNR -
Data type: P0847-PERNROptional: No
Call by Reference: No ( called with pass by value option)
TD_BEGDA -
Data type: PREL-BEGDADefault: 18000101
Optional: Yes
Call by Reference: No ( called with pass by value option)
TD_ENDDA -
Data type: PREL-ENDDADefault: 99991231
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for HRCO_TERMINATION_DATA
TD_HIRING_DATE -
Data type: PREL-BEGDADefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
TD_FIRING_DATE -
Data type: PREL-ENDDADefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
MASSN -
Data type: P0000-MASSNOptional: Yes
Call by Reference: No ( called with pass by value option)
MASSG -
Data type: P0000-MASSGOptional: Yes
Call by Reference: No ( called with pass by value option)
REHIRE -
Data type: DATUMOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HRCO_TERMINATION_DATA 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_td_pernr | TYPE P0847-PERNR, " | |||
| lv_td_hiring_date | TYPE PREL-BEGDA, " 00000000 | |||
| lv_td_begda | TYPE PREL-BEGDA, " 18000101 | |||
| lv_td_firing_date | TYPE PREL-ENDDA, " 00000000 | |||
| lv_massn | TYPE P0000-MASSN, " | |||
| lv_td_endda | TYPE PREL-ENDDA, " 99991231 | |||
| lv_massg | TYPE P0000-MASSG, " | |||
| lv_rehire | TYPE DATUM. " |
|   CALL FUNCTION 'HRCO_TERMINATION_DATA' " |
| EXPORTING | ||
| TD_PERNR | = lv_td_pernr | |
| TD_BEGDA | = lv_td_begda | |
| TD_ENDDA | = lv_td_endda | |
| CHANGING | ||
| TD_HIRING_DATE | = lv_td_hiring_date | |
| TD_FIRING_DATE | = lv_td_firing_date | |
| MASSN | = lv_massn | |
| MASSG | = lv_massg | |
| REHIRE | = lv_rehire | |
| . " HRCO_TERMINATION_DATA | ||
ABAP code using 7.40 inline data declarations to call FM HRCO_TERMINATION_DATA
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 P0847 INTO @DATA(ld_td_pernr). | ||||
| "SELECT single BEGDA FROM PREL INTO @DATA(ld_td_hiring_date). | ||||
| DATA(ld_td_hiring_date) | = 00000000. | |||
| "SELECT single BEGDA FROM PREL INTO @DATA(ld_td_begda). | ||||
| DATA(ld_td_begda) | = 18000101. | |||
| "SELECT single ENDDA FROM PREL INTO @DATA(ld_td_firing_date). | ||||
| DATA(ld_td_firing_date) | = 00000000. | |||
| "SELECT single MASSN FROM P0000 INTO @DATA(ld_massn). | ||||
| "SELECT single ENDDA FROM PREL INTO @DATA(ld_td_endda). | ||||
| DATA(ld_td_endda) | = 99991231. | |||
| "SELECT single MASSG FROM P0000 INTO @DATA(ld_massg). | ||||
Search for further information about these or an SAP related objects