User Exits for SD Transport Processing
Functionality This customer exit enables you to change the delivery header group in an IDoc with type TPSDLS01. You can change it after the system has inserted the segment into the IDoc table. The current segment is the last one in the table.
The system calls up the customer exit after having created the following segment types: E1TPDLH, E1TPACC, E1TPALC, E1TPTRM, E1TPLOC, E1TPTIW, E1TPLCT, E1EDT13, E1TPDIH, and E1TPNOT. At each call, you can either change or insert data in already existing segments or add additional segments.
Example 1) This example includes source code which the system uses to access the delivery header. One field is changed. * 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) This example includes source code with which a segment is inserted after the action code segment (to do this, you have to change the IDoc). * 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
Function/Program:- EXIT_SAPLV56I_001: IDOC TPSDLS: Modification of IDOC in Delivery Header Segment Group
|