SAP Function Modules

HRCO_TERM_SEVERANCE_INT_LSTYR SAP Function module







HRCO_TERM_SEVERANCE_INT_LSTYR is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name HRCO_TERM_SEVERANCE_INT_LSTYR into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: HRPADCOMTER
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM HRCO_TERM_SEVERANCE_INT_LSTYR - HRCO TERM SEVERANCE INT LSTYR





CALL FUNCTION 'HRCO_TERM_SEVERANCE_INT_LSTYR' "
  EXPORTING
    iv_eggrp =                  " t7co90-eggrp
    iv_tipte =                  " t7co90-tipte
    iv_coind =                  " t7co90-coind
    iv_hire_date =              " p0008-begda
    iv_fire_date =              " p0008-endda
    iv_lgart =                  " pc207-lgart
    iv_payroll =                " xfeld
    iv_aper_begda =             " pc2aper-begda
    iv_aper_endda =             " pc2aper-endda
*   iv_aper_iendd =             " pc2aper-iendd
*   iv_lgart_base =             " t7co90-lgart
*   iv_type_ee =                "
*   iv_divisor30 =              " c
*   iv_salary_act =             " pc207-betrg
*   iv_mxsal =                  " pc207-betrg
  IMPORTING
    ev_anzhl =                  " pc207-anzhl
    ev_betrg =                  " pc207-betrg
* TABLES
*   ind_rgdir =                 " pc261
*   ind_aper =                  " pc26z
*   ind_modif =                 " pc214
*   ind_wpbp =                  " pc205
*   ind_rt =                    " pc207
*   ind_crt =                   " pc208
*   ind_it =                    " pc207
*   ind_ot =                    " pc207
*   ind_lo =                    " pclo_lo
*   ind_psp =                   " pc2ba
*   ind_psp2 =                  " pc2ba
*   ind_coabs =                 " pc2co_abs
*   ind_cosev =                 " pc2co_sev
*   ind_coava =                 " pc2co_ava
*   ind_p0001 =                 " p0001
*   ind_p0045 =                 " p0045
*   ind_p0016 =                 " p0016
*   ind_p0834 =                 " p0834
*   ind_p0847 =                 " p0847
*   ind_t7co07 =                " t7co07
*   ind_t7co23 =                " t7co23
*   ind_t7co25 =                " t7co25
*   ind_t7co91 =                " t7co91
*   error_ptext =               " plog_text
*   message_ptext =             " plog_text
  EXCEPTIONS
    ERROR = 1                   "
    .  "  HRCO_TERM_SEVERANCE_INT_LSTYR

ABAP code example for Function Module HRCO_TERM_SEVERANCE_INT_LSTYR





The ABAP code below is a full code listing to execute function module HRCO_TERM_SEVERANCE_INT_LSTYR including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_ev_anzhl  TYPE PC207-ANZHL ,
ld_ev_betrg  TYPE PC207-BETRG ,
it_ind_rgdir  TYPE STANDARD TABLE OF PC261,"TABLES PARAM
wa_ind_rgdir  LIKE LINE OF it_ind_rgdir ,
it_ind_aper  TYPE STANDARD TABLE OF PC26Z,"TABLES PARAM
wa_ind_aper  LIKE LINE OF it_ind_aper ,
it_ind_modif  TYPE STANDARD TABLE OF PC214,"TABLES PARAM
wa_ind_modif  LIKE LINE OF it_ind_modif ,
it_ind_wpbp  TYPE STANDARD TABLE OF PC205,"TABLES PARAM
wa_ind_wpbp  LIKE LINE OF it_ind_wpbp ,
it_ind_rt  TYPE STANDARD TABLE OF PC207,"TABLES PARAM
wa_ind_rt  LIKE LINE OF it_ind_rt ,
it_ind_crt  TYPE STANDARD TABLE OF PC208,"TABLES PARAM
wa_ind_crt  LIKE LINE OF it_ind_crt ,
it_ind_it  TYPE STANDARD TABLE OF PC207,"TABLES PARAM
wa_ind_it  LIKE LINE OF it_ind_it ,
it_ind_ot  TYPE STANDARD TABLE OF PC207,"TABLES PARAM
wa_ind_ot  LIKE LINE OF it_ind_ot ,
it_ind_lo  TYPE STANDARD TABLE OF PCLO_LO,"TABLES PARAM
wa_ind_lo  LIKE LINE OF it_ind_lo ,
it_ind_psp  TYPE STANDARD TABLE OF PC2BA,"TABLES PARAM
wa_ind_psp  LIKE LINE OF it_ind_psp ,
it_ind_psp2  TYPE STANDARD TABLE OF PC2BA,"TABLES PARAM
wa_ind_psp2  LIKE LINE OF it_ind_psp2 ,
it_ind_coabs  TYPE STANDARD TABLE OF PC2CO_ABS,"TABLES PARAM
wa_ind_coabs  LIKE LINE OF it_ind_coabs ,
it_ind_cosev  TYPE STANDARD TABLE OF PC2CO_SEV,"TABLES PARAM
wa_ind_cosev  LIKE LINE OF it_ind_cosev ,
it_ind_coava  TYPE STANDARD TABLE OF PC2CO_AVA,"TABLES PARAM
wa_ind_coava  LIKE LINE OF it_ind_coava ,
it_ind_p0001  TYPE STANDARD TABLE OF P0001,"TABLES PARAM
wa_ind_p0001  LIKE LINE OF it_ind_p0001 ,
it_ind_p0045  TYPE STANDARD TABLE OF P0045,"TABLES PARAM
wa_ind_p0045  LIKE LINE OF it_ind_p0045 ,
it_ind_p0016  TYPE STANDARD TABLE OF P0016,"TABLES PARAM
wa_ind_p0016  LIKE LINE OF it_ind_p0016 ,
it_ind_p0834  TYPE STANDARD TABLE OF P0834,"TABLES PARAM
wa_ind_p0834  LIKE LINE OF it_ind_p0834 ,
it_ind_p0847  TYPE STANDARD TABLE OF P0847,"TABLES PARAM
wa_ind_p0847  LIKE LINE OF it_ind_p0847 ,
it_ind_t7co07  TYPE STANDARD TABLE OF T7CO07,"TABLES PARAM
wa_ind_t7co07  LIKE LINE OF it_ind_t7co07 ,
it_ind_t7co23  TYPE STANDARD TABLE OF T7CO23,"TABLES PARAM
wa_ind_t7co23  LIKE LINE OF it_ind_t7co23 ,
it_ind_t7co25  TYPE STANDARD TABLE OF T7CO25,"TABLES PARAM
wa_ind_t7co25  LIKE LINE OF it_ind_t7co25 ,
it_ind_t7co91  TYPE STANDARD TABLE OF T7CO91,"TABLES PARAM
wa_ind_t7co91  LIKE LINE OF it_ind_t7co91 ,
it_error_ptext  TYPE STANDARD TABLE OF PLOG_TEXT,"TABLES PARAM
wa_error_ptext  LIKE LINE OF it_error_ptext ,
it_message_ptext  TYPE STANDARD TABLE OF PLOG_TEXT,"TABLES PARAM
wa_message_ptext  LIKE LINE OF it_message_ptext .


SELECT single EGGRP
FROM T7CO90
INTO @DATA(ld_iv_eggrp).


SELECT single TIPTE
FROM T7CO90
INTO @DATA(ld_iv_tipte).


SELECT single COIND
FROM T7CO90
INTO @DATA(ld_iv_coind).


DATA(ld_iv_hire_date) = 20210129

DATA(ld_iv_fire_date) = 20210129

DATA(ld_iv_lgart) = some text here
DATA(ld_iv_payroll) = 'Check type of data required'.

DATA(ld_iv_aper_begda) = 20210129

DATA(ld_iv_aper_endda) = 20210129

DATA(ld_iv_aper_iendd) = 20210129

SELECT single LGART
FROM T7CO90
INTO @DATA(ld_iv_lgart_base).

DATA(ld_iv_type_ee) = 'some text here'.
DATA(ld_iv_divisor30) = 'Check type of data required'.

DATA(ld_iv_salary_act) = 20.50

DATA(ld_iv_mxsal) = 20.50

"populate fields of struture and append to itab
append wa_ind_rgdir to it_ind_rgdir.

"populate fields of struture and append to itab
append wa_ind_aper to it_ind_aper.

"populate fields of struture and append to itab
append wa_ind_modif to it_ind_modif.

"populate fields of struture and append to itab
append wa_ind_wpbp to it_ind_wpbp.

"populate fields of struture and append to itab
append wa_ind_rt to it_ind_rt.

"populate fields of struture and append to itab
append wa_ind_crt to it_ind_crt.

"populate fields of struture and append to itab
append wa_ind_it to it_ind_it.

"populate fields of struture and append to itab
append wa_ind_ot to it_ind_ot.

"populate fields of struture and append to itab
append wa_ind_lo to it_ind_lo.

"populate fields of struture and append to itab
append wa_ind_psp to it_ind_psp.

"populate fields of struture and append to itab
append wa_ind_psp2 to it_ind_psp2.

"populate fields of struture and append to itab
append wa_ind_coabs to it_ind_coabs.

"populate fields of struture and append to itab
append wa_ind_cosev to it_ind_cosev.

"populate fields of struture and append to itab
append wa_ind_coava to it_ind_coava.

"populate fields of struture and append to itab
append wa_ind_p0001 to it_ind_p0001.

"populate fields of struture and append to itab
append wa_ind_p0045 to it_ind_p0045.

"populate fields of struture and append to itab
append wa_ind_p0016 to it_ind_p0016.

"populate fields of struture and append to itab
append wa_ind_p0834 to it_ind_p0834.

"populate fields of struture and append to itab
append wa_ind_p0847 to it_ind_p0847.

"populate fields of struture and append to itab
append wa_ind_t7co07 to it_ind_t7co07.

"populate fields of struture and append to itab
append wa_ind_t7co23 to it_ind_t7co23.

"populate fields of struture and append to itab
append wa_ind_t7co25 to it_ind_t7co25.

"populate fields of struture and append to itab
append wa_ind_t7co91 to it_ind_t7co91.

"populate fields of struture and append to itab
append wa_error_ptext to it_error_ptext.

"populate fields of struture and append to itab
append wa_message_ptext to it_message_ptext. . CALL FUNCTION 'HRCO_TERM_SEVERANCE_INT_LSTYR' EXPORTING iv_eggrp = ld_iv_eggrp iv_tipte = ld_iv_tipte iv_coind = ld_iv_coind iv_hire_date = ld_iv_hire_date iv_fire_date = ld_iv_fire_date iv_lgart = ld_iv_lgart iv_payroll = ld_iv_payroll iv_aper_begda = ld_iv_aper_begda iv_aper_endda = ld_iv_aper_endda * iv_aper_iendd = ld_iv_aper_iendd * iv_lgart_base = ld_iv_lgart_base * iv_type_ee = ld_iv_type_ee * iv_divisor30 = ld_iv_divisor30 * iv_salary_act = ld_iv_salary_act * iv_mxsal = ld_iv_mxsal IMPORTING ev_anzhl = ld_ev_anzhl ev_betrg = ld_ev_betrg * TABLES * ind_rgdir = it_ind_rgdir * ind_aper = it_ind_aper * ind_modif = it_ind_modif * ind_wpbp = it_ind_wpbp * ind_rt = it_ind_rt * ind_crt = it_ind_crt * ind_it = it_ind_it * ind_ot = it_ind_ot * ind_lo = it_ind_lo * ind_psp = it_ind_psp * ind_psp2 = it_ind_psp2 * ind_coabs = it_ind_coabs * ind_cosev = it_ind_cosev * ind_coava = it_ind_coava * ind_p0001 = it_ind_p0001 * ind_p0045 = it_ind_p0045 * ind_p0016 = it_ind_p0016 * ind_p0834 = it_ind_p0834 * ind_p0847 = it_ind_p0847 * ind_t7co07 = it_ind_t7co07 * ind_t7co23 = it_ind_t7co23 * ind_t7co25 = it_ind_t7co25 * ind_t7co91 = it_ind_t7co91 * error_ptext = it_error_ptext * message_ptext = it_message_ptext EXCEPTIONS ERROR = 1 . " HRCO_TERM_SEVERANCE_INT_LSTYR
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_ev_anzhl  TYPE PC207-ANZHL ,
ld_iv_eggrp  TYPE T7CO90-EGGRP ,
it_ind_rgdir  TYPE STANDARD TABLE OF PC261 ,
wa_ind_rgdir  LIKE LINE OF it_ind_rgdir,
ld_ev_betrg  TYPE PC207-BETRG ,
ld_iv_tipte  TYPE T7CO90-TIPTE ,
it_ind_aper  TYPE STANDARD TABLE OF PC26Z ,
wa_ind_aper  LIKE LINE OF it_ind_aper,
ld_iv_coind  TYPE T7CO90-COIND ,
it_ind_modif  TYPE STANDARD TABLE OF PC214 ,
wa_ind_modif  LIKE LINE OF it_ind_modif,
ld_iv_hire_date  TYPE P0008-BEGDA ,
it_ind_wpbp  TYPE STANDARD TABLE OF PC205 ,
wa_ind_wpbp  LIKE LINE OF it_ind_wpbp,
it_ind_rt  TYPE STANDARD TABLE OF PC207 ,
wa_ind_rt  LIKE LINE OF it_ind_rt,
ld_iv_fire_date  TYPE P0008-ENDDA ,
ld_iv_lgart  TYPE PC207-LGART ,
it_ind_crt  TYPE STANDARD TABLE OF PC208 ,
wa_ind_crt  LIKE LINE OF it_ind_crt,
ld_iv_payroll  TYPE XFELD ,
it_ind_it  TYPE STANDARD TABLE OF PC207 ,
wa_ind_it  LIKE LINE OF it_ind_it,
it_ind_ot  TYPE STANDARD TABLE OF PC207 ,
wa_ind_ot  LIKE LINE OF it_ind_ot,
ld_iv_aper_begda  TYPE PC2APER-BEGDA ,
it_ind_lo  TYPE STANDARD TABLE OF PCLO_LO ,
wa_ind_lo  LIKE LINE OF it_ind_lo,
ld_iv_aper_endda  TYPE PC2APER-ENDDA ,
it_ind_psp  TYPE STANDARD TABLE OF PC2BA ,
wa_ind_psp  LIKE LINE OF it_ind_psp,
ld_iv_aper_iendd  TYPE PC2APER-IENDD ,
it_ind_psp2  TYPE STANDARD TABLE OF PC2BA ,
wa_ind_psp2  LIKE LINE OF it_ind_psp2,
ld_iv_lgart_base  TYPE T7CO90-LGART ,
ld_iv_type_ee  TYPE STRING ,
it_ind_coabs  TYPE STANDARD TABLE OF PC2CO_ABS ,
wa_ind_coabs  LIKE LINE OF it_ind_coabs,
ld_iv_divisor30  TYPE C ,
it_ind_cosev  TYPE STANDARD TABLE OF PC2CO_SEV ,
wa_ind_cosev  LIKE LINE OF it_ind_cosev,
ld_iv_salary_act  TYPE PC207-BETRG ,
it_ind_coava  TYPE STANDARD TABLE OF PC2CO_AVA ,
wa_ind_coava  LIKE LINE OF it_ind_coava,
ld_iv_mxsal  TYPE PC207-BETRG ,
it_ind_p0001  TYPE STANDARD TABLE OF P0001 ,
wa_ind_p0001  LIKE LINE OF it_ind_p0001,
it_ind_p0045  TYPE STANDARD TABLE OF P0045 ,
wa_ind_p0045  LIKE LINE OF it_ind_p0045,
it_ind_p0016  TYPE STANDARD TABLE OF P0016 ,
wa_ind_p0016  LIKE LINE OF it_ind_p0016,
it_ind_p0834  TYPE STANDARD TABLE OF P0834 ,
wa_ind_p0834  LIKE LINE OF it_ind_p0834,
it_ind_p0847  TYPE STANDARD TABLE OF P0847 ,
wa_ind_p0847  LIKE LINE OF it_ind_p0847,
it_ind_t7co07  TYPE STANDARD TABLE OF T7CO07 ,
wa_ind_t7co07  LIKE LINE OF it_ind_t7co07,
it_ind_t7co23  TYPE STANDARD TABLE OF T7CO23 ,
wa_ind_t7co23  LIKE LINE OF it_ind_t7co23,
it_ind_t7co25  TYPE STANDARD TABLE OF T7CO25 ,
wa_ind_t7co25  LIKE LINE OF it_ind_t7co25,
it_ind_t7co91  TYPE STANDARD TABLE OF T7CO91 ,
wa_ind_t7co91  LIKE LINE OF it_ind_t7co91,
it_error_ptext  TYPE STANDARD TABLE OF PLOG_TEXT ,
wa_error_ptext  LIKE LINE OF it_error_ptext,
it_message_ptext  TYPE STANDARD TABLE OF PLOG_TEXT ,
wa_message_ptext  LIKE LINE OF it_message_ptext.


SELECT single EGGRP
FROM T7CO90
INTO ld_iv_eggrp.


"populate fields of struture and append to itab
append wa_ind_rgdir to it_ind_rgdir.

SELECT single TIPTE
FROM T7CO90
INTO ld_iv_tipte.


"populate fields of struture and append to itab
append wa_ind_aper to it_ind_aper.

SELECT single COIND
FROM T7CO90
INTO ld_iv_coind.


"populate fields of struture and append to itab
append wa_ind_modif to it_ind_modif.

ld_iv_hire_date = 20210129

"populate fields of struture and append to itab
append wa_ind_wpbp to it_ind_wpbp.

"populate fields of struture and append to itab
append wa_ind_rt to it_ind_rt.

ld_iv_fire_date = 20210129

ld_iv_lgart = some text here

"populate fields of struture and append to itab
append wa_ind_crt to it_ind_crt.
ld_iv_payroll = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ind_it to it_ind_it.

"populate fields of struture and append to itab
append wa_ind_ot to it_ind_ot.

ld_iv_aper_begda = 20210129

"populate fields of struture and append to itab
append wa_ind_lo to it_ind_lo.

ld_iv_aper_endda = 20210129

"populate fields of struture and append to itab
append wa_ind_psp to it_ind_psp.

ld_iv_aper_iendd = 20210129

"populate fields of struture and append to itab
append wa_ind_psp2 to it_ind_psp2.

SELECT single LGART
FROM T7CO90
INTO ld_iv_lgart_base.

ld_iv_type_ee = 'some text here'.

"populate fields of struture and append to itab
append wa_ind_coabs to it_ind_coabs.
ld_iv_divisor30 = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ind_cosev to it_ind_cosev.

ld_iv_salary_act = 20.50

"populate fields of struture and append to itab
append wa_ind_coava to it_ind_coava.

ld_iv_mxsal = 20.50

"populate fields of struture and append to itab
append wa_ind_p0001 to it_ind_p0001.

"populate fields of struture and append to itab
append wa_ind_p0045 to it_ind_p0045.

"populate fields of struture and append to itab
append wa_ind_p0016 to it_ind_p0016.

"populate fields of struture and append to itab
append wa_ind_p0834 to it_ind_p0834.

"populate fields of struture and append to itab
append wa_ind_p0847 to it_ind_p0847.

"populate fields of struture and append to itab
append wa_ind_t7co07 to it_ind_t7co07.

"populate fields of struture and append to itab
append wa_ind_t7co23 to it_ind_t7co23.

"populate fields of struture and append to itab
append wa_ind_t7co25 to it_ind_t7co25.

"populate fields of struture and append to itab
append wa_ind_t7co91 to it_ind_t7co91.

"populate fields of struture and append to itab
append wa_error_ptext to it_error_ptext.

"populate fields of struture and append to itab
append wa_message_ptext to it_message_ptext.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name HRCO_TERM_SEVERANCE_INT_LSTYR or its description.