‎2009 Mar 09 9:48 AM
Dear all,
I am using a userexit to check the user name and accordingly allow or not the user to fill
VBAK-KVGR1
Now I want a further check. I want the system not to take into account the user (and therefore allow to fill or modify the VBAK-KVGR) if the total amount of the quotation or sales order is less that 1,000 Euros
Can you please help me in which user exit to use and a sample code.
I have tried it a lot but I think especially I have problem when trying to write in the code the amount (don't know how to form the abap statement)
‎2009 Mar 09 3:31 PM
Hi Stilianos,
you should check if you can use OVA8 to set your check before proceed.
Use exit USEREXIT_SAVE_DOCUMENT_PREPARE(MV45AFZZ)
and check value XVBAK-NETWR.
regards,
edgar
‎2009 Mar 10 6:23 AM
Suggesting that the value is 1000euro how should I form the ABAP statement
IF XVBAK-KWERT > '1000'.
is this right because I am facing abap error when trying to interpret 1000 as a number.
‎2009 Mar 10 6:55 AM
Putting the 'number' between quotes, that would suggest a character. Just loose the quotes and it will be treated as a number.
BTW: Is the currency always euro? Otherwise, you will have to do the conversion from one currency to EURO as well.