Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Creation of saleorder with reference to order using BAPI_SALESORDER_CREATE


iam trying to create a sale order with respect to order BAPI_SALESORDER_CREATEFROMDAT2.

the parameters i am passing is

*Fill the header information for the order.

wa_order_header_in-doc_type = Sales Doc type of order to be created.

wa_order_header_in-sales_org = sales org.

wa_order_header_in-distr_chan = distribution channel.

wa_order_header_in-division = division.

wa_order_header_in-ref_doc = order number(This is the order i refer to).

wa_order_header_in-refdoc_cat = 'C' (c stands for order).

*Fill the item level information for the order.

wa_order_items_in-itm_number = item number.

wa_order_items_in-material = material number.

wa_order_items_in-ref_doc = order number(This is the order i refer to).

wa_order_items_in-ref_doc_it = Item number of order i create.

wa_order_items_in-ref_doc_ca = 'C'.

APPEND wa_order_items_in TO i_order_items_in.

*Fill the partner information for the order.

wa_order_partners-partn_role = partner function.

wa_order_partners-partn_numb = partner number.

APPEND wa_order_partners TO i_order_partners.

& likewise conditions structure

i have done bapi_transaction_commit after bapi call.

probelm which i am facing is , BAPI is creating a new sale order.. but it is not creating a order with reference order.


Former Member
Not what you were looking for? View more on this topic or Ask a question