CL_SALV_COLUMN_TABLE

How to color the complete column of the SAP ALV Display of type CL_SALV_COLUMN_TABLE

The method set_color of the class CL_SALV_COLUMN_TABLE can be used to color the column of SAP ALV Display. The color codes are much similar to old ALV Display of type CL_GUI_ALV_GRID DATA lr_all_columns TYPE REF TO cl_salv_columns_table. DATA lr_single_column TYPE REF TO cl_salv_column_table. Lr_all_columns = lr_salv_table->get_columns( ). Lr_single_column ?= lr_all_columns->get_column(‘CONTACT_NAME’). DATA ls_color_column TYPE lvc_s_scol. Ls_color_column-col …

How to color the complete column of the SAP ALV Display of type CL_SALV_COLUMN_TABLE Read More »

How to optimize the width of the column of type CL_SALV_COLUMNS_TABLE

               The width of the column is optimized through three methods. Optimize all columns. Optimize one single column. Manually set the width of columns. The optimization is based on the content of the ALV Table. Optimize all columns. In order to optimize all the columns of the ALV Table, call the set_optimize method of the …

How to optimize the width of the column of type CL_SALV_COLUMNS_TABLE Read More »

How to rename columns in SAP ALV DISPLAY of type CL_SALV_COLUMNS_TABLE.

The columns can be renamed with the object of the class cl_salv_column_table. There are four methods available such as SET_SHORT_TEXT (), SET_MEDIUM_TEXT(), SET_LONG_TEXT and SET_TOOLTIP(). The method can be chosen based on our requirement of text length. DATA lr_salv_columns_table TYPE REF TO cl_salv_columns_table. DATA lr_salv_column_table TYPE REF TO cl_salv_column_table. DATA lv_short_text TYPE scrtext_s. DATA lv_medium_text …

How to rename columns in SAP ALV DISPLAY of type CL_SALV_COLUMNS_TABLE. Read More »