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

taking data from select - option into internal table

muditbathwal621
Explorer
0 Likes
1,870

Hi ,

I have declared a select option as under:

select-options: s_matnr type matnr.

now i want to loop at the data from the select option & do some operation , how can i take each data into an internal table, with all SIGN,OPTIONS,LOW & HIGH value.

Regards,

Mudit

6 REPLIES 6
Read only

Former Member
0 Likes
1,276

first of all, you select-option should be for a table-field, like mara-matnr.

try:

tables: mara
 ...
select-option: s_matnr for mara-matnr.
...
  select matnr from mara into table it_matnr "where defined as a table with one field matnr....
      where matnr in s_matnr.

this wil give you a table of materials that matched your selection input.

Read only

0 Likes
1,276

Hi,

Thanks for the solution, but the internal table in which i m populating the data will have only the value not the sign and option field

how can i populate that too,

Regards,

Mudit

Read only

0 Likes
1,276

Use f1 help on Select-option and then Ranges , you will get the answer.

Read only

0 Likes
1,276

Hi,

you need to just loop at to your select option field it will have all sign option low and high.


parameters : s_vbeln for vbak-vbeln.

loop at s_vbeln.
write : / s_vbeln-sign, s_vbeln-option,s_vbeln-low,s_vbeln-high
enloop.

Thanks,

Anmol.

Read only

Former Member
0 Likes
1,276

Select option itself is like internal table ,you can perform some logic for select as below,

Loop at <sel_opt>.

.

.

.

here you can write you logic.

.

.

endloop.

Read only

Former Member
0 Likes
1,276

Moderator message - Please do not ask or answer basic questions - thread locked Rob