Ansicht
Dokumentation
EXIT_SAPLV56I_001 - IDOC TPSDLS: Modification of IDOC in Delivery Header Segment Group
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3upThis documentation is copyright by SAP AG.
Functionality
This customer exit is used to modify the delivery header group in an IDOC of the type TPSDLS01. You execute the modification after you have entered the segment into the IDOC table. The current segment is the last entry in the table.
You call up the exit after creating the following segment types: E1TPDLH, E1TPACC, E1TPALC, E1TPTRM, E1TPLOC, E1TPTIW, E1TPLCT, E1EDT13, E1TPDIH, and E1TPNOT. After each call, you can modify or add to the data in segments that are already created, or you can add on additional segments.
Example
1) In this example, you find coding to be able to access the delivery header. You change a field.
* Declaration of Datastructures
data: e1tpdlh like e1tpdlh. "delivery header segment
data: last_seg type i. "index of last tidoc table entry
* determine idoc table size and read last segment
describe table idoc_data lines last_seg.
read table idoc_data index last_seg.
* do something if the written segment was delivery header segment
if segment_name = 'E1TPDLH'.
e1tpdlh = idoc_data-sdata. "get the data contents of the segment
e1tpdlh-shpprj = '15'. "change shipment project number to 15
idoc_data-sdata = e1tpdlh. "write back segment contents
modify idoc_data index sy-tabix.
endif.
2) In this example you find coding to be able to add a segment after
the action-code segment (the IDOC must be changed).
* Declaration of Datastructures
data: e1tpnew like e1tpnew. "a new segment
* do something if the written segment was action code segment
if segment_name = 'E1TPACC'.
e1tpnew-newfield = '0001'. "set the field values of new segment
idoc_data-sdata = e1tpnew. "write segment contents
idoc_data-segnam = 'E1TPNEW'. "set segment name
append idoc_data.
endif.
Notes
Further information
Parameters
DELIVERY_HEADERIDOC_DATA
SEGMENT_NAME
Exceptions
IDOC_ERRORFunction Group
XV56TXBHW - Original Tax Base Amount in Local Currency PERFORM Short Reference
This documentation is copyright by SAP AG.
Length: 2271 Date: 20240523 Time: 061020 sap01-206 ( 31 ms )