Skip to Content
Technical Articles
Author's profile photo Sai Kiran Mopuri

Displaying Header and corrosponding item data for each header in single table in Adobe forms

This article explains how to display header corrosponding items to each header in tabular format in Adobe forms.

Here is the example .

Requirement : To display VABK(Invoice Header) and VBAP(Invoice Item) data in tabular format in adobe form , For every invoice header we need to display invoice items and go for next header and item in single table.

Example :

Billing doc no Creation date Sales org Currency   Header
Item No Material No Rice Sales Unit   Item
931214438 01-06-2020 4700 USD Header Data
10 20505306 0 cs Item Data
20 20505306 1,728.00 cs
30 20505306 1,728.00 cs
40 20505293 0 cs
931214439 01-06-2020 4700 USD Header Data
10 20505306 0 cs Item Data
20 20505306 1,728.00 cs
30 20505306 1,728.00 cs
40 20505306 0 cs

 

Step 1 : Go to Transaction code SFP(Form Builder).

Step 2: We need to create interface first before creating adobe form for this Enter the Name of the                   Interface as shown below and click on Create button.

Interface%20Creation%20Image

 Step 3:   A pop up will be displayed. Enter the description and Interface Type .Click on Save.

                 

Step 4: Save it on the Transport which is required and an interface will be displayed like below.

           

Step 5: Goto Types tab and create types and table types for Header and item data as below.

Step 6: Go to Global data tab and declare header and item internal tables as below

Step 7: Goto Code initialization tab and fetch the data to gt_header and gt_item internal table from                 VBRK and VBRP tables as below.

Now the data is available in the internal tables , please create an adobe form to display the data in tabular format as per the requirement.

Step 8: Goto T-Code SFP and Give form name as below and click on create the Adobe form.

Step 9: Provide short description and provide above created interface ZADOBE_HEADER_ITEM at              interface input and save it in Transport and create adobe form as below and activate it.

Step 10 : After you activate your form , Please drag your header internal table form interface to                         context level as below .

Step 11: Now Right click on the GT_HEADER at context and create loop and add GT_ITEM in the                    table input .

Step 12 : Now Provide the condition that item should loop for appropriate header , As per below                         screen shot put the condition that gt_header-vbeln = gt_item-vbeln in where condition tab                   at item level as below.

Step 13 : Context level part is completed , Now go to layout part for designing , for this click on                          layout and open design page and create a table which as 4 rows 2 is for header text and                    item text and another 2 for header GT_HEADER  data and GT_ITEM as per header                            record as shown below.

Step 14: In First two rows hard code the header and item texts .

To show the difference in heading i have made header text as centre aligned and item text as left aligned.

Step 17 : Now before binding to header and item data make the last two rows as group as section ,                    then it will become one row and behaves as single internal table deep structure , please                      follow as per below screenshot.

Procedure : Select Row 3 and Row 4 at hierarchy  level -> Right click -> Group as section.

             

After this Group as section on top of Row 3 and Row 4 at hierarchy level  a virtual row will create and that will became as the main row for our understanding i have renamed as Main row as below.

Step 18: Now Bind the header and item data for this make all the data cells as text fields then Goto to each cell -> Click on pallets -> object -> Binding -> Bind the header and item data for all the cells.

Note Bind header data at Row 3 and Item data at Row 4 as below.

Sample binding process as below.

 

Step 19 : After data binding , For Row 3 and Row 4 Remove Repeat row for each data item check                     box and check for Main row , this shows repat for all the group rows.

Step 20: Wrap the Table in subform and put it as flowed and make even main form also in flowed                     mode , Final layout like below.

In the Above 1 indicates warp table in subform and make it as flowed and 2 indicates make main form as flowed.

 

Step 21 : Save the form and activate and execute the form give printer as LOCL or LP01 and the output shown as below.

 

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.