08-20-2007 10:10 AM
hi frnds ,
I want to use wild card character for decimal point numbers for following combinations
1 ) 123,45,56.89 many commas and one period
2) 123.45.56, 78 many periods and one comma.
3). 123 45 89.89 many spaces but one period
these are nothg but out user setting combinations for decimal notation . I need to compare the type of the number entered by the user with the user settings and if not matches then though an error hence i need to compare the number entered with these notations.
please provide me the wild card combination for these three.
<b>rewards will be given to the helpful answer</b>
thanks khushy
08-20-2007 10:14 AM
You could use the command : CATCH .. ENDCATCH.
to encapsulate your move with catch / endcatch.
you check the exception CONVT_NO_NUMBER, if SY-SUBRC ne then ... you know the number is not number for SAP regarding user configuration.
Fred
08-20-2007 10:14 AM
You could use the command : CATCH .. ENDCATCH.
to encapsulate your move with catch / endcatch.
you check the exception CONVT_NO_NUMBER, if SY-SUBRC ne then ... you know the number is not number for SAP regarding user configuration.
Fred
08-20-2007 10:18 AM
fred ,
thanks for your reply can you please more elobrate
using an example.
thanks,
khushy
08-20-2007 10:32 AM
My code is not working as I have immagined.
It check only if the amount is like SAP would like (means '.' as decimal indicator). Maybe you could use it ..
PARAMETERS : p_toto(20).
DATA : w_amount(13) TYPE p DECIMALS 2.
CATCH SYSTEM-EXCEPTIONS convt_no_number = 1
OTHERS = 2.
MOVE p_toto TO w_amount.
ENDCATCH.
break-point.
08-20-2007 10:42 AM
08-20-2007 10:20 AM
Hi,
I am not sure what is the input/field type user give, but you can goto USR01 and get the decimal notation DCPFM based on the user name (sy-uname) and compare the values whihc comes in.
Regards,
Baburaj
08-20-2007 10:24 AM
hi bahu raj how to comapre thats thats what i m confused i wil get the vlue from USR21 either blank , x, or y but what about the value enetred by the user how to check the cnotation for that.
thanks ,
khushy