SAP TRG_EXPORT_DATA_ABSENCE Function Module for









TRG_EXPORT_DATA_ABSENCE is a standard trg export data absence 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 trg export data absence FM, simply by entering the name TRG_EXPORT_DATA_ABSENCE into the relevant SAP transaction such as SE37 or SE38.

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



Function TRG_EXPORT_DATA_ABSENCE 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 'TRG_EXPORT_DATA_ABSENCE'"
EXPORTING
EMPLOYEENUMBER = "Personnel Number
P_HEAD = "Header Data
P_PERIO = "Period Data
ADAPT_PARALLEL_TRIPS = "
ENDE_TRENNUNGSREISEGELD = "Start Date of Trip Segment
DISPLAY_MODUS = "Display Mode
LAND = "Identification of Country or Federal State
TG_ANL = "
* ABW_ZUHAUSE = "

TABLES
DESTINATIONS = "Stopover
* BEIH_TAG_ABWH = "
* P_BELEG = "
* P_EXBEL = "

EXCEPTIONS
TABLE_PERIO_READ_ERROR = 1 TABLE_CREATE_ERROR = 2
.



IMPORTING Parameters details for TRG_EXPORT_DATA_ABSENCE

EMPLOYEENUMBER - Personnel Number

Data type: PTP42-PERNR
Optional: No
Call by Reference: Yes

P_HEAD - Header Data

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

P_PERIO - Period Data

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

ADAPT_PARALLEL_TRIPS -

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

ENDE_TRENNUNGSREISEGELD - Start Date of Trip Segment

Data type: PTP42-PDATV
Optional: No
Call by Reference: Yes

DISPLAY_MODUS - Display Mode

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

LAND - Identification of Country or Federal State

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

TG_ANL -

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

ABW_ZUHAUSE -

Data type: I
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for TRG_EXPORT_DATA_ABSENCE

DESTINATIONS - Stopover

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

BEIH_TAG_ABWH -

Data type: PTRV_BEIH_TAG
Optional: Yes
Call by Reference: Yes

P_BELEG -

Data type: PTK03
Optional: Yes
Call by Reference: Yes

P_EXBEL -

Data type: PTK33
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

TABLE_PERIO_READ_ERROR -

Data type:
Optional: No
Call by Reference: Yes

TABLE_CREATE_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TRG_EXPORT_DATA_ABSENCE 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:
lt_destinations  TYPE STANDARD TABLE OF PTK05, "   
lv_employeenumber  TYPE PTP42-PERNR, "   
lv_table_perio_read_error  TYPE PTP42, "   
lv_p_head  TYPE PTP02, "   
lt_beih_tag_abwh  TYPE STANDARD TABLE OF PTRV_BEIH_TAG, "   
lv_table_create_error  TYPE PTRV_BEIH_TAG, "   
lt_p_beleg  TYPE STANDARD TABLE OF PTK03, "   
lv_p_perio  TYPE PTP42, "   
lt_p_exbel  TYPE STANDARD TABLE OF PTK33, "   
lv_adapt_parallel_trips  TYPE C, "   
lv_ende_trennungsreisegeld  TYPE PTP42-PDATV, "   
lv_display_modus  TYPE C, "   
lv_land  TYPE PTRVPS_LAND, "   
lv_tg_anl  TYPE C, "   
lv_abw_zuhause  TYPE I. "   

  CALL FUNCTION 'TRG_EXPORT_DATA_ABSENCE'  "
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         P_HEAD = lv_p_head
         P_PERIO = lv_p_perio
         ADAPT_PARALLEL_TRIPS = lv_adapt_parallel_trips
         ENDE_TRENNUNGSREISEGELD = lv_ende_trennungsreisegeld
         DISPLAY_MODUS = lv_display_modus
         LAND = lv_land
         TG_ANL = lv_tg_anl
         ABW_ZUHAUSE = lv_abw_zuhause
    TABLES
         DESTINATIONS = lt_destinations
         BEIH_TAG_ABWH = lt_beih_tag_abwh
         P_BELEG = lt_p_beleg
         P_EXBEL = lt_p_exbel
    EXCEPTIONS
        TABLE_PERIO_READ_ERROR = 1
        TABLE_CREATE_ERROR = 2
. " TRG_EXPORT_DATA_ABSENCE




ABAP code using 7.40 inline data declarations to call FM TRG_EXPORT_DATA_ABSENCE

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 PTP42 INTO @DATA(ld_employeenumber).
 
 
 
 
 
 
 
 
 
"SELECT single PDATV FROM PTP42 INTO @DATA(ld_ende_trennungsreisegeld).
 
 
 
 
 


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!