2024 Jul 11 8:02 AM
My user created a quote with an irregular line number like 10/15/20/30. When creating a sales order with reference to this quote using bapi BAPI_SALESORDER_CREATEFROMDAT2, It will prompt an error that the material in item 000020 cannot be modified. I debug the standard program and find that the codes of bapi and va01 are inconsistent. When bapi is executed, 15 lines will be modified to 20 lines.But everything works fine with VA01. Is there any way or notes to fix this problem?
2024 Jul 11 8:34 AM
Hi Enzo_cc
For Quote creation use below BAPI.
CALL FUNCTION 'BAPI_QUOTATION_CREATEFROMDATA'
EXPORTING
order_header_in = order_header_in
* without_commit = ‘ ‘
convert_parvw_auart = 'X'
IMPORTING
salesdocument = salesdocument
sold_to_party = sold_to_party
ship_to_party = ship_to_party
* billing_party =
return = li_return
TABLES
order_items_in = order_items_in
order_partners = order_partners
* order_items_out = order_items_out
order_cfgs_ref = order_cfgs_ref
* order_cfgs_inst = order_cfgs_inst
* order_cfgs_part_of = order_cfgs_part_of
* order_cfgs_value = order_cfgs_value.
.
2024 Jul 11 8:52 AM
Hi Abinathsiva,
I'm not mean to create quote,just want to create SO with existing quote for reference.The key point is how to deal with inconsistent item numbers.
2024 Jul 11 9:06 AM - edited 2024 Jul 11 9:17 AM
2024 Jul 11 9:27 AM
Hi Raymond,
I set parameter INT_NUMBER_ASSIGNMENT with default space,if I mark this parameter as X, sales order can be created,but if my quote item numbers are 10/15/20/40/50,the SO line number would be 10/20/30/40/50/60/70,with two duplicate lines.So there is still a problem with the created order.
2024 Jul 11 1:20 PM