SAP TRG_EXPORT_DATA_DAILY_RETURN Function Module for









TRG_EXPORT_DATA_DAILY_RETURN is a standard trg export data daily return 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 daily return FM, simply by entering the name TRG_EXPORT_DATA_DAILY_RETURN 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_DAILY_RETURN 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_DAILY_RETURN'"
EXPORTING
P_HEAD = "Structure of Travel Expenses Table PTRV_HEAD
PKWKL = "Vehicle Class
AZMIT = "Number of Passengers
DISPLAY_MODUS = "Display Mode
TG_ANL = "
P_PERIO = "
NR_OF_MEALS = "
NR_OF_OVERNIGHTS = "
DOPP_ANZAHL = "Daily Return: No. of Days with Outb. and Return Trip
ABF_ANK_ZU_HAUSE = "Number of Days with Round Trip from Home
EINF_ANZAHL = "Daily Return: No. of Days only with Outb./ or Return Trip
ENTFERNUNG = "Daily Return: Distance fr. Residence to New Place of Work
KZPMF = "Vehicle Type
.



IMPORTING Parameters details for TRG_EXPORT_DATA_DAILY_RETURN

P_HEAD - Structure of Travel Expenses Table PTRV_HEAD

Data type: PTP02
Optional: No
Call by Reference: No ( called with pass by value option)

PKWKL - Vehicle Class

Data type: PTP68-PKWKL
Optional: No
Call by Reference: Yes

AZMIT - Number of Passengers

Data type: PTP68-AZMIT
Optional: No
Call by Reference: Yes

DISPLAY_MODUS - Display Mode

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

TG_ANL -

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

P_PERIO -

Data type: PTP42
Optional: No
Call by Reference: No ( called with pass by value option)

NR_OF_MEALS -

Data type: N
Optional: No
Call by Reference: No ( called with pass by value option)

NR_OF_OVERNIGHTS -

Data type: N
Optional: No
Call by Reference: No ( called with pass by value option)

DOPP_ANZAHL - Daily Return: No. of Days with Outb. and Return Trip

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

ABF_ANK_ZU_HAUSE - Number of Days with Round Trip from Home

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

EINF_ANZAHL - Daily Return: No. of Days only with Outb./ or Return Trip

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

ENTFERNUNG - Daily Return: Distance fr. Residence to New Place of Work

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

KZPMF - Vehicle Type

Data type: PTP68-KZPMF
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TRG_EXPORT_DATA_DAILY_RETURN 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_p_head  TYPE PTP02, "   
lv_pkwkl  TYPE PTP68-PKWKL, "   
lv_azmit  TYPE PTP68-AZMIT, "   
lv_display_modus  TYPE C, "   
lv_tg_anl  TYPE C, "   
lv_p_perio  TYPE PTP42, "   
lv_nr_of_meals  TYPE N, "   
lv_nr_of_overnights  TYPE N, "   
lv_dopp_anzahl  TYPE PTP42-TR_DOPP_ANZAHL, "   
lv_abf_ank_zu_hause  TYPE PTP42-TR_DOPP_ANZAHL, "   
lv_einf_anzahl  TYPE PTP42-TR_EINF_ANZAHL, "   
lv_entfernung  TYPE PTP42-TR_ENTFERNUNG, "   
lv_kzpmf  TYPE PTP68-KZPMF. "   

  CALL FUNCTION 'TRG_EXPORT_DATA_DAILY_RETURN'  "
    EXPORTING
         P_HEAD = lv_p_head
         PKWKL = lv_pkwkl
         AZMIT = lv_azmit
         DISPLAY_MODUS = lv_display_modus
         TG_ANL = lv_tg_anl
         P_PERIO = lv_p_perio
         NR_OF_MEALS = lv_nr_of_meals
         NR_OF_OVERNIGHTS = lv_nr_of_overnights
         DOPP_ANZAHL = lv_dopp_anzahl
         ABF_ANK_ZU_HAUSE = lv_abf_ank_zu_hause
         EINF_ANZAHL = lv_einf_anzahl
         ENTFERNUNG = lv_entfernung
         KZPMF = lv_kzpmf
. " TRG_EXPORT_DATA_DAILY_RETURN




ABAP code using 7.40 inline data declarations to call FM TRG_EXPORT_DATA_DAILY_RETURN

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 PKWKL FROM PTP68 INTO @DATA(ld_pkwkl).
 
"SELECT single AZMIT FROM PTP68 INTO @DATA(ld_azmit).
 
 
 
 
 
 
"SELECT single TR_DOPP_ANZAHL FROM PTP42 INTO @DATA(ld_dopp_anzahl).
 
"SELECT single TR_DOPP_ANZAHL FROM PTP42 INTO @DATA(ld_abf_ank_zu_hause).
 
"SELECT single TR_EINF_ANZAHL FROM PTP42 INTO @DATA(ld_einf_anzahl).
 
"SELECT single TR_ENTFERNUNG FROM PTP42 INTO @DATA(ld_entfernung).
 
"SELECT single KZPMF FROM PTP68 INTO @DATA(ld_kzpmf).
 


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!