‎2007 Jul 19 8:43 PM
Hi experts,
I looking for a BAPI or any FM that can be used to create sales orders with reference. I want to create ORders with reference to other orders.
I've tried BAPI_SALESORDER_CREATEFROMDAT1 and 2. These doesn;t work for referencing Order. Any ideas....
Thanks a LOT
Ron
‎2007 Jul 19 8:59 PM
It is possible using BAPI_SALESORDER_CREATEFROMDAT12
you need to pass ref order number to
ORDER_HEADER_IN-REF_DOC (BAPISDHD1-REF_DOC)
Thanks
Seshu
‎2007 Jul 19 8:59 PM
Hi,
Please try FM SD_SALESDOCUMENT_CREATE ... in the header parameter there is parameter called REFDOCTYPE where you can specify the other sales document.
Also please check BAPI BAPI_SALESDOCUMENT_COPY as well.
Regards,
Ferry Lianto
Please reward points if helpful.
‎2007 Jul 19 8:59 PM
It is possible using BAPI_SALESORDER_CREATEFROMDAT12
you need to pass ref order number to
ORDER_HEADER_IN-REF_DOC (BAPISDHD1-REF_DOC)
Thanks
Seshu
‎2007 Jul 20 6:56 AM
Hi,
Here is list of all bapi for sales order.
BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
BAPI_ORDER_CHANGE_STATUS_GET Change status for order
BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
BAPI_SALESORDER_GETSTATUS Sales order: Display status
BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
BAPI_XSI_GET_VTRK_G Tracking info
Pls reward helpful points.
Regards,
Ameet
‎2007 Jul 20 7:02 AM
Hi,
First create the Sales Order via BAPI_SALESORDER_CREATEFROMDAT2 in the normal way. Then, get the relevant Contract Line Items' Condition Records and call BAPI_SALESORDER_CHANGE for the newly created ales Order (do not use BAPI_SALESORDER_GETDETAILEDLIST to get Condition Records as this populates some Function Group Structures and causes BAPI_SALESORDER_CHANGE to fail - rather hit KONV to get the Conditions and then T685A to get the Pricing Condition Master data, then pass this info into MAP_INT_TO_EXT_STRUCTURE which maps the data into the correct structure format for BAPI_SALESORDER_CHANGE).
Or use
FM SD_SALESDOCUMENT_CREATE
Regards