‎2007 Aug 09 5:45 AM
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.
‎2007 Aug 09 5:51 AM
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
‎2007 Aug 09 5:51 AM
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
‎2007 Aug 09 5:55 AM
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.