Smart Forms and Adobe Forms Interview Guide
Architecture, driver programs, dynamic function modules, PDF output, debugging, practical code and real project scenarios.
Forms questions test more than layout knowledge. Interviewers want to know whether you can connect application data to a form, control output safely, debug production failures and select the right technology. This guide covers the concepts most often discussed in SAP ABAP interviews. Availability and recommended output technology can differ by SAP release and landscape, so confirm the design against your project system.
1. End-to-end form flow
Read and prepare business data.
Transfer structures and tables.
Render windows, text and tables.
Preview, spool, print or PDF.
2. What is SAP Smart Forms?
Smart Forms is an SAP form technology used to create print and output layouts without manually maintaining SAPscript control logic. A form contains a form interface, global definitions, pages, windows and nodes such as text, table, template, loop, condition, command, graphic and program lines. Activation generates a function module.
Interview question: Why should the generated function module name not be hard-coded?
The generated name can differ between systems after transport. Resolve it at runtime with SSF_FUNCTION_MODULE_NAME, then call the returned function module.
DATA: lv_fm_name TYPE rs38l_fnam,
ls_control TYPE ssfctrlop,
ls_output TYPE ssfcompop.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSF_INVOICE'
IMPORTING
fm_name = lv_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc = 0.
ls_control-no_dialog = abap_true.
ls_control-preview = abap_true.
CALL FUNCTION lv_fm_name
EXPORTING
control_parameters = ls_control
output_options = ls_output
user_settings = space
is_header = ls_header
TABLES
it_items = lt_items.
ENDIF.
Common Smart Forms questions
- Form interface vs global definitions: the interface receives data from the driver; global definitions hold form-wide types, data and initialization logic.
- Main window: supports flowing content and page breaks. Secondary windows have fixed positions and do not automatically flow like the main window.
- Table vs template: a table is suited to dynamic rows; a template is a fixed cell layout.
- Page protection: keeps related nodes together where possible, but oversized content still requires thoughtful design.
- Styles: Smart Styles centralize paragraph and character formats for consistent output.
- Output control: use control parameters, output options and user settings deliberately; do not rely on an interactive print dialog in background processing.
3. Converting Smart Form output to PDF
A common pattern is to request OTF output, obtain it from the job output information and convert it with CONVERT_OTF. Check the form output and exceptions before sending or archiving the PDF.
ls_control-getotf = abap_true.
ls_control-no_dialog = abap_true.
ls_control-preview = abap_false.
CALL FUNCTION lv_fm_name
EXPORTING
control_parameters = ls_control
user_settings = space
IMPORTING
job_output_info = ls_job_info
TABLES
it_items = lt_items.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_pdf_size
TABLES
otf = ls_job_info-otfdata
lines = lt_pdf_lines.
4. How do you debug a Smart Form?
- Verify data in the driver program before the form call.
- Open transaction SMARTFORMS, activate the form and inspect the generated function module.
- Set a breakpoint in the generated function module or relevant program lines.
- Check conditions, window overflow, styles, language, device type and spool parameters.
- Use form trace facilities such as SFTRACE where available and inspect spool/output errors.
5. What are SAP Interactive Forms by Adobe?
Adobe Forms use a form interface, context and layout designed in transaction SFP. The ABAP application opens a print job, resolves the generated form function module, calls it with application data and closes the job. Rendering depends on Adobe Document Services (ADS) in supported landscapes.
DATA: lv_fm_name TYPE rs38l_fnam,
ls_output TYPE sfpoutputparams,
ls_doc TYPE sfpdocparams.
ls_output-nodialog = abap_true.
ls_output-preview = abap_true.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = ls_output.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'ZAF_INVOICE'
IMPORTING
e_funcname = lv_fm_name.
CALL FUNCTION lv_fm_name
EXPORTING
/1bcdwb/docparams = ls_doc
is_header = ls_header
it_items = lt_items.
CALL FUNCTION 'FP_JOB_CLOSE'.
6. Smart Forms vs Adobe Forms
| Area | Smart Forms | Adobe Forms |
|---|---|---|
| Design tool | SMARTFORMS | SFP / Adobe layout designer |
| Typical strength | Classic print output | PDF-centric, interactive or complex layouts |
| Runtime call | SSF_FUNCTION_MODULE_NAME | FP_JOB_OPEN + FP_FUNCTION_MODULE_NAME + FP_JOB_CLOSE |
| Rendering dependency | ABAP form runtime and spool | ADS in supported setups |
7. Real project scenario
Strong answer: separate data retrieval from layout; select only required fields; determine language and address formatting explicitly; test large tables and page breaks; suppress dialogs in background; capture form exceptions; generate PDF through supported output APIs; log spool, recipient and application key for support. Avoid database selects inside repeated form nodes.
8. Common mistakes
- Hard-coding a generated form function module.
- Mixing heavy business logic and repeated SELECT statements into the layout.
- Ignoring sy-subrc, form exceptions or returned BAPI-style messages.
- Using preview or print dialogs in a background job.
- Assuming fonts, graphics, device types and ADS configuration are identical across systems.
- Skipping authorization, spool retention and personal-data controls.
9. Practice exercise
Create a driver program for an invoice header and item table. Add a dynamic item table, subtotal, page number and company logo. Then produce a no-dialog PDF path and document how you would debug: missing logo, blank PDF, truncated text and unexpected page breaks.
10. Rapid revision questions
- Why is SSF_FUNCTION_MODULE_NAME necessary?
- What is the difference between a main window and a secondary window?
- When would you use a table instead of a template?
- How is Smart Form OTF converted to PDF?
- What is the purpose of FP_JOB_OPEN and FP_JOB_CLOSE?
- What role does ADS play for Adobe Forms?
- How would you make a form safe for background processing?
Official SAP references
- SAP Help: calling a Smart Form and resolving the function module
- SAP Help: Smart Forms output formats
- SAP Help: calling an Adobe form
- SAP Help: Smart Form PDF output
Examples are educational. Validate APIs, authorizations and output behavior in your SAP release before production use.

0 Comments