Application Development and Automation 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: 
Read only

Validation at selection screen

Former Member
0 Likes
849

hi i need to validate a field at the selection screen on filed event.

i field is allowed only to enter alfa character or *,how can i validate is there any key word please let me know.imm points are rewarded.thans alot

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
832

Hi,

Check this code.

At Selection-screen on P_FIELD.

if P_field CA sy-abcde.

if P_Field CO '*'.

---then correct.

else

---give error message.

endif.

Reward if helpful.

Regards.

7 REPLIES 7
Read only

Former Member
0 Likes
833

Hi,

Check this code.

At Selection-screen on P_FIELD.

if P_field CA sy-abcde.

if P_Field CO '*'.

---then correct.

else

---give error message.

endif.

Reward if helpful.

Regards.

Read only

Former Member
0 Likes
832

PARAMETERS : field1(10) TYPE c.

AT SELECTION-SCREEN ON field1.

IF field1 NA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ*'.

MESSAGE 'Invalid Entry' TYPE 'E'.

ENDIF.

Regards,

V.Balaji

Read only

Former Member
0 Likes
832

Hi,

REPORT ZTEST_SELE.

parameters: test type c.

at selection-screen.

if test ne '*' or test ne'#'.

message e000(sorry).

endif.

Award Points if useful.

Read only

Former Member
0 Likes
832

hello

find below the code for validating the alfa and * .

if not i_filed CS all the alfa chars.

message '...........................' type 'E'.

endif.

Read only

Former Member
0 Likes
832

Hi,

To validate a field on selection screen use the event----

At selection-screen on <field>.

If field NE '*' or alfa.

message e000(zmsg).

endif.

regards,

vineela.

Read only

Former Member
0 Likes
832

Hi,


At Selection-screen on p_field.

if not p_field CO sy-abcde or p_field NE '*'.
  message E001(zmsg).
endif.

rgds,

bharat.

Read only

Former Member
0 Likes
832

Hi

You can check it using AT SELECTION-SCREEN ON FIELD < XYZ>

CHECK <XYZ> CA SY-ABCDE OR <XYX> EQ '*'.

MESSAGE < >.