Columns setting is being handled by the FIELD_CATALOG method. This provides the column object which has different methods. Here is the overview of the Column settings:
  • Use the method FIELD_CATALOG( ) to get back the column object
  • Every method as part of the Field catalog object, you can supply the Column Name in the specific method
  • Column Description
    • SET_FIELD_HEADER_TEXTS
    • SET_DATA_ELEMENT
  • Currency and UOM related methods
    • SET_CURRENCY_REFERENCE_FIELD
    • SET_FIXED_CURRENCY
    • SET_FIXED_UNIT
    • SET_UNIT_REFERENCE_FIELD
  • Disable methods
    • DISABLE_SORT
    • DISABLE_FILTER
    • DISABLE_AGGREGATION

  • Text Search – ENABLE_TEXT_SEARCH





    METHODS:
      column_settings.

        me->column_settings( ).
 
 METHOD column_settings.
 
*   Column Description
    TRY.
        o_salv_ida->field_catalog( )->set_field_header_texts(
           iv_field_name    = 'UCASE_TEXT'
           iv_header_text   = 'Text in Upper case' ).
      CATCH cx_salv_ida_unknown_name
            cx_salv_call_after_1st_display.
    ENDTRY.
 
    TRY.
*       Column Description
        o_salv_ida->field_catalog( )->set_field_header_texts(
           iv_field_name    = 'COUNT_PH'
           iv_header_text   = 'Placeholder Count' ).
      CATCH cx_salv_ida_unknown_name
            cx_salv_call_after_1st_display.
    ENDTRY.
 
*   Disable Sort
    TRY.
        o_salv_ida->field_catalog( )->disable_sort(
          iv_field_name = 'MSGNR' ).
      CATCH cx_salv_ida_unknown_name
            cx_salv_call_after_1st_display.
    ENDTRY.
 
*   Disable Filter
    TRY.
        o_salv_ida->field_catalog( )->disable_filter(
          iv_field_name = 'SPRSL' ).
      CATCH cx_salv_ida_unknown_name
            cx_salv_call_after_1st_display.
    ENDTRY.
 
    TRY.
        o_salv_ida->field_catalog( )->enable_text_search(
          iv_field_name = 'TEXT' ).
      CATCH cx_salv_ida_unknown_name
            cx_salv_call_after_1st_display.
    ENDTRY.
 
 
  ENDMETHOD.
 
Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant
Contact : serkurumsal@yandex.com