cancel
Showing results for 
Search instead for 
Did you mean: 

Item category completion rule & sales order open qty

Former Member
0 Kudos

Hello All,

I have a scenario where the sales order is created with ref to a sales contract.

In this case I have kept the contract item category completion rule as blank,so that any number of sales order can be created against the contract & the contract status remains open .

On top of this I also want system to suggest the open qty when sales order is created i.e

Suppose Contract qty = 100

Already two sales order are created with ref to contract with total qty 75

Now If I create a new sales order the system should automatically suggest the qty as 25 , which could be modified to any new qty .At present the system is suggesting is always suggesting the total contract qty which is 100.

Also If I have already created sales order qty exceeding the total contract qty then the propsed qty should be blank.

I tried using the copy control with calc using VBFA & also user exit MV45AFZZ . But nothinmg seems to provide the complete solution .

Any help on this will be highly appreciated .

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello Guys ,

Thanks for all your help.

I used the following & it resolved the issue.

In the copy control I did the open order qty calculation .

& then in the user exit MV45AFZZ

Below code resolved the issue .

FORM userexit_move_field_to_vbep.

IF VBEPD-UPDKZ IS INITIAL .

IF CVBAK-VBTYP = 'G'.

vbep-cmeng = vbep-wmeng + vbap-kwmeng.

vbep-wmeng = vbep-wmeng + vbap-kwmeng.

clear vbap-kwmeng.

ENDIF.

*

ENDIF.

Endform

Former Member
0 Kudos

Have you selected update document flow in copy control

check and confirm

Senthils

Former Member
0 Kudos

The doc flow tick is already present

Former Member
0 Kudos

Hi,

> Now If I create a new sales order the system should automatically suggest the qty as 25 , which could be modified to any >new qty .At present the system is suggesting is always suggesting the total contract qty which is 100.

I tried this, system proposes qty in sales order as 25 only. Try once again.

> Also If I have already created sales order qty exceeding the total contract qty then the propsed qty should be blank.

If you have referenced the contract fully, then system itself doesnt allow you to create sales order wrt this contract.

So, what is your requirement then because default settings only are satisfying this requirement

Or clarify me if i have misunderstood your requirement

Hope it gives you some inputs

regards,

Sagar

Former Member
0 Kudos

Hi

Kindly check the copy control configuration in t code VTAA for the field POs/neg qty should be "+"

Regards

Damu

Former Member
0 Kudos

Helllo Damu,

With completion rule blank the system does not allow the copy control + or - .

So I have to use the qty copy rule as 0 . also even If I use + or - it does not work .

Thanks,

Anurag

Former Member
0 Kudos

Hi,

While creating a sales order w.r.t contract system will show open qty as 25 but system will allow you 100 qty also.

so here u have to use the user exit: USEREXIT_SAVE-DOCUMENT in MV45AFZZ program.

you can ask the Abper write a code as mentioned below:

while creating a sales order w.r..t contract if the new sales order qty > open qty(VBAPD-ORFMNG) then system has to show a warning message and should not allow exceeded qty.

Srini

Former Member
0 Kudos

I have used the user exit but it impacts the qty when I try to change the suggested qty in the sales order screen to any other qty . The system always consider the open qty suggested by the calculation made in the user exit .

Also I am modifyingthe following values i.e VBAP-kwmeng & VBEP-WMNEG.

Thanks,

Anurag Goel