Nested tables in Adobe Forms

By Sunil Saini, YASH Technologies

This Tutorial demonstrates on using Nested Tables in Adobe Forms.

Step1: Go to SFP transaction and create interface for the Adobe form.  

 

Note: Maintain Interface type ABAP-Dictionary Based interface. (IN ECC6.0 Version)

Step 2: Create Global Types as shown below by clicking on Types, here we are creating a Nested Table type which consists of 2 Individual fields (carrid, carrname) and an Internal Table(spfli).  

 

Step 3: Create Global Work Areas and Internal Tables as shown below.

WA_SCARR	TYPE	SCARR
IT_SCARR	TYPE	SCARR_TAB
WA_SPFLI	TYPE	SPFLI
IT_SPFLI	TYPE	SPFLI_TAB
WA_FLIGHT	TYPE	TYPE_FLIGHT
IT_FLIGHT	TYPE	TABLE_TYPE_FLIGHT 

  

Step 4: Code for fetching the data is written in the code initialization part of interface.

In code initialization the variables whose values are being passed to the code to fetch the details of the output should be declared in the Input parameters and the variables to which the results are assigned needs to be declared in the Output parameters.

Input Parameters:

WA_SCARR
IT_SCARR
WA_SPFLI
IT_SPFLI
WA_FLIGHT

Output Parameters:

IT_FLIGHT

 

Step 5:  Write the below code in code initialization part. Check for errors and activate the interface.

* Fetching Flight Details from SCARR Table.
SELECT *
  INTO TABLE it_scarr
  FROM scarr
    UP TO 10 ROWS.
* Fetching Data from SPFLI Table for corresponding Entries in SCARR.
SELECT *
  INTO TABLE it_spfli
  FROM spfli
   FOR ALL ENTRIES IN it_scarr
 WHERE carrid EQ it_scarr-carrid.
* Looping at SCARR Internal Table.
LOOP AT it_scarr INTO wa_scarr.
  wa_flight-carrid   = wa_scarr-carrid.
  wa_flight-carrname = wa_scarr-carrname.
* Looping at SPFLI Internal Table.
  LOOP AT it_spfli INTO wa_spfli WHERE carrid EQ wa_scarr-carrid.
* Appending SPFLI Records into the SPFLI part of FLIGHT Table.
    APPEND wa_spfli TO wa_flight-spfli.
  ENDLOOP.
* Appending SCARR Records into the SCARR part of FLIGHT Table.
  APPEND wa_flight TO it_flight.
  CLEAR wa_flight.
ENDLOOP. 

Step 6: After the interface part is done, create Form by going to SFP transaction. 

Step 7: In the creation of the Form, we need to give the name of the interface for which we are creating the Form. This is the additional functionality in Adobe forms. One interface can be used for many Forms if it is suitable. 

Give the Description to the Form as shown below. 

 

Step 8: In the Context tab of the Form we will find two sections Interface and Context.

In Interface we will find the data that was created in the interface. We need to drag the elements that need to be displayed in output into the content area. 

 

Deactivate the Unwanted Fields as shown below. 

 

Rename Content Area to ContentArea1. 

 

Then Right-Click on the Content Area and click on Insert SubForm and Resize it accordingly.

 

After that Click on Master Pages and then Drag and Drop a Text and Enter any suitable Text. 

 

Then Right-Click on data and create one more Sub Form and align it as shown below. 

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