Application Development 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: 

Copy price agreement from contract to order via bapi

0 Kudos

Hi ,

I have a problem in copying the price the agreement from contract to sales order

I am using the BAPI  "BAPI_SALESORDER_CREATEFROMDAT2" to create the sales order wrt contract.

and passing the ref as below.

    wl_bapi_header-ref_doc    = fi_viqmel-kdauf.

    wl_bapi_header-refdoc_cat = 'G'.

    ls_detail-ref_doc      = fi_viqmel-kdauf.

    ls_detail-ref_doc_it   = fi_viqmel-kdpos.

    ls_detail-ref_doc_ca   = 'G'.


the issue is the price agreement is not getting captured in sales order from contract.


please advise.


regards,

GURU

1 REPLY 1

raymond_giuseppi
Active Contributor
0 Kudos

AFAIK the SD BAPIs don't support copy with reference, reference document only update the document flow. (Ref: 550726 - FAQ: BAPIs in sales - Restrictions)


Hint: Did you read the multiple similar threads on creation of SO with reference to quote or contract, I fear you have to copy the data yourself from database selected from the contract/quote, with the help of FM like MAP2E_VBAPKOM_TO_BAPISDITM or customer FM created with transaction BDBS.


Regards,

Raymond