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

Classical Report Output.

Former Member
0 Likes
591

Hi,

I have a requirement wherein I have to show data in 3 tables(tabular form) on the same output screen of a report.

Each table shows different data with different field headings.

Could you please help me in doing it.

Thanks,

Sandeep.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
566

you can use VLINES and ULINES and format the data in 3 tables...i guess there is no straight way to create a table

REPORT ychatest.

WRITE : /1(14) sy-uline.
WRITE : /1 sy-vline , 'BOX1' , 7 sy-vline , 'BOX2' , sy-vline.
WRITE : /1(14) sy-uline.

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
566

You might want to try a block ALV list.

http://www.sap-basis-abap.com/abap/sample-program-on-block-lists.htm

Regards,

RIch Heilman

Read only

Former Member
0 Likes
567

you can use VLINES and ULINES and format the data in 3 tables...i guess there is no straight way to create a table

REPORT ychatest.

WRITE : /1(14) sy-uline.
WRITE : /1 sy-vline , 'BOX1' , 7 sy-vline , 'BOX2' , sy-vline.
WRITE : /1(14) sy-uline.

Read only

Pawan_Kesari
Active Contributor
0 Likes
566

This can be done by FMs

REUSE_ALV_BLOCK_LIST_INIT

REUSE_ALV_BLOCK_LIST_APPEND

REUSE_ALV_BLOCK_LIST_DISPLAY

refer program BALVBT01.

Read only

Former Member
0 Likes
566

Hi sandeep,

1. This simple program will give u an idea

of block alv.

2. It will print two alv

a) itab = table from t001

b) ptab = table from t000

3. Just copy paste in new program.

REPORT zam_temp54 .

type-pools : slis.

data : alvfc type slis_t_fieldcat_alv.

data : alvly type slis_layout_alv.

data : alvev type slis_t_event .

*----


DATA : BEGIN OF itab OCCURS 0.

include structure t001.

DATA: END OF itab.

DATA : BEGIN OF ptab OCCURS 0.

INCLUDE STRUCTURE t000.

DATA: END OF ptab..

*----


PARAMETERS : a TYPE c.

*----


start-of-selection.

*----


SELECT DATA

SELECT * FROM t001 into table itab.

select * from t000 into table ptab.

*----


INIT BLOCK ALV

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

i_callback_program = sy-repid.

*----


ADD INTERNAL TABLE ITAB

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = SY-REPID

I_INTERNAL_TABNAME = 'ITAB'

I_INCLNAME = SY-REPID

CHANGING

CT_FIELDCAT = ALVFC.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = alvly

it_fieldcat = alvfc

i_tabname = 'ITAB'

it_events = alvev

TABLES

t_outtab = ITAB

EXCEPTIONS

program_error = 1

maximum_of_appends_reached = 2

OTHERS = 3.

*----


ADD INTERNAL TABLE PTAB

REFRESH ALVFC[].

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = SY-REPID

I_INTERNAL_TABNAME = 'PTAB'

I_INCLNAME = SY-REPID

CHANGING

CT_FIELDCAT = ALVFC.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = alvly

it_fieldcat = alvfc

i_tabname = 'PTAB'

it_events = alvev

TABLES

t_outtab = PTAB

EXCEPTIONS

program_error = 1

maximum_of_appends_reached = 2

OTHERS = 3.

*----


DISPLAY

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'

EXCEPTIONS

program_error = 1

OTHERS = 2.

regards,

amit m.