SAP PTRV_TRIP_CHAIN_UPDATE Function Module for
PTRV_TRIP_CHAIN_UPDATE is a standard ptrv trip chain update 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 ptrv trip chain update FM, simply by entering the name PTRV_TRIP_CHAIN_UPDATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FITV_RCUR_DEST
Program Name: SAPLFITV_RCUR_DEST
Main Program: SAPLFITV_RCUR_DEST
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function PTRV_TRIP_CHAIN_UPDATE 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 'PTRV_TRIP_CHAIN_UPDATE'".
EXPORTING
WA_HEAD = "Structure of Travel Expenses Table PTRV_HEAD
WA_PERIO = "Structure of Transp. Table PTRV_PERIO
* I_SIMULATION = ' ' "
* NEW_HEAD = "
* OLD_PERIO = "
* IT_MODIFIED_CHAIN_ENTRIES = "
* IT_DELETED_CHAIN_ENTRIES = "
* IT_INPUT_DESTINATIONS = "Address Data Entered as Part of Trip Chain
IMPORTING
WA_HEAD_CHANGED = "
TRIP_NOT_COMPL_TRANSF = "TE key for trip data
CHANGED_ACT_TRIP = "
CHANGED_DIFF_TRIPS = "
MOVE_DEST = "
ET_DELETED_CHAIN_ENTRIES = "
TABLES
ZIEL = "Stopover
* ET_TRIP_CHAIN_REROL = "
* ET_TRIP_CHAIN = "
* DEST_NR_PD_NR_OV = "Number of Meals Per Diems/Accomm. Per Diems per Destination
* ABZUG = "Deductions Due to Gratuitous Entertainment
* KONTI = "
* KOSTR = "
* KOSTZ = "
IMPORTING Parameters details for PTRV_TRIP_CHAIN_UPDATE
WA_HEAD - Structure of Travel Expenses Table PTRV_HEAD
Data type: PTP02Optional: No
Call by Reference: Yes
WA_PERIO - Structure of Transp. Table PTRV_PERIO
Data type: PTP42Optional: No
Call by Reference: Yes
I_SIMULATION -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
NEW_HEAD -
Data type: PTP02Optional: Yes
Call by Reference: Yes
OLD_PERIO -
Data type: PTP42Optional: Yes
Call by Reference: Yes
IT_MODIFIED_CHAIN_ENTRIES -
Data type: PTRV_TRIP_CHAIN_TOptional: Yes
Call by Reference: Yes
IT_DELETED_CHAIN_ENTRIES -
Data type: PTRV_TRIP_CHAIN_TOptional: Yes
Call by Reference: Yes
IT_INPUT_DESTINATIONS - Address Data Entered as Part of Trip Chain
Data type: PTRV_INPUT_DEST_TOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for PTRV_TRIP_CHAIN_UPDATE
WA_HEAD_CHANGED -
Data type: PTP02Optional: No
Call by Reference: Yes
TRIP_NOT_COMPL_TRANSF - TE key for trip data
Data type: PTP00Optional: No
Call by Reference: Yes
CHANGED_ACT_TRIP -
Data type: COptional: No
Call by Reference: Yes
CHANGED_DIFF_TRIPS -
Data type: COptional: No
Call by Reference: Yes
MOVE_DEST -
Data type: COptional: No
Call by Reference: Yes
ET_DELETED_CHAIN_ENTRIES -
Data type: PTRV_TRIP_CHAIN_TOptional: No
Call by Reference: Yes
TABLES Parameters details for PTRV_TRIP_CHAIN_UPDATE
ZIEL - Stopover
Data type: PTK05Optional: No
Call by Reference: Yes
ET_TRIP_CHAIN_REROL -
Data type: PTRV_TRIP_CHAINOptional: Yes
Call by Reference: Yes
ET_TRIP_CHAIN -
Data type: PTRV_TRIP_CHAINOptional: Yes
Call by Reference: Yes
DEST_NR_PD_NR_OV - Number of Meals Per Diems/Accomm. Per Diems per Destination
Data type: PTRV_NR_PD_NR_OVOptional: Yes
Call by Reference: Yes
ABZUG - Deductions Due to Gratuitous Entertainment
Data type: PTK04Optional: Yes
Call by Reference: Yes
KONTI -
Data type: PTK17Optional: Yes
Call by Reference: Yes
KOSTR -
Data type: PTK14Optional: Yes
Call by Reference: Yes
KOSTZ -
Data type: PTK16Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for PTRV_TRIP_CHAIN_UPDATE 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_ziel | TYPE STANDARD TABLE OF PTK05, " | |||
lv_wa_head | TYPE PTP02, " | |||
lv_wa_head_changed | TYPE PTP02, " | |||
lv_wa_perio | TYPE PTP42, " | |||
lt_et_trip_chain_rerol | TYPE STANDARD TABLE OF PTRV_TRIP_CHAIN, " | |||
lv_trip_not_compl_transf | TYPE PTP00, " | |||
lv_i_simulation | TYPE XFELD, " SPACE | |||
lt_et_trip_chain | TYPE STANDARD TABLE OF PTRV_TRIP_CHAIN, " | |||
lv_changed_act_trip | TYPE C, " | |||
lv_new_head | TYPE PTP02, " | |||
lt_dest_nr_pd_nr_ov | TYPE STANDARD TABLE OF PTRV_NR_PD_NR_OV, " | |||
lv_changed_diff_trips | TYPE C, " | |||
lt_abzug | TYPE STANDARD TABLE OF PTK04, " | |||
lv_move_dest | TYPE C, " | |||
lv_old_perio | TYPE PTP42, " | |||
lt_konti | TYPE STANDARD TABLE OF PTK17, " | |||
lv_et_deleted_chain_entries | TYPE PTRV_TRIP_CHAIN_T, " | |||
lv_it_modified_chain_entries | TYPE PTRV_TRIP_CHAIN_T, " | |||
lt_kostr | TYPE STANDARD TABLE OF PTK14, " | |||
lv_it_deleted_chain_entries | TYPE PTRV_TRIP_CHAIN_T, " | |||
lt_kostz | TYPE STANDARD TABLE OF PTK16, " | |||
lv_it_input_destinations | TYPE PTRV_INPUT_DEST_T. " |
  CALL FUNCTION 'PTRV_TRIP_CHAIN_UPDATE' " |
EXPORTING | ||
WA_HEAD | = lv_wa_head | |
WA_PERIO | = lv_wa_perio | |
I_SIMULATION | = lv_i_simulation | |
NEW_HEAD | = lv_new_head | |
OLD_PERIO | = lv_old_perio | |
IT_MODIFIED_CHAIN_ENTRIES | = lv_it_modified_chain_entries | |
IT_DELETED_CHAIN_ENTRIES | = lv_it_deleted_chain_entries | |
IT_INPUT_DESTINATIONS | = lv_it_input_destinations | |
IMPORTING | ||
WA_HEAD_CHANGED | = lv_wa_head_changed | |
TRIP_NOT_COMPL_TRANSF | = lv_trip_not_compl_transf | |
CHANGED_ACT_TRIP | = lv_changed_act_trip | |
CHANGED_DIFF_TRIPS | = lv_changed_diff_trips | |
MOVE_DEST | = lv_move_dest | |
ET_DELETED_CHAIN_ENTRIES | = lv_et_deleted_chain_entries | |
TABLES | ||
ZIEL | = lt_ziel | |
ET_TRIP_CHAIN_REROL | = lt_et_trip_chain_rerol | |
ET_TRIP_CHAIN | = lt_et_trip_chain | |
DEST_NR_PD_NR_OV | = lt_dest_nr_pd_nr_ov | |
ABZUG | = lt_abzug | |
KONTI | = lt_konti | |
KOSTR | = lt_kostr | |
KOSTZ | = lt_kostz | |
. " PTRV_TRIP_CHAIN_UPDATE |
ABAP code using 7.40 inline data declarations to call FM PTRV_TRIP_CHAIN_UPDATE
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.DATA(ld_i_simulation) | = ' '. | |||
Search for further information about these or an SAP related objects