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

SELECTION SCREEN VALIDATION

Former Member
0 Likes
423

HI ALL

pLZ TELL ME HOW TO VALIDATE SELECTION SCREEN.

I HAVE ARRIVAL NOTICE NO IN SELECTION SCREEN.ITS FIELD NAME IS

/RBC2/YV_ARRNO AND TABLE IS /RBC2/YV_AN_ARNO .

NOW I WANT TO VALIDATE ARRIVAL NOTICE NO.

AT SELECTION-SCREEN.

perform validations

form validations .

select /RBC2/YV_ARRNO from /RBC2/YV_AN_ARNO where /RBC2/YV_ARRNO in

s_arrno .

enDFORM

IT IS SHOWING ERROR IN THE ABOVE CODE. HOW TO SOLVE THIS.

3 REPLIES 3
Read only

Former Member
0 Likes
401

Hi,

data : l_arno like /RBC2/YV_ARRNO .

AT SELECTION-SCREEN on s_arrno.

select /RBC2/YV_ARRNO into l_arno from /RBC2/YV_AN_ARNO

where /RBC2/YV_ARRNO in s_arrno .

if sy-subrc ne 0.

print "error msg".

endif.

If it helps REWARD

rgds

harris

Read only

Former Member
0 Likes
401

hi

If you want to validate the field on the basis of some database value that is if it exists or not

it can be done as

select single <field name> from <table name> where <entered field > = < field in data base>

if sy-subrc ne 0 < throw error message>

hope it helps

reward if helpful

regards

Ankit

Read only

Former Member
0 Likes
401

hi,

try like this,

AT SELECTION-SCREEN. [ or use AT SELECTION-SCREEN on output]

select single * from /RBC2/YV_ARRNO where /RBC2/YV_ARRNO in

s_arrno . [ if it is a select option otherwise use '=' or 'EQ' ]

if sy-subrc ne 0.

message 'wrong value' type 'E'.

endif.

if helpful reward some points.

with regards,

Suresh Aluri.