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

ALV report

Former Member
0 Likes
1,041

I hv a question about using ALV report.

I have a abap report which will display 2 result reports.

Ie first data will be displayed in 4 colums and another will hv 6 columns.

how can I use ALV in this way?

so far I only used ALV for one reporting format in a abap report.

I hv a question about using ALV report.

I have a abap report which will display 2 result reports.

Ie first data will be displayed in 4 colums and another will hv 6 columns.

how can I use ALV in this way?

so far I only used ALV for one reporting format in a abap report.

9 REPLIES 9
Read only

Former Member
0 Likes
962

Hello Duxton

Can you confirm if you need to display both reports in a single screen or one at a time???

Kind Regards

Eswar

Read only

0 Likes
962

it will be one at a time...

For example first page display data in 4 columns

and after the completed in the first set of data, the second set of data to be display in 6 columns.

Each report format have different header and column names.

Read only

0 Likes
962

Hi Duxton,

Check the standard report BALVBT01

which makes use of the function module : REUSE_ALV_BLOCK_LIST_APPEND

Regards

- Gopi

Read only

0 Likes
962

Hi Duxton

Please check if you need something like the output in program: <b>BALVBT01</b>???

or

First display the list with four columns and when the user comes out, need to display the second list with six columns???

Kind Regards

Eswar

Read only

0 Likes
962

I hope this program will be much better for you using CL_GUI_ALV_GRID:

<b>SDTXT1AID</b>

Kind Regards

Eswar

Read only

gopi_narendra
Active Contributor
0 Likes
962

Use the FM: REUSE_ALV_BLOCK_LIST_APPEND

Regards

- Gopi

Read only

Former Member
0 Likes
962

Hi ,

If you create the screen and 2 Containers in that you can display 2 ALV reports on the same screen .

If you use the ALV with Class then it would be easier for you .

If you are using the FM you need call the same FM twice passing the 2 different containers

Read only

0 Likes
962

Would appreciate greatly any sample codes to start off.

Read only

Former Member
0 Likes
962

Hi

as per your requirement you have to use alv block report.

try to use 2 FM

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

I_CALLBACK_PROGRAM = V_REPID.

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • IT_EXCLUDING =

and

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

IS_LAYOUT = W_LAYOUT

IT_FIELDCAT = T_FIELD

I_TABNAME = 'ITAB1'

IT_EVENTS = T_EVENTS

IT_SORT = T_SORT

  • I_TEXT = ' '

TABLES

T_OUTTAB = ITAB1

EXCEPTIONS

PROGRAM_ERROR = 1

MAXIMUM_OF_APPENDS_REACHED = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

IS_LAYOUT = W_LAYOUT

IT_FIELDCAT = T_FIELD

I_TABNAME = 'ITAB2'

IT_EVENTS = T_EVENTS

IT_SORT = T_SORT

  • I_TEXT = ' '

TABLES

T_OUTTAB = ITAB2

EXCEPTIONS

PROGRAM_ERROR = 1

MAXIMUM_OF_APPENDS_REACHED = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CODE AS PER YOUR REQUIREMENT

REGARDS

SHIBA DUTTA