‎2012 Jan 27 6:45 AM
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!!
‎2012 Jan 27 7:22 AM
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..
‎2012 Feb 10 7:59 AM
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 ).