Application Development 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: 

Bapi Simulate sales order problem

Former Member
0 Kudos

dear all my friends .

I have use the bapi of ( BAPI_SALESORDER_SIMULATE ) which is interface for ( bapi_salesorder_createfromdat1) and it dos't create ORDER_CONDITIONS_IN so that i can Simulate order with adding manual condition so that can effect the netvalue of the material . is there is a bapi or a function module that simulate the order creation with condition on price like

( bapi_salesorder_createfromdat1) but in the simulaton mode .

thanks for support

9 REPLIES 9

Former Member
0 Kudos

i have found asolution for the frist part but i have a problem when ading acondition type (Zxxx) for example twice in the same line item of ORDER_ITEMS_IN in field cond_type and cond_type1 so that i can add to condition at the same line item in the same line . can any one help me

0 Kudos

Hi Ahmed,

+ORDER_ITEMS_IN in field cond_type and cond_type1 so that i can add to condition at the same line item in the same line +

Can you explain this.You can simulate after adding manual conditions,that will work.After simulation do you want to see the price or any other requirement.

Regards,

Madhu.

0 Kudos

Use BAPI_SALESORDER_CREATEFROMDAT2.

Use its parameter TESTRUN = 'X' to have simulation mode instead of real creating.

To have multiple condition records for the same condition type / sales order item I would try filling the field COND_COUNT of ORDER_CONDITIONS_IN table with sequential numbers (1,2, etc.).

regards

Former Member
0 Kudos

dear madhurao123

thank you for replay i want to add two manual conditions in one line item using bapi_salesorder_simulation to see the net price of the material after add the two conditions if i add two different type conditions it work right if i pass two conditions with the same type it accept only one for Example i want to add condition (ZMOD) on line item twice first to add fixed value and the second a percentage value at the same time it accept one .

dear Maciej Domagała

In the BAPI_SALESORDER_CREATEFROMDAT2 i can use the test run flag and it run correctly but the function dos't return the price of the material after EXECUTION .

0 Kudos

Hi Ahmed,

please check below thread.

Thanks

Jitendra soni

0 Kudos

Hi Ahmed,

How it is calculating when you do manually in va01.Why can not you try with two condition types.I am using a variant material to create sales order.Here i am maintaining condition record and then i am simulating .I am getting all the prices including variants also.Can you explain the business requirement in detail.

Regards,

Madhu.

0 Kudos

dear madhurao123

this is what i pass to bapi_salesorder_simulation

ORDER_ITEMS_IN-ITM_NUMBER = "10"

ORDER_ITEMS_IN-ITM_MATERIAL = "A12"

ORDER_ITEMS_IN-ITM_PLANT = "TN00"

ORDER_ITEMS_IN-ITM_TARGET_QTY = "20"

ORDER_ITEMS_IN-ITM_COND_TYPE = "ZMOD"

ORDER_ITEMS_IN-ITM_COND_VALUE = "-20"

ORDER_ITEMS_IN-ITM_CURRENCY = "EGP"

ORDER_ITEMS_IN-ITM_CURR_ISO = "EGP"

ORDER_ITEMS_IN-ITM_CD_TYPE2 = "ZMOD"

ORDER_ITEMS_IN-ITM_CD_VALUE2 = "-20"

so that it calculate the first part as a fixed amount and calculate CD_TYPE2 as percentage amount from material .

if i change CD_TYPE2 to any another type it work correctly if it is the same like ORDER_ITEMS_IN-ITM_COND_TYPE it dos't work this my requirement to work with the same type .

please help me .

0 Kudos

Hi Ahmed,

Are you able to pass this values in va01.Did you explain this to functional consultants.

Regards,

Madhu.

Former Member
0 Kudos

yeas iam able and it work correctly in another BAPI but dos't return the net price of the material .