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: 
Read only

Order quantity cumulation

Former Member
0 Likes
522

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

2 REPLIES 2
Read only

Former Member
0 Likes
479

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

Read only

0 Likes
479

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