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

Move data from internal table to select options-low

0 Likes
1,561

Dear all,

I want to move all internal table data to select-option - low as I want to use this select-option in select query I want new abap syntax query due to performance issue

*start code

types: begin of ys_mat,

matnr type matnr,

end of ys_mat.

gt_material type table of ys_mat

select-option: so_matnr for mseg-matnr

*end code

I want to move data of gt_material-matnr to so_matnr-low

*cannot use loop ... endloop

*please suggest new abap syntax

Dear all,

I want to move all internal table data to select-option - low as I want to use this select-option in select query I want new abap syntax query due to performance issue

*start code

types: begin of ys_mat,

matnr type matnr,

end of ys_mat.

gt_material type table of ys_mat

select-option: so_matnr for mseg-matnr

*end code

I want to move data of gt_material-matnr to so_matnr-low

*cannot use loop ... endloop

*please suggest new abap syntax

2 REPLIES 2
Read only

Sandra_Rossi
Active Contributor
1,471

The "new ABAP syntax" has nothing to do with performance.

What did you try? Why do you have an issue?

Read only

emanuel_klenner
Active Participant
1,471

With new ABAP syntax you don't need to move the data from gt_material to a select-options table.
You can use the table directly in a query:

SELECT FROM xxx
FIELDS F1, F2, ... 
WHERE matnr IN ( SELECT matnr FROM gt_material AS mat ).

If you must use the so_matnr select-option then try:

so_matnr = VALUE #( FOR <ls_mat> IN gt_material
                            ( sign     = 'I'
                              option   = 'EQ'
                              low      = <ls_mat>-matnr
                            )
                          ).