Copyright 2024 - BV TallVision IT

Adobe has had forms as their business for a long time - and the adobe form is integrated and available from within SAP, with it's own transaction code and all. It's not as elaborate as the Adobe Interactive Form, but it covers all main functionality from the Smartform. Printed on paper or as .PDF file. 

Adobe forms is very efficient alternative for the Smartforms and also supports other good features for the next generation document services with SAP technology. For the exploration of those future possibilities you will need to know the basics of the Adobe forms.

A form builder form or Adobe form consists of the form and it's interface.

The interface

The interface effectively describes what goes into and comes out of the form. There are several types of interfaces: 

  • Compatible with Smart Forms
  • Based on XML schema
  • Based on DDIC

The interface is where:

  • The form interface is described as importing parameters (anything that is to be shown or used on the form output), exporting parameters (generally only the form output, of type FPFORMOUTPUT) and exceptions (USAGE_ERROR, SYSTEM_ERROR, INTERNAL_ERROR, CUSTOM_ERROR).
  • Globally defined types and data can also be defined on the interface.
  • Initialization where a single block of coding with it's own importing and exporting parameters can be defined. Also FORM-routines (abap FORM. .. ENDFORM.routines) can be defined here, which will make them available from the initialization routine or other coding blocks in the form builder.
  • Currency fields can be defined here (to be available globally, elsewhere on the form).

The form

The actual form has a context and a layout. The context tab is where the interface is showed, each form has exactly 1 interface (defined in attributes). The actual context can be composed here, the context is (much like WebDynpro) the structure of data required on your output. This is likely to show great similarities with the structure on the input parameters of the interface. Create the required nodes and by means of drag-drop the context can be filled and linked to the interface. The layout tab will open the Adoby builder application - which may require the installation of additional software. The layout editor is a WYSYWYG (What you see is what you get) editor where drag-drop is key.

Calling the form (from Abap)

The last step in this quick tutorial is getting actual output from these forms. This is very similar to Smart form output, where a function module is generated. Abap logic:

DATA: lv_fnam TYPE rs38l_fnam,  "Name of Function Module
      lw_sfpdocparams TYPE sfpdocparams, "Form Parameters 
      lw_sfpoutputparams TYPE sfpoutputparams. "Output Parameters

* Sets the output parameters and opens the spool job
CALL FUNCTION 'FP_JOB_OPEN'                  
    ie_outputparams = lw_sfpoutputparams
    OTHERS          = 4.
CHECK sy-subrc = 0. "This example does not cover error handling

* Fetch name of the generated function module (like with Smartforms)
    i_name     = 'Z_YOUR_FORM_NAME_HERE'
    e_funcname = lv_fnam
    OTHERS     = 4.
CHECK sy-subrc = 0.

* Language and country setting (here US as an example)
lw_sfpdocparams-langu   = 'E'.
lw_sfpdocparams-country = 'US'.
* Call the generated function module
    /1bcdwb/docparams        = lw_sfpdocparams
* own parameters to be added here
    OTHERS          = 4.
CHECK sy-subrc = 0.
* Close the spool job
    OTHERS = 4.
CHECK sy-subrc = 0.