Application Development 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: 

displaying alv and normal report in same screen

Former Member
0 Kudos

hi experts,

i want to display a alv report and normal report in the same screen one below the other .is it possible,if so please guide me how to do that.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI Praveen,

It is not possible to print normal and alv list in the same list .

if u want to display to or more lists is in the same list display

u can use REUSE_BLOCK_LIST_DISPLAY.......

U can append any no of lists in the same list display using..

the sequence of function modules...

'REUSE_ALV_BLOCK_LIST_INIT' ( To initiate the blocked list)

'REUSE_ALV_BLOCK_LIST_APPEND' (Use this as many times as u want the number of lists to display)

'REUSE_ALV_BLOCK_LIST_DISPLAY' ( To display the blocked list).

Reward if helpful

Jagadish

7 REPLIES 7

Former Member
0 Kudos

i have an idea of blocked alv in which we can display 2 or more alv....but my req is one alv and other is normal...help me out

Former Member
0 Kudos

In that case U have to use REUSE_ALV_LIST_DISPLAY. and also u have to take one variable for line count. now if the lincount variable will be same as ur dbcount value then after that u can use to display ur second report.

If satisfied give points.................

0 Kudos

TNX FOR REPLY.......IT IS NOT WORKING....

Former Member
0 Kudos

HI Praveen,

It is not possible to print normal and alv list in the same list .

if u want to display to or more lists is in the same list display

u can use REUSE_BLOCK_LIST_DISPLAY.......

U can append any no of lists in the same list display using..

the sequence of function modules...

'REUSE_ALV_BLOCK_LIST_INIT' ( To initiate the blocked list)

'REUSE_ALV_BLOCK_LIST_APPEND' (Use this as many times as u want the number of lists to display)

'REUSE_ALV_BLOCK_LIST_DISPLAY' ( To display the blocked list).

Reward if helpful

Jagadish

Former Member
0 Kudos

Hi Praveen,

It is not possible to display noraml and alv,you can display two alv together.......

by FM

'REUSE_ALV_BLOCK_LIST_DISPLAY'

venkat_o
Active Contributor
0 Kudos

Praveen Kumar, You can create Normal and ALV together. Proceed the following way . 1. Create ALV out using REUSE_ALV_LIST_DISPLAY. 2.Build events table with END_OF_LIST event. declare events table like this.

data :
i_events  type slis_t_event,
w_events  like line of i_events.
Build events table .
w_events-name = 'END_OF_LIST' .
w_events-form   = 'END_OF_LIST' .
append w_events to i_events.
clear w_events.
3. pass this events table through REUSE_ALV_LIST_DISPLAY.
data :l_program type sy-repid.
  l_program = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      i_callback_program          = l_program
      it_events                   = i_events
      it_fieldcat                 = i_fieldcat
    tables
      t_outtab                    = i_pa0001.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
4. Use just WRITE statement to output your Normal report. It works.
form end_of_list.

  data: inc_colnum type i.
  uline .
  inc_colnum = sy-linsz - 60.
  write: / 'Report: ', sy-repid(18).
  write at 30(inc_colnum) sy-title centered.
  inc_colnum = sy-linsz - 20.
  write: at inc_colnum 'Page: ', (11) sy-pagno right-justified.
  write: / 'Client: ', sy-mandt.
  inc_colnum = sy-linsz - 20.
  write: at inc_colnum 'Date: ', sy-datum.
  write: / 'User  : ', sy-uname.
  inc_colnum = sy-linsz - 60.
  case clicked .
    when 'ALV1'.
      write at 30(inc_colnum) 'Normal ALV' centered.
    when 'ALV2'.
      write at 30(inc_colnum) 'Blocked ALV' centered.
    when 'ALV3'.
      write at 30(inc_colnum) 'Hierarchical ALV' centered.
    when 'ALV4'.
      write at 30(inc_colnum) 'Blocked Hier. ALV' centered.
  endcase.
  inc_colnum = sy-linsz - 20.
  write: at inc_colnum 'Time: ', (10) sy-uzeit right-justified.
  uline .
endform.
I hope that it solves your problem. Regards, Venkat.O

venkat_o
Active Contributor
0 Kudos

Praveen Kumar, If you want to display normal report first and second ALV use TOP_OF_PAGE event . Regards, Venkat.O