01-11-2012 11:20 PM
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
01-12-2012 7:58 PM
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
01-13-2012 1:40 AM
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.
01-13-2012 3:36 PM
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
01-13-2012 8:54 PM
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 .
01-14-2012 6:06 AM
01-14-2012 7:30 AM
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.
01-14-2012 12:49 PM
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 .
01-14-2012 5:00 PM
Hi Ahmed,
Are you able to pass this values in va01.Did you explain this to functional consultants.
Regards,
Madhu.
01-14-2012 6:28 PM
yeas iam able and it work correctly in another BAPI but dos't return the net price of the material .