SAP Adobe Interactive Form Tutorial. Part II. Tables in Adobe Form

In SAP Adobe Interactive Form Tutorial. Part I, we demonstrated the steps to create our basic form and the driver program. One of our readers requested the configuration steps for the driver program and Adobe form. In SAP Adobe Interactive Form Tutorial. Part II. Tables in Adobe Form, we will cover how to set up tables within the Adobe form and configure the driver program accordingly.

Question from our peruser: Might u at any point if it’s not too much trouble, make sense of where we will arrange the driver program and related adobe structure name, to set off in any exchange?
Reply: Go to t-code NACE==>Select any application. For instance : V3 ==> Proceed “Result type” button ==> Select any result type. For Instance : RD00 ==> Go ahead “Handling Schedules” ==> here we can arrange Medium/Program/Structure Routine/Structure/PDF-SmartForm Structure.

Under PDF-Smartform Structure, we can arrange the adobe structure.

In PP Module – we can arrange in OPK8 Exchange.

In the previous part of the SAP Adobe Interactive Form Tutorial. Part I, we explored how to display a variable. In real-world scenarios, it’s rare to have a requirement where only a single field needs to be displayed. Today, in “SAP Adobe Interactive Form Tutorial. Part II. Tables in Adobe Form,” we will learn how to create tables in Adobe Forms. Generally, there are two methods for creating tables in Adobe Forms.

1. Normal Table Method using Table Object
2. Create Table using Sub Forms in Adobe

Table Object Method:
Benefits:
It is basic and simple. At the point when we have not many fields which can squeeze into the single line in the design, we can utilize this
The originator realizes that you are working with tables. Creator permits choosing lines or segments, to resize a section at the same time.
We have a really look at box to rehash the table header on each page

Hindrances:
On the off chance that we deactivate the fields in the specific circumstance, it will be hard to utilize if necessary in the structure anyplace. For instance in Content manager ( to have some contingent printing and so on)
Challenging to deal with when we need to print the settled tables
Restriction when we need to print non-standard tables

SubForm Strategy:
What is Subform?
The subform is essential for the structure which is utilized for sorting out the various components like info fields, tables, messages present body pages and seldom ace pages.
At the end of the day, Subform is only a gathering of components. To bunch specific components on the design we can utilize subform and wrap them into it.

Benefits:
Utilizing subforms gives us greater adaptability while spreading out tables.
At the point when we need to print different columns of table, subform is more valuable
We can revise cells in subform (Print any place we need )
It is extremely helpful when we are printing settled tables in the structure.

There are no much impediments, in light of the fact that inside, tables are dealt with as subform structures. We can undoubtedly take a look at this on the off chance that we take a gander at the XML wellspring of the format in Planner.
In the event that we believe that the header should be rehashed in the event of page breaks we need to utilize “Flood Pioneers” (rather than the advantageous really take a look at box in the event that we are utilizing tables). We want to set them on the “Pagination” tab of the article range).

So contingent upon what we need to accomplish we could need to utilize subforms rather than a table. Yet, for standard tables, the suggestion is to straightforwardly utilize the table item. Follow the KIS procedure. Keep It Straightforward (KIS).

I’m certain in the event that you have not worked in Tables previously, the above benefits and weaknesses could have most certainly befuddled you. Sit back and relax. Disregard the above correlation. We will complete an involved with bit by bit guide and when you wrap up making the tables utilizing both the strategies referenced, the image would be clear.

In this instructional exercise, our point is to show Client Information from Client Expert Table KNA1 utilizing both the techniques. We should Adobe.

Building the Interface which would be common for both methods.

Transaction Code: SFP.

Enter the Interface name and Create (Interface is mandatory for Adobe form).

Tables in Adobe

the short description and Save.

SAP Adobe Form Tutorial

the Package name and Save.

SAP Adobe Form Tutorial

Allow us to add our own custom Boundary Name. Select the Import choice under Structure Connection point (left side) and press the Make button (right side) to add a Bringing in Boundary

SAP Adobe Form Tutorial

Bringing in Boundary IT_KNA1 is of type CCRCTT_KNA1. CCRCTT_KNA1 is a table sort of KNA1. In Adobe structure interface/Capability module you want to utilize Table Sort Boundaries to pass table information to the structure from your program. (In Capability module, Tables boundary is old).

Save, Check, Actuate the Connection point.

Go to back SFP Exchange fundamental screen. Make the structure.

SAP Adobe Form Tutorial

Press on create button

Give the short portrayal and Connection point name which you have made before.

SAP Adobe Form Tutorial

Enter the Bundle name and Save.

Drag IT_KNA1 from Connection point which we made before to the Specific situation.

Tutorial in SAP Adobe Forms
Tutorial in SAP Adobe Forms

Method 1: Create Table in Adobe Form using Table Object

You ought to deactivate the fields from the Table which are not expected to print since there are many fields in the table, it won’t fit in the structure.

Select the fields which are not expected to be shown.

Tutorial in SAP Adobe Forms

Right click and select deactivate.

Tutorial in SAP Adobe Forms

Then it looks like below.

Tutorial in SAP Adobe Forms

We have only 6 active fields.

Go to layout tab

Tutorial in SAP Adobe Forms
Tutorial in SAP Adobe Forms

Embed a text variable to make them head on the structure.

Tutorial in SAP Adobe Forms
Tutorial in SAP Adobe Forms

Change the text as required.

Tutorial in SAP Adobe Forms

You can change the text style and size of the text in the obvious area above.————————————————————————————————
Ram’s Tip 1: In the event that you don’t find Text style toolbar naturally, you can enact it as displayed underneath.

Go to Palettes -> Press on Font.

SAP Adobe Interactive Form Tutorial. Part II. Tables in Adobe Form


————————————————————————————————

Now go to Data view.

SAP Adobe Interactive Form Tutorial. Part II. Tables in Adobe Form
19

Select IT_KNA1, Drag and drop it into the layout.

SAP Adobe Interactive Form Tutorial. Part II. Tables in Adobe Form

You can change the section level or width, by intuitive choice. If you have any desire to be exceptionally exact, you can likewise go to the properties in the right hand side and change the width and level.

SAP Adobe Interactive Form Tutorial. Part II. Tables in Adobe Form

Save, Check, Activate the form.

Kindly note: On the off chance that you have information in the IT_KNA1 table more than 1-page size, it wouldn’t stream to the following page. You need to do the accompanying two exercises to see all information.

The subform must be Flowed.

a1

Select IT_KNA1 And check the check box ‘Allow Page Breaks within Content’.

a2

————————————————————————————————————————

Begin of Update on 27th February 2017

A few clients in certain nations would like the table to have the line Design from Right to Left.

As a matter of course, correcting Rows is Left.

Right to Left Alignment

Be that as it may, in the event that you need your columns from Right to Left, pick the format from the Table properties.


————————————————————————————————————————

Execute the Driver program: YRAM_ADOBE_FORM_PROGRAM2. The code scrap is given toward the end.

The result would show the table with the Client Expert information.

Step by step Adobe Forms Tutorial

Right now, we are enticed to end this article. Reason being two. To begin with, it is 11:20 PM in the evening and second, the article is as of now lengthy. In any case, we chose to proceed with the post and remember the Strategy 2 for a similar post so the perusers don’t lose the coherence and stream of learning. So take a speedy water break and continue to the following Technique. It would be seriously fascinating and testing.

Method 2: Create Table using Sub Forms

By utilizing this strategy, we can show the fields in any request and the fields in numerous columns of lines.

24

Go to layout

25

Each structure will have Expert page and Body page as a matter of course (Untitled Subform) (page1).

In Straightforward definition, we can utilize Expert page to print the header information and Body page for printing the thing information.

The substance region is utilized for printing the information in Body page. We can change the length or width of the substance region in Expert page.

We are keeping the header in Expert page

SAP Adobe Forms

————————————————————————————————
Ram’s Tip 3: Anytime of your turn of events, to see the fundamental result of your structure, you simply have to tap on See PDF Tab.
————————————————————————————————

Go to configuration view

To print the Table information the Subform must be FLOWED.

SAP Adobe Forms

This is a vital stage. We want to embed the SubForm.

SAP Adobe Forms
SAP Adobe Forms

You can change the level or width of the window in Design tab. You can likewise drag and change.

This Subform can be utilized as the header. If it’s not too much trouble, note Untitled SubForm has been renamed as Header in the left hand side.

Change the header structure content to Streamed, and Stream course to Western text, so that fields will be shown next to each other.

SAP Adobe Forms

Select your header Subform go to insert -> 0 – Standard -> Text field.

SAP Adobe Forms

You want to change the properties of the text field for better presentation and appearance.

Select the TextField1. Change the appearance from Indented box – > Strong box.

SAP Adobe Forms

Change the position from left -> none.

SAP Adobe Forms

Value entered from user entered from -> Read-only.

SAP Adobe Forms

Select the Border as the solid color.

SAP Adobe Forms

Presently, you can reuse this TextField1.

Reorder the TextField1 in Header sub from. (For this situation glue multiple times since we want 5 fields to show)

SAP Adobe Forms

You can Change the name of the field.

SAP Adobe Forms

You can pass hard coded text to these fields.

SAP Adobe Forms

You can change the depiction and An incentive for every one of the excess fields.

39

We have made the Header column. Presently, the time has come to print the thing information of the table.

Create one more Subform and name it as Items.

Change the thing Subform content to Streamed, and Stream course to Western text, so that fields will be shown next to each other.

SAP Adobe Forms

Duplicate the five fields Client No, Nation, Name, Road, and Phone and glue under things subform.

Eliminate the default values for every one of the fields.

SAP Adobe Forms

Tie the information table, i.e IT_KNA1 to the Things Subform.

Binding data in Adobe Forms

Restricting is a vital piece of Adobe. Ensure you tie the information accurately.

SAP Adobe Forms

Bind the fields as:
CustomerNo to KUNNR,
Country to LAND1,
Name to NAME1
Street to STRAS
Telephone to TELF1

44
Binding in Adobe Forms
46

You should check the checkbox Rehash Subform for every information thing.

SAP Adobe Forms

Run the Driver Program: YRAM_ADOBE_FORM_PROGRAM2

The result ought to be same.

48

In both the Techniques above, we utilized the underneath driver program to call the Adobe Structure. Snap it in your advancement SAP framework and test your recently made tables in the Adobe.

*&---------------------------------------------------------------------*
*======================================================================*
* YRAM_ADOBE_FORM_PROGRAM2 *
*======================================================================*
* Project : SAP Adobe Forms Tutorial *
* Author : Varad (www.elearningsolutions.co.in) *
* Description : Driver Program for Printing the Customer data *
*======================================================================*
REPORT yram_adobe_form_program2.

**&&~~ Data Objects
DATA: gv_fm_name TYPE rs38l_fnam, " FM Name
gs_fp_docparams TYPE sfpdocparams,
gs_fp_outputparams TYPE sfpoutputparams,
gt_kna1 TYPE STANDARD TABLE OF kna1.

CONSTANTS : gv_form_name TYPE fpname VALUE 'YRAM_ADOBE_FORM2'.

*======================================================================*
* START of TREATMENT *
*======================================================================*
START-OF-SELECTION.
SELECT * FROM kna1 INTO TABLE gt_kna1 UP TO 50 ROWS.
*&---------------------------------------------------------------------*
**&&~~ Form Processing: Call Form - Open
*
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = gs_fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
" Suitable Error Handling
ENDIF.
*&---------------------------------------------------------------------*
**&&~~ Get the Function module name based on Form Name
*
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = gv_form_name
IMPORTING
e_funcname = gv_fm_name.
IF sy-subrc <> 0.
" Suitable Error Handling
ENDIF.
*&---------------------------------------------------------------------*
**&&~~ Take the FM name by execuing the form - by using Pattern-
**&&~~ call that FM and replace the FM Name by gv_fm_name
*
**&&~~ Call the Generated FM
CALL FUNCTION gv_fm_name "'/1BCDWB/SM00000176'
EXPORTING
/1bcdwb/docparams = gs_fp_docparams
it_kna1 = gt_kna1
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
*&---------------------------------------------------------------------*
**&&~~ Form Processing: Call Form - Open
*
CALL FUNCTION 'FP_JOB_CLOSE'.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
*&---------------------------------------------------------------------*
*&---- Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*&---------------------------------------------------------------------*

Do you have anything to add to this article? Have you encountered any issues while using Adobe Forms? Would you like to share any real-world project requirements or solutions? Feel free to share your thoughts. Please leave your comments in the section below and let us know how SAP Adobe Interactive Form Tutorial. Part II. Tables in Adobe Form has helped you or if you have additional insights to offer.

Many thanks for your time!!

 

YOU MAY BE INTERESTED IN

Applying Enterprise Integration Patterns in SAP ABAP

Objects of Data Dictionary in SAP ABAP

SAP LUW in ABAP Cloud

 

WhatsApp WhatsApp us