Adding rows dynamically in a table using interactive Adobe Forms

By Phani Diwakar M, YASH Technologies

The requirement is to add the table rows dynamically in the table. This document is dealt with how to create dynamic table in interactive form using offline scenario.  

Step1: Go to SFP transaction and provide interface name.  

 

Click on Create button and provide the meaningful description for the interface.  

Step2: Now create import parameter ZMAT as shown below.  

Save and activate the interface.  

Step3: Now again go to transaction SFP to create form. Provide the form name.  

 

Click on Create button. A popup will appear where provide the interface name and meaningful description of the form.  

Step4: Now drag the import parameter ZMAT to context as shown.

Step5: Now go to layout.

Drag the table ZMAT to body page.

Drag the button from library on to body page below the table as shown.  

 

Step6: Now go to Hierarchy tab,

Go to OBJECT palette of DATA and provide the min count is 3 (when we execute the form initially it shows 3 default rows) as shown below.  

Step7:  Now click on ‘Insert’ Button.

In the script editor, write the following code which generates the rows dynamically at run time.

In script editor:  

var anInstanceManager = data.Bodypage.ZMAT.DATA.instanceManager;	
var newInstance = anInstanceManager.addInstance(1);
var aToIndex = data.Bodypage.ZMAT.DATA.index + 3; (Adds the rows from 4th postion)
var aFromIndex = newInstance.index;
anInstanceManager.moveInstance(aFromIndex, aToIndex);

Save and activate the form.

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image