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: 

Net value of new sales order is not populating using BAPI_SALESORDER_CREATEFROMDAT2

JeetOP
Participant
0 Kudos
1,896

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

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos
808

how do you populate lt_order_items_in?

After orders gets created you can analyze pricing to see what's missing.

Regards, Clemens

8 REPLIES 8

JeetOP
Participant
0 Kudos
808

Kindly suggest!

thanks,

abhijeet.

rajkumarnarasimman
Active Contributor
0 Kudos
808

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

Clemenss
Active Contributor
0 Kudos
809

how do you populate lt_order_items_in?

After orders gets created you can analyze pricing to see what's missing.

Regards, Clemens

0 Kudos
808

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.

Clemenss
Active Contributor
0 Kudos
808

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

Clemenss
Active Contributor
0 Kudos
808

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

0 Kudos
808

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.

praveenboss
Participant
0 Kudos
808

Hi,

Please try with this

CALL FUNCTION   'SD_SALESDOCUMENT_CREATE'


i am using this and working fine.

Thanks.