Adobe forms Most common requirements
This document includes some most common requirements of sap adobe forms.
1) To hide/display an Image at Run time
- To add an Image, select and drag Image object from Object Library and give the path of the image in the URL field of the Object palette as shown above.
- As shown in figure above, suppose there are 2 images: – Image 1 and Image 2. One of these have to be hidden at run time based on a flag value say GV_FLAG.
- To do so, wrap the 2 images and the flag into a subform as shown above and make the text field of the flag invisible.
- Now click on the subform and write a script in the script editor as shown below.
- The image would be hidden based on the value of the flag passed as shown below.
2) To display related information from different internal tables
- Suppose there are 2 internal tables, GT_MARA having Material information and GT_MAKT having Material description.
- Material description for a material in GT_MARA needs to be printed with the material information simultaneously having common field MATNR.
- As shown above, first drag GT_MARA into the context of the form.
- Then drag GT_MAKT into the data of GT_MARA as shown below.
- Then double click on GT_MAKT and add the condition as shown below.
- In the layout, position the fields from both the internal tables as required.
A sample positioning is shown below.
- The output that shall be displayed is shown below.
3) To remove Leading Zeros from a field value
- Suppose a field consists of leading zeros as shown in figure below.
- To remove the leading Zeros, first of all, change the type of field to Numeric Field.
- Then from the Display patterns select a suitable pattern to be displayed (comma, without comma, percent, dollar, etc.)
- The output would appear as per the selected pattern.
4) To display footer only on last page
- Suppose there is a footer section, as shown below, that has to be printed only on last page.
- The text field shall only be printed on the last page.
5) To hide a Table Column and adjust width of other Columns
- As shown in figure below, suppose we want to hide a column of a table at run time based on some condition and want to adjust the width of the other columns.
- In order to do this, write the script to hide the individual row of the table at appropriate event and appropriate location as shown below.
- At the table level in Initialize event, add the following script indicating the new widths of the columns to be displayed (along with unit) and Zero width of the column to be hidden.
- The output shall appear with the appropriate columns.
7) Using sub form to create a table
Instead of using Table Designer, build this form design with a set of nested subforms and then set the accessibility role of the subforms to emulate a table. Use nested subforms instead of Table Designer because a table with multiple header and body rows is not accessible. As illustrated below, when a table has multiple rows, the form generates multiple lines of accessibility tags. The form design generates these accessibility tags even if the body rows are grouped in a table section.
- To create Header subform
1. In the Hierarchy palette, create a text element for header text inside Line_item body page.
2. Wrap the text in a subform giving the accessibility as header row.
- To create Body row
Move the fields, which you want to view from data view on to the body page individually.
- To set the accessibility role for each subform:
In the Accessibility palette, select the Subform Role for each subform as follows:
- To make multiple page table
In the Object palette, click the Subform tab and select Flowed from the Content list.
- To set the Header subform to appear at the top of each page:
In the Object palette, click the Pagination tab. Under If Dataset Must Be Paginated, select Header from the Overflow Leader list.
- Form shall be printed across multiple pages.