Ansicht
Dokumentation

EXIT_SAPLV56U_004 - Shipment Processing: Prepare New Objects for Saving

EXIT_SAPLV56U_004 - Shipment Processing: Prepare New Objects for Saving

Addresses (Business Address Services)   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function is called up when shipments are saved and the shipment table has been prepared for the update in the database (for example, number assignment, person who last made changes, the time changes were made).

In this function, you can make changes to the shipment tables.
If you want to update your own objects together with the shipment tables, you have to prepare them here for the update.

Example

If you want to update objects that are to contain the shipment number, the objects must have the assigned shipment number when a shipment is created.
Newly created shipments are indicated by:
XVTTK-UPDKZ = UPDKZ_NEW.
They contain the old provisional '$nnn' in field
XVTTK-TKNUM_OLD.
The new number is in field
XVTTK-TKNUM.

Notes

Sorting the shipment table

The shipment processing tables are always sorted according to the database keys so that 'READ TABLE ... BINARY SEARCH' can be used to access them quickly.
These tables contain entries for several shipments so that the entries of a shipment are grouped together.

The tables are as follows:

  • XVTTK, YVTTK Shipment headers Sort: MANDT,TKNUM
  • XVTTP, YVTTP Shipment items Sort: MANDT,TKNUM,TPNUM,VBELN
  • XVTTS, YVTTS Shipment stages Sort: MANDT,TKNUM,TSNUM
  • XVTSP, YVTSP Assignment stages/items Sort: MANDT,TKNUM,TSNUM,TPNUM
  • XVBPA, YVBPA Partner Sort: MANDT,VBELN,POSNR,PARVW
  • XVTFA, YVTFA Document flow Sort: Database
  • XVBADR,YVBADR Addresses Not sorted

Contents of the shipment tables

Table Xtttt is most current after the change. Table Ytttt stays the same as it was on the database before the changes were made.

The content of the indicator UPDKZ show the change status. In INCLUDE RVDIREKT the constants are defined for the indicator:

  • updkz_old(1) value ' ' - No change
  • updkz_new(1) value 'I' - New entry
  • updkz_update(1) value 'U' - Changed entry
  • updkz_delete(1) value 'D' - Delete entry

Table XVTTP contains both entries of deliveries belonging to a shipment (TKNUM, TPNUM have entries), as well as entries for deliveries that do not belong to a shipment (TKNUM, TPNUM are blank).

Changes

If you make changes or create new entries, you must take the sorting into account.

If you want to access entries of a shipment in one of the tables, select the first entry and read the corresponding segment for this shipment per 'LOOP':
read table xvttp with key mandt = sy-mandt
tknum = i_tknum
binary search.
if sy-subrc = 0.
loop at xvttp from sy-tabix.
if xvttp-tknum ne i_tknum. exit. endif.
...
endloop.
endif.

Further information





Parameters

I_VTRLK
I_VTRLP
I_XSADR
I_XVBPA
I_XVTFA
I_XVTSP
I_XVTTK
I_XVTTP
I_XVTTS
I_YSADR
I_YVBPA
I_YVTFA
I_YVTSP
I_YVTTK
I_YVTTP
I_YVTTS

Exceptions

Function Group

XV56

Fill RESBD Structure from EBP Component Structure   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 3694 Date: 20240523 Time: 045545     sap01-206 ( 48 ms )