Ansicht
Dokumentation

SD_DELIVERY_ASSIGN_TO_SHIPMENT - NOTRANSL: Zuordnen von Lieferungen zu einem Transport

SD_DELIVERY_ASSIGN_TO_SHIPMENT - NOTRANSL: Zuordnen von Lieferungen zu einem Transport

CL_GUI_FRONTEND_SERVICES - Frontend Services   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This functional module allocates the deliveries specified in table I-DELIVERIES to the shipment with the number I_TKNUM whose header must be the workarea C_XVTTK (in this, two pieces of information are actualized: The last item number assigned and the last sequence number assigned).

Shipment item tables C_XVTTP and C_YVTTP are, of course, changed.

If deliveries are already contained in another shipment, they are taken out of it and allocated to the new one. Naturally, not only are the shipment item tables of the other shipments, but also the item/ stage allocations (C_XVTSP, C_YVTSP) since the deliveries can also be allocated to stages.

If deliveries are already allocated to the shipment with number I_TKNUM, those deliveries not mentioned in I_DELIVERIES are taken out of the shipment.

In principle, the old status of shipment I_TKNUM is in C_XVTTP, while I_DELIVERIES describes the new.

Non-allocated deliveries are in table C_XVTTP as well, but have the shipment number TKNUM = SPACE.

Additionally, the deliveries are automatically allocated to all stages having the run indicator 'Main leg' (hence, table I_XVTTS is needed as input).

Example

The following situation exists:
Shipment '0000000001':
Delivery A
Shipment '0000000002':
Delivery B
Delivery C
Deliveries without shipment:
Delivery D
Delivery E

Deliveries D and C are to be allocated to the first shipment (in exact- ly this sequence). For this, table I_DELIVERIES is first laid out:
I_DELIVERIES-vbeln = 'D'.
I_DELIVERIES-tprfo = 1.
append I_DELIVERIES.
I_DELIVERIES-vbeln = 'C'.
I_DELIVERIES-tprfo = 2.
append I_DELIVERIES.

And now the call-up of the functional module is carried out:
call function 'SD_DELIVERY_ASSIGN_TO_SHIPMENT'
exporting
i_tknum = '0000000001'
tables
c_xvttp = xvttp
c_yvttp = yvttp
c_xvtsp = xvtsp
c_yvtsp = yvtsp
i_deliveries = I_DELIVERIES
i_xtrlk = xtrlk
i_xtrlp = xtrlp
i_xvtts = xvtts
changing
c_xvttk = xvttk
exceptions
others = 1.

The result is then:
Shipment '0000000001':
Delivery D
Delivery C
Shipment '0000000002':
Delivery B
Deliveries without shipment:
Delivery E
Delivery A

This means:

  • Delivery A was removed from the first shipment and placed into area 'Deliveries without shipment' (valid here is: TKNUM = SPACE).
  • Delivery C was moved from the second shipment into the first.
  • Delivery D was taken out of area 'Deliveries without shipment' and allocated to the first shipment.

Notes

Further information





Parameters

C_XVTSP
C_XVTTK
C_XVTTP
C_YVTSP
C_YVTTP
I_DELIVERIES
I_TKNUM
I_XTRLK
I_XTRLP
I_XVTTS

Exceptions

NO_TRANSPORT_RELEVANCE

Function Group

V56L

rdisp/max_wprun_time - Maximum work process run time   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 3433 Date: 20240604 Time: 002825     sap01-206 ( 46 ms )