‎2008 Sep 29 5:10 PM
hi all
my requirement is like this in one screen field which is of character type user is inputing data .
now while saving to the database i have to apply one external check for this data if it is integer type or not
as this data on the screen is refrenced to the database so i can not change the data type on the screen itself .
i have to check it externally from PAI ....... would any one please help on this
Thanks and regards
Papps
‎2008 Sep 29 5:12 PM
Hi,
Try
If w_field co '0123456789 '.
* Numeric
else.
* Non Numeric
endif.Darren
‎2008 Sep 29 5:36 PM
Hi Thanks for your Solution i have tried it but your proposed solution is not working
even if am providing all integers like 123 still it is giving me the error message .
its always showing the error message is there any other way ...
‎2008 Sep 29 5:44 PM
Have you included a space in the string '0123456789 '?
Space is required in the checking string, because your field will have space apartform digits.
Regards,
Naimesh Patel
‎2008 Sep 29 5:55 PM
Hi
Thanks again you are right i missed the space one ..
but Now another problem...
I have tried that but in that case even user can input data by mistake like this
123 4 but this is not an integer it should also give error as this is also not a correct integer ...
as par asi think . we have to aain check if there is any spaces in the data provided i guess or
is there any other procedure ?
‎2008 Sep 29 5:57 PM
‎2008 Sep 29 6:12 PM
Okay
Anyway thanks for your suggessions i have also added the points for you as its almost solved the problem.
‎2008 Sep 29 5:34 PM
Try out the ABAP Runtime Type Services (RTTS). This service lets you do all kinds of things dynamically at runtime. Refer to the class "cl_abap_structdescr"
For information and examples search the SDN on RTTS or RTTI.
~Ian
‎2008 Sep 29 6:03 PM
Hello,
Please see this: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b332e090-0201-0010-bdbd-b735e96f...
Regards