ERPClimb logoERPClimb
ALV Reports
ABAP Developmentintermediate 9 min read

ALV Reports Part 4: The Field Catalog in Depth

Preview · a free account unlocks the full lesson

Key takeaway

Master the ALV field catalog: DDIC-based merge vs manual build, the important LVC S FCAT fields (texts, output length, key, no out, tech, do sum, cfieldname/qfieldname, ref table/ref field, edit, hotspot, checkbox), and building a catalog for a local structure.

In this lessonShow sections

Visual overview

ALV Reports Part 4: The Field Catalog in Depth — learning sheetFlow: Run the code example: a local structure with DDIC-referenced fields and one calculated column → Remove cfieldname from PRICE and compare the display → Set no_out on SEATSMAX and bring it back via the layout dialog. Key ideas: SLIS VS LVC; IMPORTANT LVC_S_FCAT FIELDS; MERGE + ADJUST (MOST COMMON); LOCAL OUTPUT STRUCTURES. Watch out: For local TYPES structures, merge by structure name does not work — use ref_table/ref_field or build manually.ERPClimb.com / ABAP / LESSON 4/10 / LEARNING SHEETALV Reports Part 4: The Field Catalog in Depth1 · HOW IT FLOWS1Run the code examplea local structure withDDIC-referenced fields and one…2Remove cfieldname fromPRICE and compare thedisplay3Set no_out on SEATSMAXand bring it back via thelayout dialog2 · KEY IDEAS EXPLAINEDSlis vs LvcREUSE_ALV_* uses SLIS types: slis_t_fieldcat_alv,text fields seltext_s/m/l.CL_GUI_ALV_GRID uses LVC types: lvc_t_fcat, textfields scrtext_s/m/l and coltext.Important LVC_S_FCAT Fieldsfieldname — column name in the output table(uppercase). Mandatory.coltext / scrtext_s, scrtext_m, scrtext_l — columnheaders.Merge + Adjust (Most Common)Merge from the DDIC structure, then LOOP ATgt_fcat ASSIGNING <fs> and CASE fieldname tochange texts or flags. Labels stay translated from…Local Output StructuresCreate a DDIC structure (ZS_FLIGHT_ALV) — best forreuse and translations; orBuild manually with ref_table/ref_field forDDIC-typed fields and datatype/inttype/outputlenfor calculated fields.3 · REMEMBER · WATCH OUTRememberThe field catalog is a table with one row per ALV column describingtexts, type, format and behaviour.Two build methods: merge from DDIC (LVC_FIELDCATALOG_MERGE /REUSE_ALV_FIELDCATALOG_MERGE) or fill manually — often both.Amounts need cfieldname (currency column), quantities need qfieldname(unit column) for correct formatting.!Watch outFor local TYPES structures, merge bystructure name does not work — useref_table/ref_field or buildmanually.4 · IN A REAL PROJECTUsers in Japan complained that prices in a sales ALV showed two decimals for JPY amounts, which made valueslook 100 times too small. The field catalog had no currency reference, so the grid used the default twodecimals. Adding cfieldname = 'WAERK' for all amount columns fixed the display for every currency. The team…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Parts 1 through 3 of this series used simple field catalogs; now you'll learn the fields you'll actually adjust most often in real reports. The field catalog itself is a table with one row per ALV column, describing its texts, type, format, and behavior, and it can be built in two ways — merging it from the DDIC, or filling it manually — and real reports often do both.

The classic REUSE_ALV_* function modules use SLIS types, specifically slis_t_fieldcat_alv, with text fields named seltext_s/m/l. CL_GUI_ALV_GRID uses LVC types instead, specifically lvc_t_fcat, with text fields scrtext_s/m/l and coltext. CL_SALV_TABLE builds the catalog itself directly from the table's types.

Among the LVC_S_FCAT fields that matter most: fieldname is the mandatory, uppercase column name in the output table; coltext and scrtext_s/scrtext_m/scrtext_l are the column headers; col_pos sets the position and outputlen the width; key marks a key column, which stays fixed on the left and colored; no_out hides a column while keeping it available through the layout dialog, while tech marks it technical so it's never shown; do_sum totals the column; cfieldname and qfieldname point to the reference currency or unit field in the same table; ref_table and ref_field pull the type, texts, and F1/F4 help from a DDIC field; hotspot, checkbox, icon, edit, and emphasize are used in later parts of the series; and convexit applies a conversion exit, such as ALPHA, for display.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Referenced SAP objects

Reviewed reference pages for the objects this page mentions.

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.