Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3019

Re: SALV hide empty (with value 0,00) columns.

$
0
0

You need the method set_technical to hide the column.

 

I generally do something like:

 

gr_columns_table = gr_alv->get_columns( ).

 

l_rcl_struc ?=

          cl_abap_structdescr=>describe_by_data( wa_table )


* wa_table is the structure of your output alv table

 

  LOOP AT l_rcl_struc->components ASSIGNING <components>.

         lv_name = <components>-name.

      TRY.

             CASE lv_name.

               WHEN 'FIELDNAME_TO_BE_HIDDEN'

 

          gr_column = gr_columns_table->get_column( columnname = lv_name ).

        CALL METHOD gr_column->set_technical.

        CATCH cx_salv_not_found INTO lcx_salv_not_found.

             CALL METHOD lcx_salv_not_found->if_message~get_text

               RECEIVING

                 result = ls_message.

             WRITE ls_message.

         ENDTRY.

  ENDLOOP.


Viewing all articles
Browse latest Browse all 3019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>