04-20-2007 4:48 PM
Hi,
Suppose we have a sales order with a material and a submaterial. On the head material a condition record for according a reduction is found. On the submaterial also but it's different.
Our requirement is that if there is a submaterial, the reduction on the submaterial should always be equal to the head material. I.o.w the reduction of the submaterial must be overwritten with the value of the head material.
I've tried messing around with duplicate condition records and also in some user exits but can't find anything.
Any ideas on this ?
with regards
04-21-2007 12:04 AM
Hi, I had a problem somewhat similar to yours, it was with the conditions of the main item not appearing on the subitems, I put a case in OSS and they told me that once the sales order was created, I had to put the conditions for the subitems, I used the FM bapi_sales_order_change.
04-21-2007 12:04 AM
Hi, I had a problem somewhat similar to yours, it was with the conditions of the main item not appearing on the subitems, I put a case in OSS and they told me that once the sales order was created, I had to put the conditions for the subitems, I used the FM bapi_sales_order_change.
04-23-2007 12:21 PM
Hi,
Which user-exit did you use to achieve this ? I don't find anything that can be ran after saving the sales order ?
with regards
Erik
04-23-2007 4:34 PM
I didn't use any exit, after creating the sales order, I check if there were substitute materials on the table vbap.
If you use substitution with subitems you have to do it this way, if you use substitution without subitems you have to do nothing.
example:
you enter material A, quantity 10, with subitems you end with a SO
pos material quantity
10 A 10 (blocked)
11 B 10 (subposition)
Without subitems you end with a SO like this
os material quantity
10 B 10 (all the values you entered in the bapi_sales_order_create are applied to this position)
04-26-2007 10:31 AM
Made a new requirement that checks if a higher level item exists. If it exists sy-subrc = 4 so that the condition search isn't executed. Works fine for me. Thanks for your info.
04-26-2007 11:01 AM
hi i face the same problem and i built code like this.
using bapi_salesorder_change
just read a line from vbap table and pass the same values in bapi.
pass the submaterial reduction amt in shedule line item of head material.
shedule line confirm qty = reduction_amt.
shedule line confirm qty x = 'X'.
This can solve ur problem.