Skip to Content
author's profile photo Former Member
Former Member

Object oriented ALV with zebra layout

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 08, 2008 at 02: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.