Ansicht
Dokumentation

EXIT_SAPLV56I_002 -

EXIT_SAPLV56I_002 -

Vendor Master (General Section)   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This customer exit is for modifying the delivery item group in an IDoc in category TPSDLS01. The segment should be modified after entering it in the IDoc table. The current segment is the last in the table.

You can call it up after creating the following segment categories: E1TPDLI, E1TPDII and E1TPCOC. Each time you call it up you can modify or supplement the data in segments that have already been created or you can add additional segments.

Example

1) This example provides coding for accessing the delivery item. One field is changed.

* Declaration of Datastructures
data: e1tpdli like e1tpdli. "delivery item segment
data: last_seg type i. "index of last idoc 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 item segment
if segment_name = 'E1TPDLI'.
e1tpdli = idoc_data-sdata. "get the data contents of the segment
e1tpdli-hazmat = 'ABC001' "change hazard material number
idoc_data-sdata = e1tpdli. "write back segment contents
modify idoc_data index sy-tabix.
endif.

2) This example provides coding to add a segment after the Commodity segment (this means 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 = 'E1TPCOC'.
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.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 1946 Date: 20240420 Time: 152825     sap01-206 ( 27 ms )