ABAP Developmentintermediate
SmartForm Anatomy and Driver Program
How a driver calls the generated function module.
Explanation
A SmartForm is designed in transaction SMARTFORMS. On activation SAP generates a runtime function module whose name you retrieve via SSF_FUNCTION_MODULE_NAME. Your driver program calls that FM, passing the data (header, items) and control parameters (printer, preview).
Code example
ABAP Code
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'ZSF_INVOICE' IMPORTING fm_name = lv_fmname.CALL FUNCTION lv_fmname EXPORTING is_header = ls_hdr TABLES it_items = lt_items.Real project scenario
A German subsidiary needed a bilingual invoice. Two SmartForm variants and a language check in the driver kept the code simple.
Common mistakes
Hardcoding generated FM name (changes across clients); missing OUTPUT_OPTIONS causing print dialogs in background jobs.
Best practices
Always resolve FM name at runtime; centralise driver logic; keep translations in the SmartForm text elements.
Interview angle
Where is the generated FM name stored?