SAP Function Modules

HRAR_IND_SAC_VAC SAP Function module







HRAR_IND_SAC_VAC 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 HRAR_IND_SAC_VAC into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM HRAR_IND_SAC_VAC - HRAR IND SAC VAC





CALL FUNCTION 'HRAR_IND_SAC_VAC' "
  EXPORTING
    ind_hire_date =             " prel-begda
    ind_fire_date =             " prel-endda
    ind_hire_date_i0041 =       " prel-begda
    ind_tcses =                 " t7ar30-tcses
    ind_tegrp =                 " p0551-tegrp
    ind_coind =                 " p0551-coi01
    ind_lgart =                 " pc207-lgart
    aper_begda =                " prel-begda
    aper_endda =                " prel-endda
    aper_calcd =                "
    aper_payty =                " pc261-payty
    aper_pbegd =                " t549q-begda
    aper_pendd =                " t549q-endda
    aper_paper =                " pc261-fpper
    aper_iaper =                " pc261-inper
    pernr =                     " pernr
  TABLES
    ind_it =                    " pc207
    ind_ot =                    " pc207
    ind_wpbp =                  " pc205
    ind_p0551 =                 " p0551
    ind_aper =                  " pc26z
    ind_psp =                   " pc2ba
    ind_psp2 =                  " pc2ba
    rgdir =                     " pc267
    error_ptext =               " plog_text
    message_ptext =             " plog_text
  EXCEPTIONS
    ERROR_CALCULO = 1           "
    ERROR_FALTA_DATO = 2        "
    .  "  HRAR_IND_SAC_VAC

ABAP code example for Function Module HRAR_IND_SAC_VAC





The ABAP code below is a full code listing to execute function module HRAR_IND_SAC_VAC 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:
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_wpbp  TYPE STANDARD TABLE OF PC205,"TABLES PARAM
wa_ind_wpbp  LIKE LINE OF it_ind_wpbp ,
it_ind_p0551  TYPE STANDARD TABLE OF P0551,"TABLES PARAM
wa_ind_p0551  LIKE LINE OF it_ind_p0551 ,
it_ind_aper  TYPE STANDARD TABLE OF PC26Z,"TABLES PARAM
wa_ind_aper  LIKE LINE OF it_ind_aper ,
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_rgdir  TYPE STANDARD TABLE OF PC267,"TABLES PARAM
wa_rgdir  LIKE LINE OF it_rgdir ,
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 BEGDA
FROM PREL
INTO @DATA(ld_ind_hire_date).


SELECT single ENDDA
FROM PREL
INTO @DATA(ld_ind_fire_date).


SELECT single BEGDA
FROM PREL
INTO @DATA(ld_ind_hire_date_i0041).


SELECT single TCSES
FROM T7AR30
INTO @DATA(ld_ind_tcses).


DATA(ld_ind_tegrp) = some text here

DATA(ld_ind_coind) = some text here

DATA(ld_ind_lgart) = some text here

SELECT single BEGDA
FROM PREL
INTO @DATA(ld_aper_begda).


SELECT single ENDDA
FROM PREL
INTO @DATA(ld_aper_endda).

DATA(ld_aper_calcd) = 'some text here'.

DATA(ld_aper_payty) = some text here

SELECT single BEGDA
FROM T549Q
INTO @DATA(ld_aper_pbegd).


SELECT single ENDDA
FROM T549Q
INTO @DATA(ld_aper_pendd).


DATA(ld_aper_paper) = some text here

DATA(ld_aper_iaper) = some text here
DATA(ld_pernr) = '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.

"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_p0551 to it_ind_p0551.

"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_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_rgdir to it_rgdir.

"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 'HRAR_IND_SAC_VAC' EXPORTING ind_hire_date = ld_ind_hire_date ind_fire_date = ld_ind_fire_date ind_hire_date_i0041 = ld_ind_hire_date_i0041 ind_tcses = ld_ind_tcses ind_tegrp = ld_ind_tegrp ind_coind = ld_ind_coind ind_lgart = ld_ind_lgart aper_begda = ld_aper_begda aper_endda = ld_aper_endda aper_calcd = ld_aper_calcd aper_payty = ld_aper_payty aper_pbegd = ld_aper_pbegd aper_pendd = ld_aper_pendd aper_paper = ld_aper_paper aper_iaper = ld_aper_iaper pernr = ld_pernr TABLES ind_it = it_ind_it ind_ot = it_ind_ot ind_wpbp = it_ind_wpbp ind_p0551 = it_ind_p0551 ind_aper = it_ind_aper ind_psp = it_ind_psp ind_psp2 = it_ind_psp2 rgdir = it_rgdir error_ptext = it_error_ptext message_ptext = it_message_ptext EXCEPTIONS ERROR_CALCULO = 1 ERROR_FALTA_DATO = 2 . " HRAR_IND_SAC_VAC
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "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_ind_hire_date  TYPE PREL-BEGDA ,
it_ind_it  TYPE STANDARD TABLE OF PC207 ,
wa_ind_it  LIKE LINE OF it_ind_it,
ld_ind_fire_date  TYPE PREL-ENDDA ,
it_ind_ot  TYPE STANDARD TABLE OF PC207 ,
wa_ind_ot  LIKE LINE OF it_ind_ot,
ld_ind_hire_date_i0041  TYPE PREL-BEGDA ,
it_ind_wpbp  TYPE STANDARD TABLE OF PC205 ,
wa_ind_wpbp  LIKE LINE OF it_ind_wpbp,
ld_ind_tcses  TYPE T7AR30-TCSES ,
it_ind_p0551  TYPE STANDARD TABLE OF P0551 ,
wa_ind_p0551  LIKE LINE OF it_ind_p0551,
ld_ind_tegrp  TYPE P0551-TEGRP ,
it_ind_aper  TYPE STANDARD TABLE OF PC26Z ,
wa_ind_aper  LIKE LINE OF it_ind_aper,
ld_ind_coind  TYPE P0551-COI01 ,
it_ind_psp  TYPE STANDARD TABLE OF PC2BA ,
wa_ind_psp  LIKE LINE OF it_ind_psp,
ld_ind_lgart  TYPE PC207-LGART ,
it_ind_psp2  TYPE STANDARD TABLE OF PC2BA ,
wa_ind_psp2  LIKE LINE OF it_ind_psp2,
it_rgdir  TYPE STANDARD TABLE OF PC267 ,
wa_rgdir  LIKE LINE OF it_rgdir,
ld_aper_begda  TYPE PREL-BEGDA ,
it_error_ptext  TYPE STANDARD TABLE OF PLOG_TEXT ,
wa_error_ptext  LIKE LINE OF it_error_ptext,
ld_aper_endda  TYPE PREL-ENDDA ,
it_message_ptext  TYPE STANDARD TABLE OF PLOG_TEXT ,
wa_message_ptext  LIKE LINE OF it_message_ptext,
ld_aper_calcd  TYPE STRING ,
ld_aper_payty  TYPE PC261-PAYTY ,
ld_aper_pbegd  TYPE T549Q-BEGDA ,
ld_aper_pendd  TYPE T549Q-ENDDA ,
ld_aper_paper  TYPE PC261-FPPER ,
ld_aper_iaper  TYPE PC261-INPER ,
ld_pernr  TYPE PERNR .


SELECT single BEGDA
FROM PREL
INTO ld_ind_hire_date.


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

SELECT single ENDDA
FROM PREL
INTO ld_ind_fire_date.


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

SELECT single BEGDA
FROM PREL
INTO ld_ind_hire_date_i0041.


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

SELECT single TCSES
FROM T7AR30
INTO ld_ind_tcses.


"populate fields of struture and append to itab
append wa_ind_p0551 to it_ind_p0551.

ld_ind_tegrp = some text here

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

ld_ind_coind = some text here

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

ld_ind_lgart = some text here

"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_rgdir to it_rgdir.

SELECT single BEGDA
FROM PREL
INTO ld_aper_begda.


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

SELECT single ENDDA
FROM PREL
INTO ld_aper_endda.


"populate fields of struture and append to itab
append wa_message_ptext to it_message_ptext.
ld_aper_calcd = 'some text here'.

ld_aper_payty = some text here

SELECT single BEGDA
FROM T549Q
INTO ld_aper_pbegd.


SELECT single ENDDA
FROM T549Q
INTO ld_aper_pendd.


ld_aper_paper = some text here

ld_aper_iaper = some text here
ld_pernr = 'Check type of data required'.

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 HRAR_IND_SAC_VAC or its description.