‎2009 May 25 10:39 AM
Hi All,
We are facing one issue with sales order creation
As per the requirement, line items should not repeated in an order.
Whenever the user enters an item which is already available in the order, then
instead of creating new line item the system should cumulate the order quantity.
We tried the user exit USEREXIT_MOVE_FIELD_TO_VBAP. But once the quantity is updated in the line item then item order quantity field has been changed to 'non-modifiable' mode and we are not able to change the quantity again.
Also the quantity is NOT getting updated in schedule lines (VBEP)
Can you please help us to resolve this issue ?
Thanks
Shaju
Edited by: shaju tv on May 25, 2009 12:10 PM
Edited by: shaju tv on May 25, 2009 2:39 PM
‎2009 May 25 1:45 PM
Hi,
To make changes in schedules lines you willhave tomake use of 'USEREXIT_MOVE_FIELD_TO_VBEP '.
How are you achieving your solution. Can you share the code?
Regards,
Ankur Parab
‎2009 May 25 2:41 PM
Hi,
Please find the below code.
read table xvbap with key matnr = vbap-matnr.
if sy-subrc eq 0.
if not RV45A-KWMENG is initial.
xvbap-kwmeng = xvbap-kwmeng + RV45A-KWMENG.
modify xvbap index sy-tabix transporting kwmeng.
clear vbap-posnr.
endif.
endif.
Here i am able to change the quatity at item level.
I tried changing the order quantity in the exit 'USEREXIT_MOVE_FIELD_TO_VBEP ' and it is not working.
Can you please give some idea ?
Thanks
Shaju