Application Development 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: 

Select-option

Former Member
0 Kudos

hi all,

I am new to ABAP give me one example for

select options and give me meterial for this. I tried

for this but it get systax error in the please give me

suggation.

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
8 REPLIES 8

gopi_narendra
Active Contributor
0 Kudos

tables : vbak.

select-options : so_vbeln for vbak-vbeln.

write this and jst press F8(execute).

Also use the F1 help

Regards

Gopi

kesavadas_thekkillath
Active Contributor
0 Kudos

type select-options.and press F1 .u will get the complete help

Former Member

Former Member
0 Kudos

Hi.

SELECT-OPTIONS : so_vbeln FOR vbrk-vbeln.

SELECT * FROM vbrk INTO TABLE it_vbrk

WHERE vbeln = so_vbeln.

here, it vil take all records from vbrk table which matches ur vbeln condition, which vil be given by u in the sel scr....

Reward , if it helps

Former Member
0 Kudos

Hi,

Try this code

tables : mara.

data i_mara typr mara with header line occurs 0.

select-options : s_matnr for mara-matnr.

if s_matnr[] not initial.

select * from mara into table i_mara where matnr in s_matnr.

if sy-subrc = 0.

loop at i_mara.

write i_mara-matnr.

endloop.

endif.

endif.

Regards,

Pankaj

radhushankar
Participant
0 Kudos

Hi

Select options will give u a option for defining a selelction range in the selection screen.

The example for select-options is

select-options: vbeln for vbak-vbeln.

if u use this query it will create a internal table like low high sign option.

the value which u are entering in the select option screen will get filled in the internal table which mentioned above.

In the selection query if u use a slect optoin in the where clause u have to use like this

Select *

from vbak

into itab_vbak

where vbeln in vbeln.

Thanks

arun

Former Member
0 Kudos

Former Member
0 Kudos

Hi,

select-options is used for creating a selection screen for entering input

values as user wants to see the output.

here if you code as selecti-options : s_lifnr for lfa1-lifnr.

it will display input from range to to range.

means we can able to give input as lower limit to upper limit.

Regards,

swami