2015 Jul 08 7:42 AM
Hi All,
Iam using BAPI_SALESORDER_CREATEFROMDAT2 to create sales order with reference to existing sales order.I am successfully able to generate the new sales order but newly one doesnt have the net value though it has the NET Qty. Kindly suggest how to get this.
Below is the snapshot of my code.
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
* SALESDOCUMENTIN =
order_header_in = ls_order_header_in
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
logic_switch = lv_logic_switch
* TESTRUN =
* CONVERT = ' '
importing
salesdocument = lv_salesdocument
tables
return = lt_return
order_items_in = lt_order_items_in
* ORDER_ITEMS_INX =
order_partners = lt_order_partners
order_schedules_in = lt_order_schedules_in
2015 Jul 12 5:16 PM
how do you populate lt_order_items_in?
After orders gets created you can analyze pricing to see what's missing.
Regards, Clemens
2015 Jul 11 6:18 PM
2015 Jul 12 10:18 AM
Hi Abhijeet,
The pricing determination will be done automatically by system, kindly check whether the material item type which is defined as free material/free goods (Ex: ITEM TYPE = 'TANN').
Or kindly check the default pricing conditions are loaded in Condition Tab or not. In the following screenshot, default pricing condition is VKP0.
Regards
Rajkumar Narasimman
2015 Jul 12 5:16 PM
how do you populate lt_order_items_in?
After orders gets created you can analyze pricing to see what's missing.
Regards, Clemens
2015 Jul 13 10:48 AM
hi clemens,
iam passing following values.
-itm_number = ls_item_out-itm_number.
ls_order_items_in-material = ls_item_out-material. "material of ref.SO
ls_order_items_in-ref_doc = lv_sales_order. "ref SO.
ls_order_items_in-ref_doc_it = ls_item_out-itm_number. "Item number.
ls_order_items_in-ref_doc_ca = ls_header_out-sd_doc_cat. "Doc category.
ls_order_items_in-target_val = ls_item_out-net_value. "Net line item value.
But even when passing net line item value its doesnt get updated in newly created Sales order.
thanks,
abhijeet.
2015 Jul 13 1:32 PM
Hi Abi,
the net value can not be set by user input because it is determined via calculation. Diplay the sales document in question, double click on the item, go to conditions tab, see the conditions inserted by systenm logic, click the analysis button at the bottom.
May be this is the moment to ask a functional consultant for help.
Regards, Clemens
2015 Jul 13 1:39 PM
Hi Abi,
the net value can not be set by user input because it is determined via calculation. Diplay the sales document in question, double click on the item, go to conditions tab, see the conditions inserted by systenm logic, click the analysis button at the bottom.
May be this is the moment to ask a functional consultant for help.
Regards, Clemens
2015 Jul 14 9:35 AM
You can force a value using a "manual" price condition but you have to fill ORDER_CONDITIONS_IN table.
For choosing the correct manula condition, you have to ask to your functional referent.
2015 Jul 14 7:04 AM
Hi,
Please try with this
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
i am using this and working fine.
Thanks.