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.

/wp-content/uploads/2014/05/8_464093.png

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

/wp-content/uploads/2014/05/9_464094.png

  • Then double click on GT_MAKT and add the condition as shown below.

/wp-content/uploads/2014/05/10_464095.png

  • In the layout, position the fields from both the internal tables as required.

         A sample positioning is shown below.

/wp-content/uploads/2014/05/11_464096.png

  • The output that shall be displayed is shown below.

/wp-content/uploads/2014/05/12_464097.png


3) To remove Leading Zeros from a field value


  • Suppose a field consists of leading zeros as shown in figure below.

/wp-content/uploads/2014/05/13_464108.png

  • To remove the leading Zeros, first of all, change the type of field to Numeric Field.

/wp-content/uploads/2014/05/14_464109.png

  • Then from the Display patterns select a suitable pattern to be displayed (comma, without comma, percent, dollar, etc.)

/wp-content/uploads/2014/05/15_464110.png

/wp-content/uploads/2014/05/16_464111.png

  • The output would appear as per the selected pattern.

/wp-content/uploads/2014/05/17_464113.png


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.

/wp-content/uploads/2014/05/18_464114.png

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

/wp-content/uploads/2014/05/19_464115.png

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

/wp-content/uploads/2014/05/20_464154.png

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

/wp-content/uploads/2014/05/21_464155.png


/wp-content/uploads/2014/05/22_464159.png


/wp-content/uploads/2014/05/23_464161.png


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

/wp-content/uploads/2014/05/24_464160.png


  • The output shall appear with the appropriate columns.

/wp-content/uploads/2014/05/25_464165.png


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.


/wp-content/uploads/2014/05/26_464166.png


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


/wp-content/uploads/2014/05/27_464167.png


  • To create Body row

          Move the fields, which you want to view from data view on to the body page individually.

/wp-content/uploads/2014/05/28_464171.png


  • To set the accessibility role for each subform:


/wp-content/uploads/2014/05/29_464172.png


    In the Accessibility palette, select the Subform Role for each subform as follows:


/wp-content/uploads/2014/05/30_464173.png


  • To make multiple page table

          In the Object palette, click the Subform tab and select Flowed from the Content list.

/wp-content/uploads/2014/05/31_464186.png

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

/wp-content/uploads/2014/05/32_464187.png

  • Form shall be printed across multiple pages.



  











To report this post you need to login first.

12 Comments

You must be Logged on to comment or reply to a post.

  1. 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?

    (0) 
  2. 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).

    (0) 
  3. 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

    BR//Tirumal

    (0) 
    1. Hassan Zahid

      Hi,

      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.

      (0) 

Leave a Reply