‎2010 Jul 21 10:08 PM
Hello,
I have a question with regard to SD document flow. I am creating a delivery w/o order reference (using transaction code: VL01NO). The follow up invoice document for this needs to be a manual invoice document (customer invoice, invoice type DR) created using transaction code F-22.
As it is a manual invoice, I am using the function RV_DOCUMENT_FLOW_UPDATE_U to update the document flow of the delivery with this invoice number (just for record purposes). However, when I execute the function, the invoice shows up above the picking and goods issue. For e.g.
Delivery w/o Ref. 80154622
. Invoice 18006198
. Picking request 20100720
. GD goods issue:delvy 490030123
Is it possible to have the invoice show up after the goods issue? i.e.
Delivery w/o Ref. 80154622
. Picking request 20100720
. GD goods issue:delvy 490030123
. Invoice 18006198
Please let me know how I can do this.
Thanks,
Rugmani
‎2010 Jul 21 11:20 PM
I'm guessing document flow is displayed by DISPLAY_DOCUMENT_FLOW_ALV FM. You can debug it and see how the hierarchy is determined for deliveries.
‎2010 Jul 21 10:55 PM
I have a theory that the documents are displayed in the order of VBTYP_N field. If you look at the list of possible values for this field then you'll notice that it resembles the natural document flow in SD. Invoice is listed there before TR and GI, so that's how it's displayed.
If you use another value for this field, it might help. Try 'U' (Proforma invoice), for example, and see if it helps. Unfortunately, I don't have a system with deliveries to verify this.
‎2010 Jul 21 11:08 PM
Hi Jelena,
Thanks for your suggestions. There are 2 issues with this:
1. The invoice I am creating is not a pro-forma invoice. So I need to use 'M'.
2. However, just for experimenting purposes, I tried using 'U'. Unfortunatey, even that did not help. The Pro forma invoice is listed just below the delivery in the document flow.
Thanks,
Rugmani
‎2010 Jul 21 11:20 PM
I'm guessing document flow is displayed by DISPLAY_DOCUMENT_FLOW_ALV FM. You can debug it and see how the hierarchy is determined for deliveries.
‎2010 Jul 22 12:10 AM
Thanks for the hint Jelena. I degugged the document flow program and found that in the function module RV_ORDER_FLOW_INFORMATION if all the documents are created on the same day, the system uses the time to sort the document flow table before display.
So in my call to the function module RV_DOCUMENT_FLOW_UPDATE_U I used sy-datum and sy-uzeit for creation date and time and now it is working fine.
Thanks,
Rugmani