Application Development 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: 

Problem in changing Schudle line quantity in sales order

Former Member
0 Kudos

Hi SAP guru ,

I am stuck an issue . Please help me out .

As there is requirement when user run the VA01/VA02  all schedule lines will be calculated some certain logic which I have done by writing code in user exit 'MV45AFZZ '  SAVE_PREPARE' or 'SAVE_DOC' form ...I have changed the data of XVBEP internal table with my new quantity . which works fine .

But now problem is that some order quantity comes from APO system now my code of MV45AFZZ runs and lines of XVBEP got changed . now when we checked that order through VA03,schedule line quantity is not changed .

if any one need more details please let me know .

Can any one suggest some solution ..becoz i am out..

Thanks

Vikrm

8 REPLIES 8

Former Member
0 Kudos

How do you know that APO actually hits your code in MV45AFZZ?  I can suggest a way to make certain if you need it...

Neal

0 Kudos

Hi Neal ...Thanks for reply  ..I have write endless loop ..like below and then debug the same by using SM50 ...means when APO send data and order will be created it will stuck in loop and in rum time I will change the value and debug the same .

If you have any better  idea please suggest .

*data:

*    w_Var type i value 6.

* do.

*  if w_var < 5.

*      exit.

*   endif.

* w_var = w_var .

*enddo.

Thanks

Vikram

0 Kudos

Just for future thought, you can write debug messages and debug values to tvarvc freely.  It is much easier...

Neal

0 Kudos

Hi neal ...I have never used this method.. can you please post all step here so that I can follow ...it will save my time to learn this method..

Vikram

Former Member
0 Kudos

So then,  You actually know that it is going through your code for changing XVBEP in MV45AFZZ?

And saving with the values unchanged?

Neal

0 Kudos

Yeah Neal ..you catch the right point ...when data is coming from APO I have changed the value of XVBEP but in save time is got unchanged...but in case of VA02 when value of XVBEP is changed is save time is perfectly reflected .

Vikram

0 Kudos

Perhaps for APO it goes through an overwrite later.  Can you move your code to a commit time exit?

Neal

0 Kudos

I have written code on SAVE of MV45AFZZ ....let me debug the code if I found some thing ,,,my luck