Adobe Forms Using:  Nested internal table, Text Module & providing the functionality of Page Total & Grand Total

The purpose of this blog, to make things easier for newbie who wants to develop Adobe Forms.
Here we display the use of nested tables, how to display images, displaying multi-lingual text, calculate page total & Grand Total.

Follow the procedure given below

• Start transaction SE11
• Create two Structures and two Table Types.

Here we have created custom structure zflight in which we have created another structure zflight1 to demonstrate nested table functionality.
This structure will be an import parameter of interface.

Structure 1:
   Create Structure ZFLIGHT1 consisting of fields as shown in the below diagram.

Table Type 1:
    Create a Table Type ZFLIGHT1_TABLE whose Line type will be ZFLIGHT1 i.e. the Structure defined above.

Structure 2:
   Create Structure ZFLIGHT consisting of fields as shown in the below diagram, along with the Table Type ZFLIGHT1_TABLE as shown above.

Table Type 2:
    Create a Table Type ZFLIGHT_TABLE whose Line type will be ZFLIGHT i.e. the Structure defined above.

• Start transaction SFP.
• Create an Interface.
Follow the Instructions given through the Screen Shots.

Give appropriate description   
Create an import parameter with Type ZFLIGHT_TABLE.

In the same manner create two more import parameter W_LANG & W_GRAND with type ‘CHAR10’ & ‘CMS_DTE_ORIGINAL_AMT’ respectively. It will be used for language selection & Grand total calculation.

Save & activate the Interface.
• Start transaction SFP.
• Create a Form.
Enter the form name.

Enter the appropriate description & Interface name.

In T-code SFP go to the Context

Drag the IS_ZFLIGHT into the context.

Deactivate the fields of the table, which will not be used in the layout, it adds to the performance.

Language conversion using text module:
Step 1:  Create the two folders for German and English language.

Step 2: Go to T-Code SMARTFORMS, select the Text module radio button & create a text module for English Language as shown below.

Same way we create Text module for German Language

 Step 3: Create Text.

Step 4:  Set the property of text & Assign the Text Name and Text Language.

Step 5:  Drag the Text form Data View to Master Page (so as to display the Heading in every page).
Or in the body page where ever you want to display .Overlap both (German & English) text & do the binding.

Step 6: Now Drag W_LANG from Import list into each folder. Set the Condition on German folder as

Do the Same thing on English Folder with condition W_LANG = ‘ENGLISH’.
Switch to the Layout Tab.
•    Rename the untitled content area & subform to ContentArea1 & Data respectively.
•    Drag the Zflight1 Data from Data View into the Layout.
•    Delete the untitled table header.
•    Set the property of Object in the Row Tab in which, Type: Body Row.
•    Put Accessibility as Body Row.

•    Drag the CARRID, CARRNAME and ZFLIGHT1 fields into Body Page from Data View.
•    Wrap the CARRID, CARRNAME & ZFLIGHT1 table in Subform and name it as Body.
•    Again wrap Body with a Subform and name it as Table.
•    Group the Data section of Zflight1 (It will be needed when we will calculate the Page Total).

Set the properties of Subform Data as given below:

Set the properties of Subform Table as given below:

In the accessibility tab assign Subform Role as a Table.

Set the property of Subform Body as given below:


In the accessibility tab assign Subform Role as a Body.
For all the fields CARRID, CARRNAME, CONNID, FLDATE, PLANETYPE, PRICE, CURRENCY, give Appearance as none, Type as User Entered – Optional & do the appropriate Binding as shown below for CARRID, do the Binding for remaining fields in the same way.
Do the same thing for all the fields.

•    Create a subform in Master page and rename it as ‘MainHeading’.
•    Drag both the text (which is created above) in ‘Mainheading’ and create one   more    subform inside a subform named as a Header.
•    Drag Image from library and give the path for image present in presentation server.

Do the binding of all the subform & Text. Make both the subform as positioned.
Repeat the Step 2 to Step 5 for heading (Carrid, Carrier Name, Connid, Flight Date, Plane Type, Price, and Currency) put corresponding values for German also.

Content Area which will represent the BodyPage area.

Create a Subform in master page named as Footer. Inside the footer create one more subform and drag text field (which is used to display the page total) & text for ‘subtotal’ as shown below.

Create this by repeating step 2 to step 5.
For Calculating Page total we’ve used JavaScript.
var fields = xfa.layout.pageContent(, “field”, 0);
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
if (fields.item(i).name == “PRICE”) {
total = total + fields.item(i).rawValue;
this.rawValue = total;  

First click on the text field on which you want the page total, after that put above code in the space provided & change its property as shown in the figure. After putting the code click on the green button with plus sign. It will place the code on page total location.

 GrandTotal: Drag content area from library into Page1 & rename as a ContentArea2.

Create a subform into body page and rename as GrandTotal. Drag W_GRAND from data view into GrandTotal & do the appropriate binding. Create Text module for Grand Total by repeating the step 2 to step 5.

Place the GrandTotal Subform on the ContentArea2 as shown below.

Terms & Condition: Create a new Master page. When we create a Master page, content area is also created automatically. Create a subform in body page rename as Terms&Condition.Place this subform into Page2 contentArea3 & drag a text field into subform and resize the field (after removing caption & make appearance as None ) to the size of content area .

Create two text module German_terms & English_terms which have the terms & condition in the German & English respectively using the step 2 to step 5.For the heading of terms & condition again repeat the step 2 to step 5.

Output:   First Page of Report

Last Page of Report

Terms & condition


New NetWeaver Information at

Very Helpfull

User Rating: Be the first one !