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 using Key fields

RahulKeshav
Active Contributor
0 Likes
813

Hi All

I am using table T510 for validation of slection screen select-options fields TRFST.......

i want to use keys fields as well to validate it...

wt shld be the code....

plz help me...

Rohit

Edited by: Rohit Kumar on Dec 31, 2007 12:39 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
785

Hi..Rohith

For Efficient selection...you need to use Key fields in your

select statement.

For that, take an Internaltable with required fields

and select into that Internal Table.

And Check for sy-subrc.

Your problem will be solved.

Regards

Sandeep.

6 REPLIES 6
Read only

Former Member
0 Likes
785

Hi Rohit,

you are using TRFST in the select option,and you want to validate it..this you can do it using a select query as,

select TRFST from T510 into T510 where trfst = s_trfst ( s_trfst is the select option name).

is that you are looking for??

please revert back if you have any doubts..

please reward if helpful,

thanks&regards.

Read only

0 Likes
785

select TRFST from T510 into T510 where trfst = s_trfst

instead of = u have to use in for select-options.......

select TRFST

from T510

into l_trfst

where trfst in s_trfst .

i used this query......

and i want to change it by using key fields (ENDDA, etc).....thts wt i m looking for......

Edited by: Rohit Kumar on Dec 31, 2007 1:51 PM

Read only

0 Likes
785

if u want to validate it using other key fields...that is for a specific key u need a specific trfst is it??

then put your conditions in the where clause..those u think are mandatory..

if u want to change it w.r.t key fields then use if else condition...

hope its helpfull,

thanks&regards.

Read only

0 Likes
785

the problem is tht i used the following code.....

select TRFST

from T510

into l_trfst

where trfst in s_trfst .

but my senior told me why didnt u used key fields also....

so i m looking for select query like.....

select trfst key field1 endda from t510 into ....???(shold i have to declare some int.table or some othr ways)

plz help

Read only

0 Likes
785

Hi why U r senior idea is if u don't use Key fileds in selctions it will give errors in EPC or code inspector.

if u r functionality really not req key fields as select options then

for that just create dummy ranges for key fileds and put it in where condition along with actual select options.

Regds,

Suresh

Edited by: Suresh Reddy on Dec 31, 2007 11:41 AM

Edited by: Suresh Reddy on Dec 31, 2007 11:42 AM

Read only

Former Member
0 Likes
786

Hi..Rohith

For Efficient selection...you need to use Key fields in your

select statement.

For that, take an Internaltable with required fields

and select into that Internal Table.

And Check for sy-subrc.

Your problem will be solved.

Regards

Sandeep.