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

report in a table

Former Member
0 Likes
1,001

hi!

Can someone explain how to write a report output in a tabular column?

thanks,

Srikanth.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
959

Can you explain a little more, what exactly are you looking for?

A ALV report is display in a tabular format. Take a look at these examples.

http://www.geocities.com/mpioud/Abap_programs.html

http://www.sap-img.com/abap-function.htm

You can also look at BCALV programs in SE38 in your systems.

Regards,

Ravi

Note - Please mark all the helpful answers

hi!

Can someone explain how to write a report output in a tabular column?

thanks,

Srikanth.

10 REPLIES 10
Read only

Former Member
0 Likes
960

Can you explain a little more, what exactly are you looking for?

A ALV report is display in a tabular format. Take a look at these examples.

http://www.geocities.com/mpioud/Abap_programs.html

http://www.sap-img.com/abap-function.htm

You can also look at BCALV programs in SE38 in your systems.

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

0 Likes
959

Thanks Ravi!

Cheers

Read only

Former Member
0 Likes
959

hi

use ALV method to output in tabular column

Regards

Usman

Read only

0 Likes
959

thanks Usman!

cheers

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
959

You mean ALV?

Regards,

Rich Heilman

Message was edited by:

Rich Heilman

Read only

0 Likes
959

yeah Rich!

I think I got the answer.

thanks.

Read only

Former Member
0 Likes
959

Hi,

use the ALV FM REUSE_ALV_LIST_DISPLAY to display the ouput in tabular form..

Check this sample report..

TYPE-POOLS: slis.

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.

DATA: BEGIN OF wa_mara,

matnr LIKE mara-matnr,

bismt LIKE mara-bismt,

ernam LIKE mara-ernam,

ersda LIKE mara-ersda,

maktx LIKE makt-maktx,

END OF wa_mara.

DATA: v_repid TYPE syrepid.

v_repid = sy-repid.

DATA it_mara LIKE STANDARD TABLE OF wa_mara.

SELECT *

FROM mara

INTO CORRESPONDING FIELDS OF TABLE it_mara.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = v_repid

i_internal_tabname = 'WA_MARA'

i_inclname = v_repid

CHANGING

ct_fieldcat = gt_fieldcat.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

it_fieldcat = gt_fieldcat

TABLES

t_outtab = it_mara.

Thanks,

Naren

Read only

0 Likes
959

Thanks Naren!

I think I have got the answer.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
959

Yep, ALV is a good tool to display tabular data. It allows the user to sort and filter as they need, without you having to program it. There are two ways to implement in older versions of SAP, one is to use the function module and the other is to use the class CL_GUI_ALV_GRID. Examples of this have already been mentioned.

In the netweaver release(starting with 6.40) there is the ALV Object model which is an encapsulation of the ALV tool. Everything that you can do with the function module and the class(mentioned above) can be done using the ALV OM. The ALV object model is totally ABAP OO, which makes it nice to work with. Here is a tutorial.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/alv%20object%...

Here is the help.

http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm

Also, you may want to take away the 6 points that you awarded to my post above as it is hardly helpful.

Regards,

Rich Heilman

Read only

0 Likes
959

Thanks a lot Rich!

You have been so helpful. Don't worry abt the points as I'm very new to ABAP, any suggestion is a big help o me.

Thanks once again.

cheers,

Srikanth.