2008 Dec 04 9:31 AM
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
2008 Dec 04 10:44 AM
2008 Dec 09 5:11 AM
2008 Dec 30 6:23 PM
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.
2008 Dec 13 2:35 PM
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.
2008 Dec 31 7:26 AM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |