SAP Function Modules & Classes I Actually Use — By Purpose

Function modules (FMs) and classes actually used in our custom developments, organized by purpose. New entries are added whenever a new program is built.

Each table: Object / Kind / Purpose / Programs using it. The notes record pitfalls we actually hit. Last updated: 2026-08-13

ALV / Screen Display

Object Kind Purpose Used in
REUSE_ALV_GRID_DISPLAY FM Classic ALV grid — the standard pattern of our reports
※ The essentials: box_fieldname (selection column), it_sort (sort/subtotals), cfieldname (currency) / qfieldname (unit) references — without the currency reference, KRW amounts display divided by 100
almost every Z report
REUSE_ALV_COMMENTARY_WRITE FM TOP-OF-PAGE selection summary
※ SLIS_LISTHEADER-INFO is CHAR(60) — shorten long criteria
almost every Z report
CL_GUI_ALV_GRID Class OO ALV grid (needs a Custom Control screen)
※ When several grids share one event handler, tell them apart with the event's sender parameter
ZJNC launchpad family
CL_GUI_ALV_TREE Class ALV tree (F.01-style hierarchy display)
※ it_outtab of set_table_for_first_display must be an EMPTY GLOBAL table — data goes in row by row via ADD_NODE. Passing a local variable breaks rendering
ZFI0030 (P&L tree), ZFI0031 (BS tree)
CL_GUI_SPLITTER_CONTAINER Class Screen splitting (logo/grid, 2x2 quadrants, ...) ZJNC, ZJNC0020 (launchpad), ZFI0030
CL_GUI_PICTURE Class Image (logo) display — loaded from SMW0 MIME
※ display_mode_stretch fills the container
ZJNC launchpad family
CL_GUI_TEXTEDIT Class Read-only text box (selection criteria display)
※ Passing a string table to SET_TEXT_AS_R3TABLE dumps with ERROR_DP — use fixed-length TDLINE
ZFI0030, ZFI0031

Data Reading / Conversion

Object Kind Purpose Used in
G_SET_GET_ALL_VALUES FM Expand set values (cost center groups, cost element groups, ...)
※ EXPORTING setnr (= the full SETID), TABLES set_values (RGSB4, returned as FROM/TO ranges)
ZCO0041 (distribution cycle detail)
FI_IMPORT_BALANCE_SHEET_POS / _TEXT FM Read the financial statement version (FSV) hierarchy
※ A direct SELECT on T011P/T011Q comes back empty — the FSV lives in the RFDT cluster (EXPORT TO DATABASE) and can only be read via the standard FMs
ZFI0030, ZFI0031
CONVERSION_EXIT_ALPHA_INPUT / _OUTPUT FM Add / strip leading zeros (accounts, material numbers, ...)
※ In ALV the same effect comes from ref_tabname/ref_fieldname in the field catalog
many
DDIF_FIELDINFO_GET / DD07T lookup FM/table Data element texts and domain fixed-value texts
※ For pulling column labels and code descriptions from the dictionary instead of hardcoding
ZCO0030, ZCO0040, ZCO0041

Selection Screen / F4 / Popups

Object Kind Purpose Used in
F4IF_INT_TABLE_VALUE_REQUEST FM Custom F4 (possible entries) from an internal table
※ Specify retfield/dynpprog/dynpfield; you can also post-process the returned value (e.g. strip a prefix) before it lands on the screen
ZCO0041 (cycle F4)
DYNP_VALUES_READ FM Read the CURRENT screen value of another field at F4 time
※ Before PAI the parameter variable is still empty — you must read the screen directly with this FM
ZCO0041 (filter F4 by controlling area)
POPUP_TO_CONFIRM FM Save/exit confirmation popup ZCO0010 (KP06 plan upload), ZJNC0010 (program catalog)

Execution / Control / Locking

Object Kind Purpose Used in
ABAP4_CALL_TRANSACTION FM Run a transaction in a new external session (new GUI window)
※ STARTING NEW TASK '...' DESTINATION 'NONE' — opens a new window while keeping the launchpad open
ZJNC launchpad family
ENQUEUE_E_TABLE / DEQUEUE_E_TABLE FM Table-level lock (prevent concurrent editing)
※ Pattern: fall back to read-only mode when the lock fails
ZJNC0010 (program catalog)
EXPORT/IMPORT ... MEMORY ID Syntax Keep state across report restarts (within one session)
※ Report globals reset on every run — restore with IMPORT in LOAD-OF-PROGRAM
ZCO0041 (hidden-option visibility state)
SET PARAMETER ID + CALL TRANSACTION Syntax Jump to a standard screen with parameters (double-click navigation)
※ Combine with AND SKIP FIRST SCREEN. Screens that ignore parameters (like BP) need a BDC (USING lt_bdc) instead
almost every Z report
Where these documents come from
Everything on this blog comes from one small dumpling factory built end-to-end in an S/4HANA sandbox — one plant, one product, one month, every document number real. The whole build is written up in two books.
· Free 16-page sample — the opening chapters, no email required
· How Sarah Joined a K-Dumpling Company and Became an SAP Genius — the business novel, 53 pages, $25
· The Dumpling Factory: Building a Complete SAP S/4HANA Company from Scratch — the build manual, 85 pages, $50

Comments

Popular posts from this blog

Modern ABAP Syntax Notes — Patterns and Pitfalls from Real Development

SAP S/4HANA Table Reference — Tables I Actually Query, by Topic

A 36% margin became 6% at month-end, and every posting was correct