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: 

Wild card characters

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos

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

6 REPLIES 6

FredericGirod
Active Contributor
0 Kudos

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

0 Kudos

fred ,

thanks for your reply can you please more elobrate

using an example.

thanks,

khushy

0 Kudos

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.

0 Kudos

thanks alot fred its working for m e...

regards,

Khushby

Former Member
0 Kudos

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

0 Kudos

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