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

Former Member
0 Likes
419

I am trying to achieve the following and have do not know how to go about

it:

On the my ABAP program selection screen for vbap-vstel I want to select all

items with a vstel with the third and forth positions = to 02 through 05.

Any help would be greatly appreciated.

Thank you,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
395

Hi,

What is your requirement exactly? As per my understand

You want to get the data from DBtable in where conditon vstel field 3rd and 4th positions are EQ to '02', '03', '04', '05' in any one should be match.

If it is correct see below eg:

select * ...............

where 2(1)+vstel in ('02', '03', '04', '05' ) and

3(1)+vstel in ('02', '03', '04', '05' ) .

Thanks

Ganesh

3 REPLIES 3
Read only

Former Member
0 Likes
395

Not sure exactly what you mean - have you tried the "AT SELECTION

SCREEN" event? This allows you to run a block of code (such as a SELECT

SINGLE) before the selection screen is displayed.

Read only

Former Member
0 Likes
395

I too am confused as to what your requesting, but.. if you looking for a SELECT statement to do what your asking...



SELECT * FROM vbap
  WHERE vstel LIKE '%02'
     or vstel LIKE '%03'
     or vstel LIKE '%04'
     or vstel LIKE '%05'.

* Do something

ENDSELECT.

This will work.. but it will be pretty slow.

Read only

Former Member
0 Likes
396

Hi,

What is your requirement exactly? As per my understand

You want to get the data from DBtable in where conditon vstel field 3rd and 4th positions are EQ to '02', '03', '04', '05' in any one should be match.

If it is correct see below eg:

select * ...............

where 2(1)+vstel in ('02', '03', '04', '05' ) and

3(1)+vstel in ('02', '03', '04', '05' ) .

Thanks

Ganesh