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

Get the selected items from select -option.

Former Member
0 Likes
407

Suppose there is a selection option s_matnr for material .And suppose User enters materials 1,2,5 and 9.

If i loop at the internal table for that selection -field. I will get s_matnr-low as 1. If the user gives a range from 1 to 9. S_matnr-high will be 9. But if he inputs only some selected materials instead of a range , I dont know how to display the selected materials. Hope u understood my requirement.

Thanking u in advance..

Shankar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
327

Hello Shankar,

If I have understood your requirement correctly, then it is fairly simple to meet it.

Consider the following code.


tables mara.
select-options s_matnr for mara-matnr.
start-of-selection.
  loop at s_matnr.
    write / s_matnr-low.
  endloop.

Is this what you wanted?

Regards,

Anand Mandalika.

Suppose there is a selection option s_matnr for material .And suppose User enters materials 1,2,5 and 9.

If i loop at the internal table for that selection -field. I will get s_matnr-low as 1. If the user gives a range from 1 to 9. S_matnr-high will be 9. But if he inputs only some selected materials instead of a range , I dont know how to display the selected materials. Hope u understood my requirement.

Thanking u in advance..

Shankar

1 REPLY 1
Read only

Former Member
0 Likes
328

Hello Shankar,

If I have understood your requirement correctly, then it is fairly simple to meet it.

Consider the following code.


tables mara.
select-options s_matnr for mara-matnr.
start-of-selection.
  loop at s_matnr.
    write / s_matnr-low.
  endloop.

Is this what you wanted?

Regards,

Anand Mandalika.