07-08-2008 3:01 PM
Hello all,
couldn't find anything regarding the above mentioned topic via search function so here my question:
How can I get a zebra layout while using the method cl_salv_table=>factory and further steps. Can someone post some example coding?
Thanks!!
Jan Schnee
07-08-2008 3:20 PM
Sure, try this.
report zalvom_demo1.
data: ispfli type table of spfli.
data: gr_table type ref to cl_salv_table.
data: gr_functions type ref to cl_salv_functions.
data: gr_display type ref to cl_salv_display_settings.
start-of-selection.
select * into table ispfli from spfli.
cl_salv_table=>factory( importing r_salv_table = gr_table
changing t_table = ispfli ).
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( abap_true ).
gr_display = gr_table->get_display_settings( ).
gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
gr_table->display( ).
Regards,
Rich Heilman
07-08-2008 3:20 PM
Sure, try this.
report zalvom_demo1.
data: ispfli type table of spfli.
data: gr_table type ref to cl_salv_table.
data: gr_functions type ref to cl_salv_functions.
data: gr_display type ref to cl_salv_display_settings.
start-of-selection.
select * into table ispfli from spfli.
cl_salv_table=>factory( importing r_salv_table = gr_table
changing t_table = ispfli ).
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( abap_true ).
gr_display = gr_table->get_display_settings( ).
gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
gr_table->display( ).
Regards,
Rich Heilman
07-08-2008 3:25 PM
07-08-2008 3:30 PM
Yep, no problem. If your question is answered, you may want to mark it as "solved" next to the answer which answered it. This will close your thread. If you leave 10 or more questions open, you will not be able to ask anymore questions untill they are closed. Thanks in advance and welcome to SDN.
Regards,
Rich Heilman
Edited by: Rich Heilman on Jul 8, 2008 10:31 AM
07-09-2008 6:11 AM
ok thanks for the short guide! I think this wasn't the last time I posted something here!