Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update document flow

Former Member
0 Likes
2,761

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,597

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,598

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

Read only

0 Likes
1,597

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.

Read only

Former Member
0 Likes
1,597

Try RV_DOCUMENT_FLOW_UPDATE. Check its where-used list to understand how to call this function module.

Read only

0 Likes
1,597

Hi Srinivas,

Ive tried this already..Its running without errors but not updating the document flow.

Anyways thanks for your time..

Regards,

Kiran.

Read only

0 Likes
1,597

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).

Read only

0 Likes
1,597

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.