Skip to Content
Author's profile photo Nitin Sikka

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

Adobe 1.pngAdobe 2.png

  • 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.

Adobe 3.png

  • 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.

Adobe 4.png

  • The image would be hidden based on the value of the flag passed as shown below.

Adobe 5.png

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.


  • Place the text field (here TextField3) in the Master Page and write the following JavaScript in the Script editor.


  • 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.


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Rudra Prasanna Mohapatra
      Rudra Prasanna Mohapatra

      nice document with clear and stepwise explanations.

      Author's profile photo S S
      S S

      Nice Document! very helpful 🙂

      Author's profile photo Nitin Sikka
      Nitin Sikka
      Blog Post Author


      Author's profile photo Hassan Zahid
      Hassan Zahid

      thank you, very helpfu..!

      Author's profile photo Ashkar Rizvi
      Ashkar Rizvi

      Mr Nitin Its a very helpful documentation.

      Is there any setting related to page orientation to fix it to portrait?
      My Adobe Custom page is of height = "8.5in" and width = "13in" orientation = "portrait". but form output is printing in landscape on dot matrix printer, I mean lines are vertical on portrait  paper.  landscape orientation  is obviously printing in landscape. but if I make page height = 11in print comes in portrait then page skiping is not proper as we have 8.5 inch attached sheets. can we do some workaround?

      Author's profile photo VIJAYA SIMHA CHINTARLAPALLI REDDY

      Wonderful document

      Author's profile photo Nitin Sikka
      Nitin Sikka
      Blog Post Author


      Author's profile photo Christopher Solomon
      Christopher Solomon

      Some useful tips in there!

      When all else fails I always Google for any needed Javascripts and also hit up the official and non-official Adobe form developer forums (non-SAP).

      Author's profile photo Nitin Sikka
      Nitin Sikka
      Blog Post Author


      Author's profile photo Tirumal Pullalachervu
      Tirumal Pullalachervu

      Very well explained Nitin, thank you !!

      I have a requirement to hide all the columns who has no value in it including the column header. For example, I would like to hide three columns Customer material, unit and Price.

      Column width should be adjusted accordingly.

      Item Material Material desc Customer material Quantity Unit Price Price in USD
      10 MAT1 Material1 2 200
      20 MAT2 Material1 3 300
      30 MAT3 Material1 4 400


      Author's profile photo Hassan Zahid
      Hassan Zahid


      1. Your can pass flag from driver code to your forms to hide columns.

      2.  At row level you can resize column width, thread/1918731.

      2. Try with Dynamic Internal table.

      Author's profile photo Former Member
      Former Member

      Thank You Nitin!!

      Very informative document.

      Author's profile photo Suresh Kumar Sivasubramani
      Suresh Kumar Sivasubramani

      Excellent article,

      Though i have just teensy little issue, the Header which hidden based on the suggested method does not stay hidden in the subsequent pages, is there a way to hide them there too?

      I must have missed something, or is it a bug with scripting in table headers? because when i searched forumns, others are mentioning to use "Alternatives" which is not suitable to me, because my requirement is for multiple documents in Nested tables, I cannot use any objects from the Context like address block, alternatives etc...

      Author's profile photo Nitin Sikka
      Nitin Sikka
      Blog Post Author


      are you talking about the footer example??

      Author's profile photo Suresh Kumar Sivasubramani
      Suresh Kumar Sivasubramani

      No the header is hiding script does not work in subsequent pages,Strange !

      Author's profile photo Prajesh Desai
      Prajesh Desai

      You may try below,

      Working with multiple header row of table in adobe forms

      Hope this helps.

      Author's profile photo Suresh Kumar Sivasubramani
      Suresh Kumar Sivasubramani

      Using Alternatives is not an option, as the respective footer is also dynamic, It would be usefull if I could put all of my design view content in an alternative, havent tried that..