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

Create with reference using BAPI_SALESDOCU_CREATEFROMDATA

Former Member
0 Likes
1,445

Hi,

I have been trying to use BAPI_SALESDOCU_CREATEFROMDATA to create with reference. I am trying to use the fields REF_DOC and REF_DOC_CA in structure ORDER_HEADER_IN

but the created order is not copying any data from the referenced order. Aaprt from the ref order I am passing the sales area data and sold to customer. Am i missing something or is create with reference not supported?

Regards,

Hari.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,074

Hi,

This bapi will work when you try to copy invoice to the credit memo request..pass the billing document number in salesdocument parameter and pass the sales document type(CMR type) in documenttype.

Thanks

Naren

4 REPLIES 4
Read only

Former Member
0 Likes
1,074

Hi,

Try using BAPI_SALESDOCUMENT_COPY..

Thanks

Naren

Read only

0 Likes
1,074

Thanks, but this does not suit my purpose. I need to create a CR with reference to an invoice . This BAPI I guess is used to just copy data from one document to another of the same type.

Read only

Former Member
0 Likes
1,075

Hi,

This bapi will work when you try to copy invoice to the credit memo request..pass the billing document number in salesdocument parameter and pass the sales document type(CMR type) in documenttype.

Thanks

Naren

Read only

Former Member
0 Likes
1,074

For the BAPI BAPI_SALESDOCU_CREATEFROMDATA enter the ref_doc, ref_doc_it and ref_doc_ca

(reference document number, item and category) for the order_items_in .

It requires the reference document to be passed on the line item level. It should work.