ERPClimb logoERPClimb
SmartForms
ABAP Developmentintermediate 7 min read

Smart Forms Part 4: Form Interface — Import Parameters, Tables and Global Data

Preview · a free account unlocks the full lesson

Key takeaway

Design the Smart Form interface: DDIC types for import parameters and tables, global definitions (data, types, field symbols), initialization code, form routines, and why a clean data contract between driver and form matters.

In this lessonShow sections

Visual overview

Smart Forms Part 4: Form Interface — Import Parameters, Tables and Global Data — learning sheetFlow: SE11: create ZSF_INV_HEADER, ZSF_INV_ITEM and table type ZTT_INV_ITEMS → SMARTFORMS: define IS_HEADER and IT_ITEMS in the interface, GS_ITEM and GV_TOTAL in global data → Compute GV_TOTAL in initialization (code example) and display it in a window. Key ideas: IMPORT PARAMETERS; TABLES; GLOBAL DEFINITIONS; WHAT BELONGS WHERE. Watch out: Changing the interface requires changing every driver that calls the form — design it once, add optional parameters carefully.ERPClimb.com / ABAP / LESSON 4/8 / LEARNING SHEETSmart Forms Part 4: Form Interface — Import Parameters,Tables and Global Data1 · HOW IT FLOWS1SE11create ZSF_INV_HEADER,ZSF_INV_ITEM and table type…2SMARTFORMSdefine IS_HEADER and IT_ITEMS inthe interface, GS_ITEM and…3Compute GV_TOTAL ininitialization (codeexample) and display it…2 · KEY IDEAS EXPLAINEDImport ParametersHeader structure, e.g. IS_HEADER TYPEZSF_INV_HEADER (document number, dates, addresseskeys, totals).Flags or settings (e.g. IV_REPRINT TYPE FLAG).TablesItems, e.g. IT_ITEMS TYPE ZTT_INV_ITEMS (tabletype) in "Import" as table type(preferred) or in "Tables" tab with a…Other lists: partner texts, conditions, tax lines.Global DefinitionsGlobal data: work areas for loops (GS_ITEM TYPEZSF_INV_ITEM), counters, totals.Types: local types for the form's internal use.What Belongs WhereDriver: all database access and business logic(prices, taxes, texts to use).Form initialization: formatting-level calculations(totals of passed items, page-level helpers).3 · REMEMBER · WATCH OUTRememberForm interface = data contract: the driver passes import parameters(structures) and tables with DDIC types (SE11).Global definitions hold working variables, work areas for loops, andtypes; initialization code runs once before output.Use DDIC structures/table types for the interface — local types can'tbe used across driver and form.!Watch outChanging the interface requireschanging every driver that calls theform — design it once, add optionalparameters carefully.4 · IN A REAL PROJECTAn order confirmation form used local types in its interface, copied by five driver programs. When a field wasadded, three drivers failed with runtime errors because their local copies of the structure differed. Movingthe interface to DDIC structures and table types fixed the mismatch permanently; new fields could be added at…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Parts 1 through 3 covered calling a Smart Form; this part looks at designing what the form actually receives — its form interface, which acts as a data contract. The driver passes import parameters, typically structures, and tables, all defined using DDIC types from SE11.

Global definitions inside the form hold working variables, work areas used inside loops, and local types, and initialization code runs once before any output is produced. It's important to use DDIC structures and table types for the interface, since local types defined only inside the form can't be shared across the driver and the form.

Keep in mind too that changing the interface later means changing every driver that calls the form, so it pays to design it carefully up front and add any optional parameters with care.

On import parameters, you'll typically have a header structure — something like IS_HEADER TYPE ZSF_INV_HEADER, carrying the document number, dates, address keys, and totals — along with flags or settings such as IV_REPRINT TYPE FLAG. Optional parameters with sensible default values help keep the interface backward compatible as it evolves.

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.