Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
Adobe forms

Tables in Adobe form

Scenario: Flight details is to be displayed in the form of table.

Part – I : Creation of interface

Step 1: Go to the Tcode SFP and create an interface as shown below.

clip_image001

Enter the description for the interface , keep the interface type as abap dictionary based interface and click on save.

clip_image003

Assign the interface to the package or save it in the local object.

Step 2: In the types of global definitions, declare the structure and table type with necessary fields to be displayed on the table.

clip_image005

Step 3: In the global data of the global definitions, create a internal table to store the flight details.

clip_image007

Step 4: Go to the code initialization and write the abap logic to fetch the data from the database. Also mention the internal table in the output parameters.

clip_image009

Save and activate the whole interface.

Now lets move on to the second part creation of form.

Part – 2: Creation of form

Step 1: In the transaction SFP, enter the name for the form and click on create.

clip_image011

Enter the description for the form, Provide the interface name for the form which we created in the above step.

clip_image013

Assign the form to the package or save it in the local object.

Step 2: Drag and drop the global data of the interface it_sflight to the context of the form.

clip_image015

Step 3: Go to the layout tab of the form. In the layout editor on the left hand side choose the data view. It will display the internal table mapped to the context node. Drag and drop the table to the form layout.

clip_image017

Step 4: Set all the cell editor of the row as text field.

clip_image019

If you are not able to see it, right click on the table cell and choose palettes->object.

Save and activate the whole form.

Part – 3: Test the form.

Execute the form using execute button or F8. Function module generated for the form will be displayed. This function module will not have any importing parameters as we have not declared any while creating the interface. Click on execute.

clip_image021

System will prompt for printer name. Give the default dummy printer name as LP01 and click on print preview.

clip_image023

Output:

clip_image025

 

Configuring the tables using different options:

1. Controlling the data display using where conditions.

2. Using control levels in table

3. Displaying table data in multiple pages

Controlling the data display in form using where condition:

Say for example i want the data to be displayed only of the seats occupied is more than 371.

Go to the context tab of the form. Choose the internal table who data display is to be restricted at runtime and double click on it to display its properties.

clip_image027

Save and activate the form and test the ouptut.

Output:

clip_image029

Control levels in table:

Control levels are used to group table data by table fields. For this we need to sort the internal table according to the grouping fields in the interface.

clip_image031

Or we can also make use of the already sorted property of the table. This option works only if the table in the interface is defined in the global fields definition or as pass by value importing parameter.

clip_image033

Displaying table data in multiple pages:

In the previous example i have changed the interface to fetch more no of datas.

clip_image035

Output:

clip_image037

Not all the data in the table are displayed.

When there are huge amount of data to be displayed in the form of table the contents that only fit in the first page of the form will be displayed. This is because in the previous example we placed the table inside the page 1 which contains the content area. Thus the display is restricted only to the display region of the content area. What we can do is remove the table from the page that contains the content area and put it in a subform. When the time of creation of form a subform will be created. Lets make use of it.

Drag and drop the table inside the subform for the master page.

clip_image039

In the object window for the subform, set the content property of the subform as flowed. If you are not able to see this. Select the subform->in the layout right click ->choose pattern->object.

clip_image041

Test the output:

You can now see the data overflowing the first page displayed in the second page and so on.

clip_image043

About Arun

4 Comments:

  1. Thank You,If I want to display subtotals(Airfare) for carrid 'AA' How do I go about doing it.Thanks

    ReplyDelete
    Replies
    1. Hi, my doubt is same ,,what to do if we want the subtotals for carrier 'AA' and so on. Did you get the answer for this?

      Delete
  2. PDF is a perused just arrangement and subsequently no progressions can be made to the plan of the frame. online-form-builder.pdffiller.com

    ReplyDelete

Powered by Blogger.