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: 

Display ALV with two headers

Former Member
0 Kudos
3,301


Hello Team,

I have a requirement to display the ALV with two headers.

Could any one of you please let me know whether this requirement is possible with the help of ALV grid function module.

Kinldy find the below format of the requirement.

Header1  |  Header2

col1 col2 |  col1 col2

Please Note : Other than ALV List and Classical report , we need a possible way with ALV Grid display FM.I have already searched for the solution in SCN but no luck.

Thanks in adavance !

7 REPLIES 7

Former Member
0 Kudos
1,097

Do you using SLIS package to view ALV?

0 Kudos
1,097

Yes, I am using SLIS type pool also in my report.

Former Member
0 Kudos
1,097

Hi Sujatha,

You can achieve your requirement using the Hierarchical Sequential ALV's.

In this we use the Function Module " REUSE_ALV_HIERSEQ_LIST_DISPLAY".

Thanks,

Chakradhar.

Former Member
0 Kudos
1,097

Hi Sujatha,

it is possible through class CL_GUI_ALV_GRID using cl_gui_splitter_container



"split your container here...into two parts

   "create the container
   CREATE OBJECT g_custom_container
     EXPORTING
       container_name = g_container1.


   "this is for top of page(header part)
* Create TOP-Document
   CREATE OBJECT dg_dyndoc_id
     EXPORTING
       style = 'ALV_GRID'.
* Create Splitter for custom_container
   CREATE OBJECT dg_splitter
     EXPORTING
       parent  = g_custom_container
       rows      =   2
       columns 2.
* Split the custom_container to two containers and move the reference
* to receiving containers g_parent_html() and g_parent_grid
   "i am allocating the space for grid and top of page(header)

   CALL METHOD dg_splitter->get_container
     EXPORTING
       row       = 1
       column    = 1
     RECEIVING
       container = dg_parent_html.

   CALL METHOD dg_splitter->get_container
     EXPORTING
       row       = 2
       column    = 1
     RECEIVING
       container = dg_parent_grid.

   CALL METHOD dg_splitter->get_container
     EXPORTING
       row       = 1
       column    = 2
     RECEIVING
       container = dg_parent_html.


   CALL METHOD dg_splitter->get_container
     EXPORTING
       row       = 2
       column    = 2
     RECEIVING
       container = dg_parent_grid.




Thanks,

P.Ravi.

0 Kudos
1,097

Hi Ravi,

Thank you so much for your reply but I am sorry if i made you think in different way.


My requirement is different.

Within single page, ALV need to be displayed with two headers like I have first heading Header 1 and Header 2.

Under each header there should be multiple column headings.Kindly find the below screen shot for better understanding.

Regards,

Sujatha Arsid.

Former Member
0 Kudos
1,097

Hi Sujatha,

          We can achieve the ALV with two Headers by using CL_GUI_SPLITTER_CONTAINER in MPP(Module Pool Programming). By using it we can split the screen in to two parts as ravi papani said above.

rosenberg_eitan
Active Contributor
0 Kudos
1,097

Hi,

Unfortunately SAP has not provided this support (IMHO) .

They are very busy with SAP HANA.....

I had the same request some years ago and I used cl_gui_html_viewer .

Regards .