SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Excluding a column from ALV Display using CL_SALV_TABLE



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ALV Grid / ALV Tree / ALV List
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Sat Mar 22, 2008 9:51 pm    Post subject: Excluding a column from ALV Display using CL_SALV_TABLE Reply with quote

Excluding a column from ALV Display using CL_SALV_TABLE Class

Please use the SET_VISIBLE method of the class CL_SALV_COLUMN_TABLE.

Code:
REPORT  z_test.
 
DATA: ispfli TYPE TABLE OF spfli.
DATA: gr_table TYPE REF TO cl_salv_table.
data: gr_funct type ref to cl_salv_functions.
data: gr_columns type ref to cl_salv_columns_table.
data: gr_column type ref to CL_SALV_COLUMN_table.
 
START-OF-SELECTION.
 
  SELECT * INTO TABLE ispfli FROM spfli.
 
  TRY.
      CALL METHOD cl_salv_table=>factory
        IMPORTING
          r_salv_table = gr_table
        CHANGING
          t_table      = ispfli.
    CATCH cx_salv_msg .
  ENDTRY.
 
  gr_funct = gr_table->get_functions( ).
  gr_funct->set_all( Abap_True ).
 
  gr_columns = gr_table->get_columns( ).
  gr_column ?= gr_columns->Get_Column( 'DISTANCE' ).
  gr_column->SET_VISIBLE( abap_false ).
 
  gr_table->display( ).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ALV Grid / ALV Tree / ALV List All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.