‎2016 Jun 02 11:41 AM
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
‎2016 Jun 02 2:29 PM
‎2016 Jun 03 10:18 AM
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
‎2016 Jun 03 11:10 AM
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