‎2008 Jul 01 10:39 AM
Hi all,
I would like to know if is it possible to create a sales order with reference using BAPI, that is, I want to create an order from a contract, for example, referencing one or more contract itens. If so, what variable or table should I use?
I think that the most suitable function is
'BAPI_SALESORDER_CREATEFROMDAT2' or should I use another to do this?
I am using release SAP ECC 6.0.
Thanks for any help.
Paulo
‎2008 Jul 01 10:45 AM
The BAPI is ok; use the following item fields to create a reference to a contract:
ref_doc (contract)
ref_doc_it (contract position)
ref_doc_ca (document type contract).
Regards,
John.
‎2008 Jul 01 10:44 AM
Paulo,
you can either use these one also:
BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
BAPI_SALESORDER_CONFIRMDELVRY
BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
Amit.
‎2008 Jul 01 10:45 AM
The BAPI is ok; use the following item fields to create a reference to a contract:
ref_doc (contract)
ref_doc_it (contract position)
ref_doc_ca (document type contract).
Regards,
John.
‎2008 Jul 01 10:49 AM
Hi,
You are using the correct BAPI to create the Sales Order, but you need to give the reference contract number and type in the Header structure ORDER_HEADER_IN of the BAPI, to create a sales order with reference to a contract.
You cann't create a Sales order with reference to multiple contracts, but you can multiple sales orders with reference to 1 contract.
Thanks,
Mahesh.
‎2011 Jan 13 3:41 PM
Hi Mahesh,
Can ou please tell me how ca I create multipesales orders ith reference to one contract?
Thanks!
Rakesh
‎2008 Jul 01 11:07 AM
yes, you are using right BAPI i.e. BAPI_SALESORDER_CREATEFROMDAT2
You will have to provide ORDER_HEADER_IN in that, Others are optional, even then if you have data for them, Provide it for better performance.
For any confusion related to chosing BAPI : You may go to BAPI transaction and find out the correct BAPI according to ur need. for example sales order relatd BAPI's are
BAPI_SALESORDER_CHANGE :Change Sales Order
BAPI_SALESORDER_CREATEFROMDAT2: Create Sales Order
BAPI_SALESDOCU_CREATEWITHDIA: Create Data Container with Dialog
BAPI_SALESORDER_GETLIST:List of all Orders for Customer
and so on.
Reward if helpful..