2010 Nov 02 4:27 AM
Dear all,
Where can we determine an outbound delivery has reversed or not? Which table and field?
Help me pls,
Thanks,
Quanglv,
Dear all,
Where can we determine an outbound delivery has reversed or not? Which table and field?
Help me pls,
Thanks,
Quanglv,
2010 Nov 02 5:24 AM
Check the table VBFA,
where VBELV = <delivery Number>
and VBTYP_V = 'J'
and VBTYP_N = 'h'If any records exist in VBFA with above WHERE condition, then the delivery is reversed with the Reverse document number VBFA-VBELN.
2010 Nov 02 7:17 AM
Hi Vinod Kumar,
Thanks for your suggestion. But it's difficult if there are multi PGI and reversal PGI document.
Is there any flag determine that?
Thanks,
2010 Nov 02 7:36 AM
I don't think there is any flag to identify the state of delivery (PGI Created or Reversed). In the scenario mentioned by you, compare the number of entries in VBFA related to
where VBELV = <Delivery Number>
and VBTYP_V = 'J'
and VBTYP_N = 'R'and
where VBELV = <Delivery Number>
and VBTYP_V = 'J'
and VBTYP_N = 'h'if the count of records in 1st and 2nd are same( and > 0) , PGI is created & Cancelled. Otherwise (count of 1 > count of 2), PGI is not reveresed.
Hope this logic will be helpful for your requirement.
2010 Nov 02 7:46 AM
Hi
The fields SJAHR, SMBLN and SMBLP of MSEG return the key of the item reversed, so if the document A it means you need to select a record frim MSEG having the fields above with the key of A:
SELECT * FROM MSEG WHERE SJAHR = <A>-MJAHR
AND SMBLN = <A>-MBLNR
So that means you need to check all items of A were reversed
Max
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |