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

Fill an internal table using RANGES

Former Member
0 Likes
1,832

Hi,

I need to create an internal table with a join of several select options for then update another internal table.

I've this:

SELECT-OPTIONS: s_auart FOR zsd_ctrl_export-auart,

s_kunnr FOR zsd_ctrl_export-kunnr,

s_matnr FOR zsd_ctrl_export-matnr,

s_kwmenge FOR zsd_ctrl_export-kwmenge.

and i need to create a table with for all values in different select options i need to fill a table with this structure:

for exemple:

s_auart have values from Z200 to Z600

s_matnr have 2 or 3 materials

s_kunnr have some values

s_kwmenge have 1 value only.

at end my final table most be like this

AUART KUNNR MATNR KWMENGE

Z200 19999 1111111 1

Z300 19999 111111 1

Can i do "loop's" for a range ?

Thanks

Edited by: Ricardo Filipe Pimenta on Nov 26, 2009 5:41 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
965

Hi,

You can loop on your select options and fill the final internal table.

Write your logic to handle 'I" (Include), 'E' (Exclude), 'EQ' and the rest.

Hi,

I need to create an internal table with a join of several select options for then update another internal table.

I've this:

SELECT-OPTIONS: s_auart FOR zsd_ctrl_export-auart,

s_kunnr FOR zsd_ctrl_export-kunnr,

s_matnr FOR zsd_ctrl_export-matnr,

s_kwmenge FOR zsd_ctrl_export-kwmenge.

and i need to create a table with for all values in different select options i need to fill a table with this structure:

for exemple:

s_auart have values from Z200 to Z600

s_matnr have 2 or 3 materials

s_kunnr have some values

s_kwmenge have 1 value only.

at end my final table most be like this

AUART KUNNR MATNR KWMENGE

Z200 19999 1111111 1

Z300 19999 111111 1

Can i do "loop's" for a range ?

Thanks

Edited by: Ricardo Filipe Pimenta on Nov 26, 2009 5:41 PM

3 REPLIES 3
Read only

Former Member
0 Likes
965

Hi,

In your case , you can loop on select option.

Read only

Former Member
0 Likes
966

Hi,

You can loop on your select options and fill the final internal table.

Write your logic to handle 'I" (Include), 'E' (Exclude), 'EQ' and the rest.

Read only

Former Member
0 Likes
965

Hello,

It wouldn't really make sense to just loop at the select options and build your final internal table. Make a select query on your custom table zsd_ctrl_export with all the mentioned select-options in the where conditions and populate the final internal table

Vikranth