‎2006 Feb 28 10:09 AM
Hi All,
I hav a requirement to reterive data from 5 different DataBase Table. And all those datas has to be displayed in ALV fromat as output. The Company logo should be displayed in the report at the time of displaying.
Is there any simple way to do this.
help and Suggestions will be much Appreciated.
Thanks & Regds.
Ganesh.
‎2006 Feb 28 10:18 AM
1.get the required datas from database tables(Try to for all entries rather than inner joins) and store it in internal tables.
2.use that itab in alv for display
3.for the logo use the transaction se71 for sapscript and use the command BITMAP <OBJECT NAME> ID <OBLECT ID> for displaying the logo
<b>reward if helpful</b>
Message was edited by: Ashok Kumar Prithiviraj
‎2006 Feb 28 10:13 AM
Hi,
Look at the links.. will help you a lot.
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
Thanks.
If this helps you reward with points.
‎2006 Feb 28 10:15 AM
Use individual selects or Joins and retrieve the data into the internal table.
Next you can use this internal table to populate the field catalog and then you can display logo using ALV_COMMENTARY_WRITE.
Check the sample program : BALVST02_GRID.
Message was edited by: Wenceslaus G
‎2006 Feb 28 10:16 AM
Hi,
ABAPDOCU - >open SQL->Read data :
you have several examples for select statements.
in programs BCALV_GRID_* : you have several ALV example.
Please check these for your reference.
Laxman
‎2006 Feb 28 10:17 AM
Hi,
Try to for all entries rather than inner joins.
select f1 f2 from tab1 into itab1 where condition.
select f1 f3 from tab2 into itab2 for all entries in itab1 where f1 = itab1-f1.
loop at itab1 into wa1.
wa-f1 = wa1-f1.
wa-f2 = wa1-f2.
use read or loop according to the entries.
then populate wa2-f3 to wa-f3.
append wa to itab.
endloop.
In this case itab will be your final internal table to be used for ALV.
Click this link for sample code in ALV.
http://www.geocities.com/mpioud/Abap_programs.html
Kindly reward points by clikcing the star on the left of reply,if it helps.
‎2006 Feb 28 10:17 AM
hi Ganesh,
You can use REUSE_ALV_COMMENTARY_WRITE to display the logo in your ALV..
use Select on one table first..
and then use FOR ALL ENtries and join two tables ..
repeat it till you get the desired result.. for good performance do not use joins more than 3 times..
regards
satesh
‎2006 Feb 28 10:18 AM
Look at BCALV* reports
For logo example look at : BCALV_FULLSCREEN_DEMO
‎2006 Feb 28 10:18 AM
1.get the required datas from database tables(Try to for all entries rather than inner joins) and store it in internal tables.
2.use that itab in alv for display
3.for the logo use the transaction se71 for sapscript and use the command BITMAP <OBJECT NAME> ID <OBLECT ID> for displaying the logo
<b>reward if helpful</b>
Message was edited by: Ashok Kumar Prithiviraj
‎2006 Feb 28 10:25 AM
hi,
use select statements to retrieve data from the 5
database tables and place it in a single internal table.
use (for all entries) or 5 different selects or views
instead of joins for best performance.
now use the fn module reuse_alv_grid/list_display and
pass itab to it.
to display logo, u need to handle top_of_page and in that
top_of_page form u need to call reuse_alv_commentary_write.
ex:
&----
*& Form top_of_page
&----
text
----
FORM top_of_page.
DATA : text(40),txtdt(40),comp(30) .
v_comp = S_BUKRS.
CLEAR string.
string = 'Summary of Receivables from Customers'(hd2).
wa_header-typ = 'H'.
wa_header-info = string.
APPEND wa_header TO heading.
CLEAR string.
wa_header-typ = 'S'.
WRITE : ' Date :' TO txtdt,sy-datum TO txtdt+20 DD/MM/YY.
WRITE sy-datum TO dat DD/MM/YY.
wa_header-info = txtdt.
APPEND wa_header TO heading.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = heading.
CLEAR heading.
ENDFORM. "top_of_page
Note: if u want to put ur company logo
1. check whether the logo is there in ur application server or not
2. if not there, go to tcode OAER, class: PICTURES,
type:OT , go inside and select document type and upload ur company logo and give a name.
now u can give that name in REUSE_ALV_COMMENTARY_WRITE
‎2006 Feb 28 10:29 AM
Hi Ganesh,
You can Joins or/and FOR ALL ENTRIES to retrieve the data from database tables into corresponding internal tables.
Then, move the data from all internal tables into one final internal table.
Next, populate the field catalog using FM 'REUSE_ALV_FIELDCATALOG_MERGE'.
You can display Company logo using Function Module 'REUSE_ALV_COMMENTARY_WRITE'.
Hope it helps.
Regards,
Neeraj Gupta