06-09-2011 1:19 PM
Dear Expert
I am facing problem when we are tracking delivary quantity against sales order and quotation. then our delivary quantity not matching with invoiced quantity.
Actually the logic of report are below
Pick up the VBAK-VBELN and VBAK-KUNNR where AUART = quotation, VKORG, VTWEG, SPART, ERDAT = selection.
now when any quantity which are added in sales order in new line not cattered through below code and it show problem of mismatch.
Can any one help me in finding data from all this table to catter delivey quantity, quotation qty and sale order qty.
thanks in advance.
06-09-2011 2:16 PM
Starting from quotes, you could find your quote, then read SD document flow table VBFA for next document of type sales order (could be more than one sales order from a quote). Then you could obtain delivery documents (could be more than one for a sales order) for all your sales orders, again using next document code in table VBFA. This would present you tables that could contain multiple rows:
quote
sales order
delivery,
delivery
sales order
delivery
and so forth. You might also consider using table VBUK or VBUP to discover status of each quote item.