cancel
Showing results for 
Search instead for 
Did you mean: 

Table to find delivery document from Shipment number

syerazvi
Participant
0 Kudos

                   
Hello,

I have a shipment number which has been deleted from VT02N, now i can only see it only in the customized Z transcation of my company. How can i find the delivery document of this particular shipment

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member223981
Active Contributor
0 Kudos

Hi Syed,

When you delete the shipment from VT02n, the shipment gets deleted from all the shipping transportation tables (VTTK, VTTP, VTTS, VTSP, VTFA). this happens at the following code in the update task:

Function rv_shipment_update_db

*********************************************

  PERFORM db_update TABLES db_vttk_del db_vttk_ins db_vttk_upd

                    USING  'VTTK'.

  PERFORM db_update TABLES db_vttp_del db_vttp_ins db_vttp_upd

                    USING  'VTTP'.

  PERFORM db_update TABLES db_vtts_del db_vtts_ins db_vtts_upd

                    USING  'VTTS'.

  PERFORM db_update TABLES db_vtsp_del db_vtsp_ins db_vtsp_upd

                    USING  'VTSP'.

  PERFORM db_update TABLES db_vtfa_del db_vtfa_ins db_vtfa_upd

                    USING  'VTFA'.

*********************************************

The record in VBFA is also deleted that connects the shipment to the delivery in the delivery document flow. This happens here:

Function SD_SHIPMENT_DELI_STATUS_UPD_DB

*********************************************

73 * delete vbfa entries (document flow)

74   IF NOT I_VBFA_DEL[] IS INITIAL.

75     DELETE VBFA FROM TABLE I_VBFA_DEL.  <<<<<<<<<<<<<<<<<<<<<<

76     IF SY-SUBRC NE 0.

77       MESSAGE A701(VW) WITH 'DELETE' 'VBFA' SY-SUBRC.

78     ENDIF.

*********************************************

So I do not see any link existing between the shipment and the delivery after you delete the delivery. Really, there should not be any link as the shipment has been deleted - any link therefore would be inconsistent as the delivery could always be put into another shipment!

One approach you could do is to search table CDHDR for deliveries (Objectclas = "LIEFERUNG") that were changed by VT02n (TCODE = "VT02n"). This may narrow it down to the delivery that you are looking for - you may be able to narrow the search further if you have an idea of the user or date.....

Hope this helps.

Noel

Former Member
0 Kudos

Hi,

try table VTFA.

Regards,

JM