Introduction to Adobe Forms

Adobe Forms is a basic tool for creating PDF forms in S/4HANA. As an example, we would like to show you, how, a sample printout of “flight ticket”, based on the data from SAP training tables (sbook , scarr, spfli), could be created.

To start we need to create a Form Interface, which is very similar to the one in SmartForms. It is worth mentioning that in Adobe Forms we can use one interface to create multiple forms.

Fig. 1 – Creating the Interface

Our  form will be generated basing on the specified reservation number, so we need to declare it as an import parameter.

Fig. 2 – Creating import parameters

The next step is to create a data structure, which will be used in the next step – while creating the form layout. Note that we do not need to use all the data from this structure. The form interface should be designed to be easily used in various similar forms.

Fig. 3 – Type creation

Fig.4 – Structure declaration

Code initialization is being used to get the necessary data and transfer them into the structure created in the previous step.

Fig. 5 – Downloading data

After preparing the Interface we can start to create the Adobe Form.

Fig. 6 – Creating a Form

While creating a Form we indicate a name of previously prepared Interface that will be used.

Fig. 7 – Indicating the Interface

The structure of the interface is visible on the left side of the screen (Fig.8). In order to use the data it contains, we need to drag and drop them into our form. In this example, we move the gs_ticket structure to ztutorial_create_ticket. Then we choose “Layout” and proceed to design our form.

Fig. 8 – Dragging data from the Interface to the Form

First we must decide what shape and size should have the printout we are creating. In our example, we decided that our form will be 5cm high and 10 cm wide

Fig. 9 – Determine the size of the document

In the next step we may add a graphic to our printout. It can be done in two ways. The first one is to use the se78 transaction and download graphics from the system (in this case the quality of graphics could be not satisfying). The second solution is to indicate the image file located on the disk directly from Adobe Forms. In our case we used the second way. On the right side of Fig.10 in “Object Library” window, we look for  “Image Field” object, indicate image file location (URL or local folder) and  mark the checkbox “Embed Image Data”. Then we can drag the object into our layout of the form.

Fig. 10 – Inserting graphics into a printout

Next step is to fill the form with the data prepared by the Interface.  On the left side of Fig.11 ( in DATA VIEW ) we can see the structure transferred from the interface to the form. Using the drag and drop method, we put the desired data to the destination place.

Fig. 11 – Filling the form with data

By clicking on any record located on the form, in the lower right corner of the screen,  will show up a window with a “Layout” tab (Fig.12). We can specify there what size and in what position the data record should appear. In addition, if we want to hide the description of the record, then in the place of “Caption” -> “Position” we need to select “None”.

Fig. 12 – Determining the location of a record

If we want to add any text on the document (for example “Arrival” and “Departure”), we need to open again the “Object Library”, find “Text” and drag it onto our form.

Fig. 13 – Inserting text into a document

Adobe Forms gives us the possibility to insert a graphic as a background (watermark).

Fig. 14 – Adding a background to a document

To insert “Barcode” into a form, we should open the “Object Library” and find the barcode style we are interested in and assign the data field.

Fig. 15  – Inserting barcode into a form

The final result, presents as follows:

Fig. 16 – Final document