Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SO user exit problem

Hi experts,

In VA01 at Item level, condition tab i want to check price

limit.If it is more than 500 i want to through the message.So i have written the following code using FORM USEREXIT_SAVE_DOCUMENT in MV45AFZZ program.


data: v_total like vbap-netwr.

check sy-tcode = 'VA01' or sy-tcode = 'VA02'.
check sy-dynno = '5003'.

check vbak-auart = 'ZR01' or
      vbak-auart = 'ZR02'.
 
loop at xvbap where abgru = 'ZC'.
     v_total = v_total + <b>xvbap-netwr</b>.
endloop.
 
if v_total gt 500.
      message e000(zmsg) with
         'FOC sales order limit exceeded!'.
endif.

Now everything is fine.But,if iam creating SO with VA01, <b>xvbap-netwr not picking the value</b>.If in VA02 (change mode)it is picking the value and program is working fine.

Can any one tell me what might be the reason?

Do this program is storing <b>NETWR</b> value in other TABLE insead of XVBAP in VA01 mode?

Reward guaranteed

Thanks

kaki

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question