‎2007 Nov 01 4:33 PM
Hi Geeks,
Is there any chance that we can add the document flow using a bapi or a FM after creating a returns order.
Initially I am getting the document flow after copying a sales order using BAPI_SALESDOCUMENT_COPY. I am deleting all the line items and inserting new line items using BAPI_SALESDOCUMENT_CHANGE. I am not able to see the document flow. Somehow its getting erased. Could somebody help me with this..
Thanks,
KIran.
‎2007 Nov 01 5:09 PM
Hi,
I think this is correct.
As per logic once you delete all line items and add new line items, you are actually changing the Sales Order. So , from that point onwards all the entries relating to that Sales Order will be removed which link it with Document Flow.
I think instead of doing that you should create a new Sales Order and if you process it , it will have it's own Document Flow.
Just a question : If you delete all line items what remains in the Sales Order?? I think after you delete the line items the Sales Order itself is useless, so if you add new line items it's as good as creating a new sales order so why not create one then ?
Regards
Nishant
‎2007 Nov 01 5:09 PM
Hi,
I think this is correct.
As per logic once you delete all line items and add new line items, you are actually changing the Sales Order. So , from that point onwards all the entries relating to that Sales Order will be removed which link it with Document Flow.
I think instead of doing that you should create a new Sales Order and if you process it , it will have it's own Document Flow.
Just a question : If you delete all line items what remains in the Sales Order?? I think after you delete the line items the Sales Order itself is useless, so if you add new line items it's as good as creating a new sales order so why not create one then ?
Regards
Nishant
‎2007 Nov 01 5:12 PM
Hi Nishant,
Its just not a single step and I am doing a 5 step procedure for returns for which I have to create a return order from an existing return order. For that I have tried different options and finally came to copying that order..deleting all the line items and inserting the new line items.
You've suggested me to create a new sales order instead of doing all this. It doesnt serve my purpose. Anyway thanks for your time.
Regards,
Kiran.
‎2007 Nov 01 5:49 PM
Try RV_DOCUMENT_FLOW_UPDATE. Check its where-used list to understand how to call this function module.
‎2007 Nov 02 10:27 AM
Hi Srinivas,
Ive tried this already..Its running without errors but not updating the document flow.
Anyways thanks for your time..
Regards,
Kiran.
‎2007 Nov 02 1:35 PM
I know I have used this before but it is just been a long time back. It works. See if you need a commit after your call and also see if the information you are passing is correct (like line numbers, document number in internal format etc).
‎2007 Nov 03 5:37 PM
Hi Srinivas,
I am using all the fileds i have to populate before calling the fm. I dont know, i might be missing some. When copying the sorder and deleting all the line no's its deleting the document flow and when i am entering the new lines its not ending up with document flow once i use this fm as well..if u still remember how u used this fm can you plz let me know.
Thanks,
Kiran.