01-15-2010 12:06 AM
I'm trying to figure out how to have multiple headings in an ALV report and specifically, how to group the sub headings under another wider heading.
Example of what I'm looking to do (circled in red)
<a href="http://img689.imageshack.us/img689/894/forum14f35511154572086.jpg">http://img689.imageshack.us/img689/894/forum14f35511154572086.jpg</a>
I've done some extensive searching for a solution to this problem and so far have only read that it "can't be done". I don't believe that as I've seen it done. See my link to an example.
Can anyone help?
01-15-2010 4:18 AM
01-15-2010 4:18 AM
01-15-2010 3:01 PM
Hi, no that doesn't solve the problem. I'm looking for a OO solution.
01-26-2010 7:21 PM
Bump. I'm going to be really surprised if no one in here knows how to do this.
01-27-2010 3:19 AM
As far..as the Column with 2 heading problem...uptill now no one has given a solution for the even i was having the same problem...
01-27-2010 5:40 AM
Hi,
You can use the below code.
DATA : obj_header TYPE REF TO cl_salv_form_layout_grid,
sp_obj_header TYPE REF TO cl_salv_form_layout_grid.
TRY.
CALL METHOD cl_salv_table=>factory(
IMPORTING
r_salv_table = obj_output
CHANGING
t_table = it_display ). "Internal table to dispaly ALV output
CATCH cx_salv_error.
ENDTRY.
CREATE OBJECT sp_obj_header.
Create a header grid with required column and rows
obj_header = sp_obj_header->create_grid( row = 2
column = 1
colspan = 6 ).
obj_header->create_label(
row = 1
column = 1
text = 'Test line1' ).
obj_header->create_label(
row = 2
column = 1
text = 'Test line2').
obj_output->set_top_of_list( obj_header ).
Display Table
obj_output->display( ).
Hope this may be helpful.
Regards,
Sravanthi.V