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

CL_SALV_TABLE - Header Problem when Container Exported

Former Member
0 Likes
1,071

Hi Experts!

PFB my code to display header using CL_SALV_TABLE:



      cl_salv_table=>factory(
        EXPORTING
          list_display   = space
          r_container    = go_cc
          container_name = 'CC'
        IMPORTING
          r_salv_table = go_alv
        CHANGING
          t_table      = gt_table ).

      MOVE 'List of Master Data Records' TO lv_head.
      CREATE OBJECT lo_grid.
      lo_grid->create_header_information(
          row     = 1
          column  = 1
          text    = lv_head
          tooltip = lv_head ).
      go_alv->set_top_of_list( lo_grid ).

      go_alv->display( ).

When I don't pass container object, it is displaying with header in full screen. But my requirement is to display ALV in second half of the screen. In first half, we have tree and when double-clicked on one item, second container is to be displayed.

Can somebody help me out? Thanks a lot!!

2 REPLIES 2
Read only

surajarafath
Contributor
0 Likes
671

Yes you are right, i also tried this one. The top of list or end of list is coming only if we dont provide it in a container. ALV here is used as OOALV, so im nt sure in OOALV top of list is possible i have not tried. IF we dont provide container it performs like REUSE_ALV_GRID.. then header is coming.. I will also look at this problem..

Read only

Former Member
0 Likes
671

Solved with below code:


DATA:
        lo_display TYPE REF TO cl_salv_display_settings.

      lo_display = go_alv_area2->get_display_settings( ).

          lo_display->set_list_header( 'List of Master Data Records' ).
          lo_display->set_list_header_size( cl_salv_display_settings=>C_HEADER_SIZE_LARGE ).