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

BAPI for Creating Order with Ref to Invoice

Former Member
0 Likes
2,565

Hi

We have used BAPI function module BAPI_SALESDOCUMENT_COPY to create sales order with reference to Invoice but this function module is considering all the line items of invoice.

My requirement is to create order with reference to few line items of invoice so i am trying use BAPI function module BAPI_SALESORDER_CREATEFROMDAT2

by passing below parameters but I am not able to create order with ref  to Invoice

At Header level i am passing values to fields refdoctype,doc_type ,sales_org ,distr_chan,division ,ref_1 and updation flags at header level.

At item Level ref_doc ,ref_doc_it and updation flags at item level.

Passing ship to and sold to party for Partners.

Thanks in advance.

Regards

Srilaxmi

Hi

We have used BAPI function module BAPI_SALESDOCUMENT_COPY to create sales order with reference to Invoice but this function module is considering all the line items of invoice.

My requirement is to create order with reference to few line items of invoice so i am trying use BAPI function module BAPI_SALESORDER_CREATEFROMDAT2

by passing below parameters but I am not able to create order with ref  to Invoice

At Header level i am passing values to fields refdoctype,doc_type ,sales_org ,distr_chan,division ,ref_1 and updation flags at header level.

At item Level ref_doc ,ref_doc_it and updation flags at item level.

Passing ship to and sold to party for Partners.

Thanks in advance.

Regards

Srilaxmi

3 REPLIES 3
Read only

Former Member
0 Likes
2,051

Hi srilaxmi,

Check the below link.

http://scn.sap.com/message/7046544#7046544

regards

goudham

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,051

First read Note 370988 - BAPIs in SD: Creation with reference and use search tool, this question was already posted a number of times.

Regards,

Raymond

Read only

gurunathkumar_dadamu
Active Contributor
0 Likes
2,051

Hi Srilaxmi,

use this 

BAPI_SALESDOCU_CREATEFROMDATA1.

check the below link

https://scn.sap.com/thread/1143317

Regards,

Gurunath