2012 Sep 06 1:33 PM
I am using the FM - BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order from Work order.
The program was working fine for all the document types.
Now we have a requirment to create the sales order for existing document type where i am not passing any condition values to the BAPI.
if we create the sales order for that worder with material in the item level it is creating by default condition values GT03 condition type.
If I am not passing to BAPI any condition values it should also create the default Condition values with GTO3 with refernece to the material.
Could any one help what could be the wrong with BAPI why it's not creating the condition values same way as VA01 transaction .
The BAPI description says it works same as VA01.
My BAPI code.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = wa_head
IMPORTING
salesdocument = lv_vbeln
TABLES
return = li_return
order_items_in = li_item
order_partners = li_ptnr
order_schedules_in = li_sched
*order_conditions_in = li_condition
order_text = li_texts.
2012 Sep 06 2:06 PM