‎2007 Apr 24 10:56 AM
How to pass the KBETR field in the BAPI_SALESORDER_CREATEFROMDAT2 ?
Also how to pass the VBELV field in the same BAPI ?
‎2007 Apr 24 11:25 AM
Hi,
1. you have to use table ORDER_CONDITIONS_IN to pass condition values...
2. If you mean delivery number, I don't think that you can pass it...
regards.
‎2007 Apr 24 11:30 AM
Hi,
check this....
wa_bapicond-itm_number = wa_file-ln_item_no.
wa_bapicond-cond_type = 'YB00'.
wa_bapicond-cond_value = wa_file-price.
wa_bapicond-currency = 'USD'.
APPEND wa_bapicond TO it_bapicond.
l_price = wa_file-price.
CLEAR wa_bapicond.
Invoice number and Invoice Item number
wa_bapisditm-ref_doc = wa_file-inv_no.
wa_bapisditm-ref_doc_it = wa_file-inv_itm.
Create Recall Sales Order
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = wa_bapisdhd1
IMPORTING
salesdocument_ex = l_new_doc
TABLES
return = it_return
sales_items_in = it_bapisditm
sales_partners = it_bapiparnr
sales_schedules_in = it_bapischdl
sales_conditions_in = it_bapicond.
If helpful, reward is useful,
Regards,
Tanmay