Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Salesorder BAPI

Former Member
0 Likes
441

How to pass the KBETR field in the BAPI_SALESORDER_CREATEFROMDAT2 ?

Also how to pass the VBELV field in the same BAPI ?

2 REPLIES 2
Read only

Former Member
0 Likes
392

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.

Read only

Former Member
0 Likes
392

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