ALV Reports
ABAP DevelopmentIntermediate

Field Catalog and Column Settings

Learn how field catalogs and column settings control ALV display behavior.

Explanation

A field catalog controls how ALV columns appear and behave. It can define column heading, output length, visibility, hotspot, checkbox, editable property, key field and alignment. In CL_SALV_TABLE, many column settings are handled through column objects. In classic REUSE_ALV_GRID_DISPLAY or CL_GUI_ALV_GRID, field catalog tables are used more explicitly. Field catalog quality directly affects user experience. A technically correct report can still feel poor if column headings are confusing, technical helper fields are visible or important fields are hidden.

Code example

ABAP Code
* Purpose:* Improve ALV column headings so business users see meaningful labels.* Without this, users may see technical names like KUNNR or BUKRS. DATA(lo_columns) = lo_alv->get_columns( ). * Get the ALV column object for customer numberDATA(lo_column) = lo_columns->get_column( 'KUNNR' ). * Set user-friendly column textslo_column->set_short_text( 'Customer' ).lo_column->set_medium_text( 'Customer No.' ).lo_column->set_long_text( 'Customer Number' ). * Example: Hide a helper field if it is only used internallyDATA(lo_helper_col) = lo_columns->get_column( 'TECH_STATUS' ).lo_helper_col->set_visible( abap_false ).

Real project scenario

A customer aging report initially displayed technical names like KUNNR, BUKRS and WRBTR. After setting business-friendly column labels such as Customer, Company Code and Amount, business users could understand the report without training.

Common mistakes

- Showing technical field names to business users. - Not hiding helper/internal fields. - Making too many columns visible by default. - Using unclear headings for amount/date/status fields.

Best practices

- Use business-friendly column labels. - Hide technical helper fields. - Set output length appropriately. - Mark important key fields clearly.

Interview angle

A good answer should mention field catalog, column headings, visibility, hotspots and user-friendly display.