‎2007 Apr 20 7:55 AM
How to validate the input screen as like the web page screen
Example:
If we are giving the integers in place of characters then it should throw the error like please use the character fields. The validation should occur, On spot.
Only after this validation, the cursor should go to the next input field.
‎2007 Apr 20 8:02 AM
Hi,
Declare a Parameter like
parameters: p_str(10).
in the at selection-screen even t write the validation like:
data: p_var(10) value '1234567890'.
if not p_str is initial.
if p_str CS p_var (means if the entered value contains string like numbers)
message e000 with please use the character fields.
( instead of CS you can use CA contains any)
endif.
endif.
reward points if useful
regards,
Anji
‎2007 Apr 20 7:58 AM
Hi Vijay,
You can use sy-abcde in this scenario.
Reward with points if this is useful
Regards,
Krishna K.
‎2007 Apr 20 7:59 AM
Hi,
using several events for selection screen
<b>At selection screen on vale request,
At selection screen on help request,
At selection screen output, ect</b>
using these events you can validate the selection screen.
for making the screen fields Active and inactive Use
<b>'LOOP AT SCREEN'</b>
Reg,
Hariharan Natarajan
‎2007 Apr 20 8:02 AM
Hi,
Declare a Parameter like
parameters: p_str(10).
in the at selection-screen even t write the validation like:
data: p_var(10) value '1234567890'.
if not p_str is initial.
if p_str CS p_var (means if the entered value contains string like numbers)
message e000 with please use the character fields.
( instead of CS you can use CA contains any)
endif.
endif.
reward points if useful
regards,
Anji
‎2007 Apr 20 8:05 AM
Hi,
Write in this event
At Selection-screen on p_field
IF p_field CA '0123456789'.
write ur message here.
endif.
Regards,
Sonika
‎2007 Apr 20 8:07 AM
Hi
I dont think, without any event you can check it. At least ENTER is required.
Bcoz cursor movement & even tab key is not recognised as a FCODE.
Sandeep
‎2007 Apr 20 8:12 AM
Hi,
If you are giving integers, then there might be possiblity that it may be a character.
For ex., if you giving 1 in character,eventhough it is integer it can be a character also.So you cannot validate it.
But if you want to restrict numbers,then you can use the following.But it will work only if you press enter or execute button.
parameters : p_c1(4) type c modif id z1,
p_i type i.
at selection-screen on p_c1.
if p_c1 ca '0123456789'.
message i000.
endif.
Kindly reward points by clicking the star on the left of reply,if it helps.