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

ALV Report program linking 5 db tables.

Former Member
0 Likes
1,124

What should be the general approach to generate a simple ALV program that links 5 database tables, where the selection criteria is date field?

Edited by: Matt on Dec 4, 2008 11:38 AM - Removed all caps

What should be the general approach to generate a simple ALV program that links 5 database tables, where the selection criteria is date field?

Edited by: Matt on Dec 4, 2008 11:38 AM - Removed all caps

5 REPLIES 5
Read only

Former Member
0 Likes
726

Hi

Refer This Link

Ranga

Read only

mvoros
Active Contributor
0 Likes
726

Hi,

you can use SAP Query for this purpose. Check transaction SQ01 or try to look for documentation here on SDN. For example this blog: or this one might be helpful for you.

Cheers

Read only

Former Member
0 Likes
726

SAP Query is a bit of an abomination -- complicated to use correctly and definitely difficult to maintain.

If you need to get stuff from 5 different databases in one report it might be better from a Systems Performance perspective to create a "Z_object" containing the data you want and then simply run your ABAP ALV against your "Z_Object".

Depending on the frequency / content of your report you could run say a batch job every evening to update your "Z_Object".

The other possibility would be to run your query on a BW/BI system if the volume of data is quite large -- however if you don't have BW then OK this is not a possible solution.

My preference would be to go for the "Z-Object".

I also have to wonder at how the original application was designed if you really do need to collect data from 5 different data bases --perhaps you should re-design the original application.

Cheers

jimbo.

Read only

former_member217544
Active Contributor
0 Likes
726

Hi,

For getting the data from 5 db tables into an internal table, you can use inner joins to join all the db tables and connect each table with the common field. For getting teh idea of how to use inner join you can search in sdn or you can go for F1 help or go to transaction ABAPDOCU and type "Join ", you will get an example of join.

Regards,

Swarna Munukoti.

Read only

Former Member
0 Likes
726

Hi,

Use for all entries option to get the data from 5 Database tables into internal table. If you use inner join then you face performance issues. Because inner join directly get data from DB tables. So it increases traffic at DB. Better use for all entries option.

Regards

Md.MahboobKhan