Smart Forms Part 2: Anatomy of a Smart Form and the Driver Program
Preview · a free account unlocks the full lesson
Build a complete driver program for a Smart Form: selection screen, data retrieval into interface structures, SSF FUNCTION MODULE NAME, control parameters (preview, no dialog, getotf), output options, printing multiple documents in one spool with SSF OPEN/SSF CLOSE, and checking job output info.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 1 showed the basic call to a Smart Form. Now we build a driver that prints many documents properly, in a single spool.
A Smart Form itself is organized around global settings — form attributes such as style and language, the form interface, and global definitions covering data, types and initialization — along with pages and windows: a first page, a next page, a main window, and secondary windows for things like the header, footer, and address block. The actual output is produced by nodes placed inside those windows.
The driver program carries a clear set of responsibilities. The driver program owns: selection, data retrieval, determining the FM, output options and error handling. In sequence, that means: a selection screen for document numbers, printer and a preview flag; reading and preparing the data into structures matching the form's interface; getting the generated function module's name with SSF_FUNCTION_MODULE_NAME; setting the control and output options; calling the function module once per document and handling its exceptions; and finally reporting the results, including spool numbers, via JOB_OUTPUT_INFO.
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
Interview questions on this topic
Related SAP topics
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.