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 required

Former Member
0 Likes
536

SELECT-OPTIONS:s_datbg FOR vttk-datbg OBLIGATORY .

SELECT-OPTIONS:s_tplst FOR vttk-tplst OBLIGATORY .

SELECT-OPTIONS:s_route FOR vttk-route.

SELECT-OPTIONS:s_tdlnr FOR vttk-tdlnr.

SELECT-OPTIONS:s_shtyp FOR vttk-shtyp.

SELECT-OPTIONS:s_vsart FOR vttk-vsart.

i need to validate all the above fields in at selection-screen event but i want to hit the vttk table only once is there any way of doing it.

4 REPLIES 4
Read only

Former Member
0 Likes
510

HI..,

that depends on your requirement..

<b>select *

from vttk

into wa_vttk

up to 1 rows

where datbg in s_datbg and

tplst in s_tplst and

route in s_route and

tdlnr in s_tdlnr and

shtyp in s_shtyp and

vsart in s_vsart.

if sy-subrc ne 0.

message 'Data not found' type 'E'.

endif.</b>

regards,

sai ramesh

Read only

Former Member
0 Likes
510

hi,

Simiarly do it for other fields too.

tables : vttk.

at selection-screen.

select single * from vttk into vttk where datbg in s_datbg.
if sy-subrc <> 0.
 message e100 ...
endif.

Read only

Former Member
0 Likes
510

HI,

u can validate combination of all fileds by hitting only once. if u want to validate the existence of each and every field u have to hit one time for each field.

so depending on your requirement u can code your program.

Read only

Former Member
0 Likes
510

ur answers doesnt help me because i need to validate and check for field existence, so if i use select st for each and every field then peroformance issue occcurs