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- Using BAPI Sales Order Create does not return contract pricing details

Former Member
0 Likes
1,438

Hello SAP Experts,

In one scenarios we are using a BAPI-->'BAPI_SALESORDER_CREATEFROMDAT2'  for sales order creation and its working successfully.

Now in another scenario where we are using the BAPI--->BAPI_SALESORDER_CREATEFROMDAT2' for sales order creation with reference to contract. In return the sales order is created successfully but it will not return the contract pricing details in conditions table of BAPI.

Since we are passing the below parameters in ITEM table of BAPI.

ref_doc = <contract_no>.

ref-doc_it  = <contract_item>.

ref-doc_ca  = <G>  "G = Contract

Please advice.

Best Regards,

Vishal

3 REPLIES 3
Read only

Lakshmipathi
SAP Champion
SAP Champion
0 Likes
847

Moved from SAP ERP SD Sales to ABAP Development.  Try to post in the right forum.  Expecting technical inputs by posting in functional forum is not going to help you

Read only

RaymondGiuseppi
Active Contributor
0 Likes
847

Check if OSS information note 550726 - FAQ: BAPIs in sales - Restrictions is yet valid.


7. Question: Do BAPIs support the "Create with Reference" function?

Answer: No. However, you can update the document flow, for example, for contracts by specifying reference documents. You can use the function module BAPI_SALESDOCUMENT_COPY that has not been released to create a 1:1 copy of sales documents.

You may be required to read contract pricing information and pass them to the BAPI?

Regards,

Raymond

Read only

suresh_mamilla
Participant
0 Likes
847

Hi Vishal,

BAPI 'BAPI_SALESORDER_CREATEFROMDAT2' will not fetch any details of the reference document we provide. If we providde the Contract no. as a reference document, we are able to see the document flow of that sales order. Simply, reference document concept in this BAPI is to achieve document flow.

Instead you try to fetch the contract details and pass them to sale order BAPI.

Regards

Suresh M