09-24-2008 6:23 AM
Dear all,
I have one i/o box in module pool pro.,
And user should be allowed to enter ALPHABETs ( A to Z)
but not the NUMBERs ( 0 to 9 ).
For this I defined the field's format as STRG in screen attributes.
But as soon as i execute the Tcode for this module pool , it gives runtime error as CONVERSION_FAILED_ERROR..
Could anybody suggest me the solution...
<<< REMOVED BY MODERATOR >>>
Please see the [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] for more informations.
Edited by: Marcelo Ramos on Nov 21, 2008 11:48 AM
09-24-2008 7:25 AM
Hi,
Try this.
Let it be declared as CHAR, but when writing the validation code, chk whether it contains any numbers in it.
If your i/o box name is var1.
if var1 CA '0123456789'.
<display ur msg>
endif.
Sharin.
09-24-2008 6:28 AM
09-24-2008 7:05 AM
defining CHAR format allows Alphabets and Numbers as well.
I only want to allow Alphabets BUT NOT NUMBERS...
09-24-2008 7:21 AM
You can write a validation code for that problem to handle.When we use the datatypes almost all type support either character or numbet other \wise both ....so it wil be better than u can check for the presence of numbers in that entry.
09-24-2008 7:25 AM
Hi,
Try this.
Let it be declared as CHAR, but when writing the validation code, chk whether it contains any numbers in it.
If your i/o box name is var1.
if var1 CA '0123456789'.
<display ur msg>
endif.
Sharin.
09-24-2008 7:30 AM
Dear Sharin,
thanks for reply..
But the solution you suggest will allow user to enter any character...( i.e. both ALPHABETS and NUMBERS )...
and then we validate in PAI...
But my requirement is " NOT ALLOWING to enter Alphabets"
Could you suggest me further soln...........
Thanks
11-21-2008 3:37 PM
Hi,
It is not possible to restrict the user while entering the values in the i/o field itself because there is no option for that to do ....the only way we can do is to validate after user enter the values in that field....
Regards,
Rohan.
02-17-2009 6:13 AM