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

SD_Salesdocument_create with multiple references

Former Member
0 Likes
4,216


Hi all,

we are using Function module SD_Salesdocument_create to create orders from our webshop in the ERP System.

The creation works fine.

Now we have the issue, that we have multiple Quotations in the webshop which can be in one order.

When we are crating the reference to the Quote at the line items everything works fine and each line item has its own ref doc.

But on doc header we are not able to have more than one Quote as a reference in the document flow.

My question is now, what do we have to do that each ref doc also apears in the header doc flow.

On a Standard Order there you also can have multiple quotes.

Thanks and regards

Dirk

1 ACCEPTED SOLUTION
Read only

Former Member
2,570

Hi,

If I understand correct You can pass the  ref doc in the item table for your BAPI as below. :

    gs_order_items_in-ref_doc    = wa_head-vbeln.

     gs_order_items_in-ref_doc_it = wa_head-posnr.

     gs_order_items_in-ref_doc_ca = 'B'.


Hope this helps.

6 REPLIES 6
Read only

Former Member
2,571

Hi,

If I understand correct You can pass the  ref doc in the item table for your BAPI as below. :

    gs_order_items_in-ref_doc    = wa_head-vbeln.

     gs_order_items_in-ref_doc_it = wa_head-posnr.

     gs_order_items_in-ref_doc_ca = 'B'.


Hope this helps.

Read only

0 Likes
2,570

Hi,

on an item base everything works fine, there we have the doc flow line by line.

But on a Header base we dont see more than one quote.

My quesion is, what do we have to do that it Shows the doc flow as you can see in my attached file above.

Thanks and Regards

Dirk

Read only

Juwin
Active Contributor
0 Likes
2,570

If I understand correctly, thats how SAP will show document flow, if there are multiple references. It is not incorrect.

There is no other way to show multiple header references in a tree.

Thanks,

Juwin

Read only

Former Member
0 Likes
2,570

Hi Juwin,

thanks for your answer.

it depends, when you are creating an order with VA01 you can reference multiple Quotes and you see this multiple Quotes in Header and the respective one Quote at item level.

But the Header reference did not work with this function module and my question is do anybody have an idea why the Header reference is not multiple when I'm using the function module.

Or do I need to do something else to have the single doc reference on item base and the multipe doc reference at Header Level.

Thanks and Regards

Dirk 

Read only

Former Member
0 Likes
2,570

Hi,

Did you change your code and tried the code given by me earlier. The above code is working fine for me and I get the Document flow as your screen shot. Though my code takes the reference of Invoice document.

Just run VA03, enter your document no and check the document flow outside.

Check the screen shot.

Hope this helps.

Read only

Former Member
0 Likes
2,570

PERFECT Works

Thanks for your Support!

Regards

Dirk