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

getting values from select option

Former Member
0 Likes
821

Hi,

I have a requirement where the user is going to pass values in select-option in low and high. lets say s_bwart(movement types).

now i have to fetch this bwart values into an internal table.

my internal table will be having only one field that is bwart. so how do i populate my internal table with those values. could any body help me in this.

Thanks in advance

neha

6 REPLIES 6
Read only

Former Member
0 Likes
746

move s_bwart-low to itab-bwart.

append itab.

move s_bwart-high to itab-bwart.

append itab.

But why move to new table?

Read only

Former Member
0 Likes
746

hi Neha,

do this way ..

at selection screen.
select bwart from <Table> into table itab where bwart in s_bwart.

this way it fetches all the bwart values within the range of s_bwart.

Regards,

Santosh

Read only

0 Likes
746

I think I misunderstood the question. If the user is using your select option to provide a range and you need all values within that range, then use the solution provided by Santosh.

Read only

Former Member
0 Likes
746

Hi,

start-of selection.

if not b_bwart[] is initial.

loop at s_bwart.

if s_bwart-sign = 'BT'.

itab-bwart = s_bwart-low.

append itab.

itab-bwart = s_bwart-high.

append itab.

else.

itab-bwart = s_bwart-low.

append itab.

endif.

endif.

Regards

Amole

Read only

Former Member
0 Likes
746

hi Neha,

This can be achieved but why do you want to move all the values between s_bwart-low and high into an internal table. What is the exact requirement? Select-options allows you to choose the value as per your requirement.

Like...

- you can select between low and high.

- you can select two or more distinct values by selecting the arrow and filling the values in the table control. thus the selection only contains the values filled in there.

- you can choose excluing any value... and so on.

select bwart 
  from <table> 
  into table itab 
 where bwart in s_bwart.

Regards,

Richa

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
746

Hi, when using SELECT-OPTIONS, use can pretty much do any kind of selection he wants, including ranges, and excluding values, so the best way to handle it is to select from the data base when the user executes the report. for example.

data: begin of ibwart occurs 0,
      bwart type mseg-bwart,
      end of ibwart.

select-options: s_Bwart for mseg-bwart.

start-of-selection.

select bwart into table ibwart 
           from <b>T156</b>
                 where bwart in s_bwart.

Regards,

Rich Heilman