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

Regd: Retrieving Data's from Differnet Tables

Former Member
0 Likes
1,001

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
974

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

9 REPLIES 9
Read only

Former Member
0 Likes
974

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.

Read only

Former Member
0 Likes
974

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

Read only

Laxmana_Appana_
Active Contributor
0 Likes
974

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

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
974

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.

Read only

Former Member
0 Likes
974

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

Read only

Former Member
0 Likes
974

Look at BCALV* reports

For logo example look at : BCALV_FULLSCREEN_DEMO

Read only

Former Member
0 Likes
975

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

Read only

hymavathi_oruganti
Active Contributor
0 Likes
974

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

Read only

Former Member
0 Likes
974

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