Application Development 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: 

Download data from multiple table

Former Member
0 Kudos

Hello,

I need to download data from multiple tables. I have tried with joins but they dont seem to be doing the correct thing, When the code runs it dosnt do anything. Additionaly that data that I am supose to download I need to insert it in an excel sheet. Is there an other way to download data from multiple tables with out using joins? Can someone provide some example codes or a good link. Thanks

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Alternative to select from multiple tables is to use For All Entries statement.

do something like this.

select field1
          field2
   from table1
into table itab1
where field1 in s_field1.

if not itab1[] is initial.
select field3
           field4
           field5
  from table2
into table itab2
for all entries in itab1
where field1 =itab1-field1
  and field2 in s_field2.
endif.

Use the function module GUI_DOWNLOAD to download the data to desktop as excel.

Regards,

Ravi

1 REPLY 1

former_member181962
Active Contributor
0 Kudos

Alternative to select from multiple tables is to use For All Entries statement.

do something like this.

select field1
          field2
   from table1
into table itab1
where field1 in s_field1.

if not itab1[] is initial.
select field3
           field4
           field5
  from table2
into table itab2
for all entries in itab1
where field1 =itab1-field1
  and field2 in s_field2.
endif.

Use the function module GUI_DOWNLOAD to download the data to desktop as excel.

Regards,

Ravi