SAP & Oracle partner and support companies

Loading

SAP

SAP Adobe Form Tutorial Part XIII How to Print two Tables Adjacent to each other?

Displaying two tables side by side on a SAP Adobe Form is a common requirement, but many of us find it challenging to achieve on the first try. If you search for a solution using keywords such as SAP Adobe Form Tutorial Part XIII How to Print two Tables Adjacent to each other or “Data Overflow Issue in Sub Forms Tables in SAP Adobe Forms,” you will find the following links as the top few search results.

Situation 1 asked by one Client

I have a form with a body page and two tables. The body page’s property is set to ‘Streamed’ with ‘through and through’ as the stream direction, and the checkbox for page break is enabled. In SAP Adobe Form Tutorial Part XIII How to Print two Tables Adjacent to each other, we will explore how to configure the form to print these two tables side by side on the same page.

Necessity

The two tables should be printed nearby one another.

Approach followed until now

  1. Since the body page is ‘Streamed’ type, the two tables are set one underneath the other (Tab1 and Tab2). So I attempted to set the Stream bearing of the Body page to ‘Western text’. In any case, this didn’t address the issue as since it is set to ‘western text’, solely after Tab1 is delivered, table Tab2 begins printing itself, which isn’t wanted. Both the tables ought to be printed simultaneously.
  2. I enclosed both the tables by one sub form with ‘Type’ set to ‘Situated’ and set the checkbox for the page break. Presently I organized the tables nearby one another. However, the checkbox for page break for both the tables was handicapped and along these lines in the event that there isn’t adequate room to print the all out records of both the tables, the total tables are moved to another page leaving the past page clear.

 Similar Scenario asked by another User

 “I generally disapprove of 2 tables lying next to each other – say Table An on the left and Table B on the right. At the point when Table B has a flood of information in the following page. Then the overflown dataset lines of Table B goes to the left on the following page rather than its segment head for example .right of Table A.
This happens just when table B is spilling over and Table An on the left excess on Page 1.”

On the off chance that you didn’t comprehend the issue situation, then, at that point, the under two pictures ought to help. Keep an eye on page 2, the right-hand side table is spilling over to page 2 from page 1, yet it has moved to the left as opposed to remaining on the right side.

Trust you figure out the situation now.

There are numerous ideas to accomplish this. Some said to connect every one of the inward tables to one major inside table to be shown. It would work, however that is super unwieldy assuming you have numerous tables.

The other most normal viable arrangement gave is to placed the tables in two different SubForms, make them Streamed with page break and print them together. Allow us to do likewise.

We are not telling you the best way to make the tables and SubForm. We accept, you know it so we are simply showing the Connection point and Structure settings and codes.

Adobe Form Interface

TYPES

Global Data

Code Initialization

Form Routines

The Form is designed as below.

Two SubForms LHS and RHS are enclosed by one SubForm LHSandRHS. MARA_Table SubForm and MARC_Table SubForm are wrapped inside LHS SubForm. Likewise, EKPO_Table SubForm is wrapped inside RSH SubForm.

The following is the extended perspective on all the Ordered progression Items.

All the SubForms are Items are Streamed with Stream Course Western Text.

Additionally, remember to make the Page DetailBody Content as Streamed and Permit Page Breaks with Content.

We wrote the below Driver Program to test our form.

***---------------------------------------------------------------------*
*** Date   :19/03/2025                                               *
*** Author :Varad(www.elearningsolutions.co.in)                                                 *
*** Title  :Demo Printing of Tables Side by Side in Adobe with      *
***         Overflow to next page                                   *
***---------------------------------------------------------------------*
REPORT ELEARNING.

PARAMETERS:
p_rowl TYPE i,  " Number of Rows
p_rowr TYPE i.  " Number of Rows

CONSTANTS : gv_form_name TYPE fpname VALUE 'ELEARNING'.
**&&~~ Data Objects
DATA: gv_fm_name         TYPE rs38l_fnam,      " FM Name
gs_fp_docparams    TYPE sfpdocparams,
gs_fp_outputparams TYPE sfpoutputparams.

*&---------------------------------------------------------------------*
**&&~~ 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 executing 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
v_row_r           = p_rowr
v_row_l           = p_rowl
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'
* IMPORTING
*   E_RESULT             =
EXCEPTIONS
usage_error    = 1
system_error   = 2
internal_error = 3
OTHERS         = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

We should test it. To keep the left side table inside the principal page, we give a lower number to choose on the determination screen. Whilright-handt hand side table we pull more columns to drive it to spill over to the following page.

The main page looks great. The left hand side quits developing while the right hand side develops to next page.

However, look, on the following page the right hand side has been moved to the left side. This isn’t the very thing that our end clients need. The Purch Doc segment ought to be lined up with the section from the principal page.

Where did it go wrong? Allow us to check the design and settings once more.

We have set the Subform Content as Streamed for Detail, LeftHandSide (LHS), RHS and all SubForms are Streamed. In any case, the design in the subsequent page is moved to left. We attempted to adjust the Stream Course Through and through to Western Text. Be that as it may, it didn’t help.

So we were constrained to attempt an alternate methodology. We will probably make a table with 1 line and 2 segments i.e it would have just 2 cells. Line 1 Segment 1 would have every one of the LHS subforms (2 tables mara and marc information) and Row1 Section 2 would have every one of the RHS subforms (1 table with ekpo information).

We want to wrap the two cells into subform and make them Streamed.

The following is a table with 2 cells and in every cell we would put subforms for our information.

Nested Table in SAP

We ought to get it going. Permit us first to make a Table with one Line and two Segments.

We have renamed the table to TwoColTables. Allow us to rename Cell1 to LHS and Cell2 to RHS.

Presently right snap on Cell1 and Enclose by SubForm. Wrap Cell2 to SubForm as well.

sap adobe

Subsequent to wrapping and renaming, it would look like beneath.

adobe forms

Erase the texts LHS and RHS.

Presently drag LHS from SubformToHold2SubForms above and put into this LHS in the Row1 of the table.

Comparatively drag RHS from SubformToHold2SubForms above and put into this RHS in the Row1 of the table.

On the other hand, you can make these subforms in the LHS and RHS cell new. Yet, we are sluggish and we need to utilize what we did before.

interactive Adobe

It ought to look like beneath.

adobe form tutorials

You want to have all the SubForms as Streamed expect the two Cells which were wrapped as SubForms. They should be Situated.

sub form

Positioned SubForm Cell 1 (LHS)

adobe form tutorials

Positioned SubForm Cell 2 (RHS)

This is the stunt of this post. All streamed aside from the two cells which must be Situated. The two cells Content must be set as Situated in light of the fact that you would rather not permit the cells to move around openly. The width (and beginning x,y organizes) of the cells are fixed to the position you set. So when any one cell spills over to the following page, it actually is on a similar arrangement as at the main page.

How about we test now. Run the Print Program

Your table currently is streaming accurately. In the event that your left side table or right side table don’t begin from a similar level of the page or position (Y Coordinate), then, at that point, you should make them 0, 0 in the Design or some other worth you need. So both the tables start from a similar position and stream down.

I trust you found this tutorial helpful. The issue of printing two tables adjacent to each other is quite common, and the solution is also relatively straightforward. For a detailed guide on SAP Adobe Form Tutorial Part XIII How to Print two Tables Adjacent to each other,” stay tuned as we explore this topic further.

YOU MAY BE INTERESTED IN

Unleashing the Power of Search Help Exit in SAP ABAP

Introduction to SAP UI5 Development: Your Comprehensive Guide

SAP ABAP Online Training: Advanced Business Application

SAP Adobe Form Tutorial Part XIIHow to Convert Smartform to Adobe Form?

SAP

SAP Adobe Form Tutorial Part XIIHow to Convert Smartform to Adobe Form?

One fine morning, your business comes to you and pleasantly suggests, “Adobe Forms are cool. We should convert our Smartforms to Adobe.” You might be unsure how to respond. Indeed, converting existing Smartforms to Adobe Forms could require significant time and effort. In SAP Adobe Form Tutorial Part XII How to Convert Smartform to Adobe Form?, we will guide you through the process of making this transition smoothly. We recommend giving it a go and exploring the benefits of Adobe Forms!

SAP has forever been ground-breaking and in reverse viable. In a similar line of reasoning, they have given a choice to switch Smartforms over completely to Adobe for certain snaps. Allow us to check. How?

Allow us first to create a basic Smartform.

Exchange: SMARTFORMS

Press the Create button

smartform to adobe form

Add a Boundary in Structure Connection point

IT_VBAK TYPE VBAK_T
sap smartform trick

Add one more boundary in Worldwide Definitions

Make text under Fundamental Window in %PAGE1

WA_VBAK TYPE VBAK

Make a table under Fundamental Window

Double tap on %TABLE1

Go to the Information Tab and keep up with the Interior Table (IT_VBAK) and Work Area (WA_VBAK) Subtles.

smartform to adobe form

Then, at that point, Go to Table Tab, and change line type to 2 sections.

sap smartform tutorial

Right Click on Header -> Create -> Table Line

sap smartform tutorial

Select Line Type  %LTYPE1

Keep up with the Header in 2 cells by making the Messages

Right Snap on Principal Region – > Make – > Table Line

Select Line Type %LTYPE1

Keep up with the 2 factors by under the Cells Deals request (VBELN) And Deals Association (VKORG)

variables in smartforms

Check, Save, Initiate.

We are finished with making the Smartform.

Can we test now?

Yes. For this situation, we are not utilizing any driver programs. We will test remain solitary.

From the smartform screen, press the Execute (F8) button. Again, you press the Execute (F8) button. All things considered, smartform is saved as a capability module in SAP.

Testing smartform online

Enter a few information into IT_VBAK table

Press on Supplement Information button.

Then press the Execute button, select some neighborhood printer, and press Print Review.

You see a basic smartform yield.

Go to SMARTFORMS Exchange. Give your smartform name.

Go to Utilities -> Migration -> Interactive Form -> Export

adobe form

Enter the necessary Adobe Structure name and press Enter.

Enter.

Select all the necessary really look at boxes

Enter. Save as a Nearby Item ($TMP) or in transport on the off chance that you have.

Presently Go to Exchange SFP

Initiate the Connection point.

Return.

Give the Adobe Structure name YRAM_ADOBE_FORM and press the Change button.

Go to Properties Change the Format type to Standard Layout

Go to Setting. Check a setting in Adobe Setting region is now replicated.

Go to Design and see the format that is duplicated from Smartform.

adobe copied from smartform

Check, Save, and Enact.

Presently, we can test the Adobe frame? Indeed, physically once more!!

Enter the information into IT_VBAK

.

You have just switched a Smartform over to a rich Adobe Form. I trust you find this process valuable. For more detailed instructions, refer to SAP Adobe Form Tutorial Part XII How to Convert Smartform to Adobe Form? where we cover the steps and best practices for this conversion.

YOU MAY LIKE THIS

SAP ABAP on HANA Interview Questions: Mastering the Essentials

Steampunk Chronicles: Navigating the Cloud with SAP BTP ABAP Environment

(RPA) Robotic Process Automation Tools: A Comprehensive Guide

SAP

SAP Adobe Form Tutorial. Part XI. Configuring Adobe Forms in NACE, OPK8 and SPROInteractiveSAP Adobe Form Tutorial. Part XI. Configuring Adobe Forms in NACE, OPK8 and SPRO

How to configure the Adobe Forms in SAP?

After more than 10 articles on SAP Adobe Form, we had to make room for this basic topic. Configuring Adobe Forms overlaps with the steps done in Smartforms and SAPScripts. But, still, we thought it would be helpful if we dedicated a short article to cover the concept here. 

On a high level, we need to configure the forms in t-codes NACEOPK8, and SPRO based on the modules you are working for.

  1. NACE

Go to Transaction code NACE. You would find the list of all the applications in SAP.

NACE configuration

Select the application area where you wanted to configure your Adobe Form and the Driver Program.

For example select V1 for Sales and press on Output types.

nace output types

Here you can find all the output types which are related to Sales.

adobe form configuration

Select the relevant output type and press on processing routines.

output type and processing routines

Go to change mode and add your Adobe Form name beside to PDF/Smartform Form. Do not forget to change the Form type to “PDF”.

to PDF/Smartform Form

Save the change.

OPK8

If you want to configure PP or PM module related forms you need to do it in the OPK8 transaction.

Go to Transaction OPK8.

PP or PM module related forms

Select one of the Output Types and press on Forms.

Output Types in SAP

Here you can Configure your Adobe Form.

Adobe Form in OPK8

Hit Save. You are done with the process of Configuring the Adobe Form in OPK8 Transaction.

SPRO

You can configure the QM (Quality Management) Forms in SPRO Setting. Go to transaction SPRO

  1. Press button “SAP Reference IMG”.

Navigate list as follows

  • SAP Customizing Implementation Guide
    • Quality Management
    • Quality Notifications
    • Notification Processing
    • Print control
    • Define Shop Papers, Forms, Print Programs
2. SAP Customizing Implementation Guide

Double click on Define shop papers.

SAP Reference IMG

Enter any application area.

Define shop papers

Hit Enter. You can configure under the Name of the PDF-Based From.

You just completed the SPRO Configuration of Adobe Forms for Quality Management area.

YOU MAY LIKE THIS

SAP ABAP Checkpoint Group – Chase the Mysterious SAP Issues with a Smile

Best Practices for SAP ABAP Development: A Comprehensive Guide

4 Useful Tips on ABAP and ABAP on HANA

SAP

SAP Adobe Form Tutorial Part X Alternative in Adobe Forms

Uncertainties and “buts” are an integral part of life, and Adobe Forms are no exception. You often encounter real-life scenarios where printing depends on specific conditions. In such cases, SAP Adobe Form Tutorial Part X Alternative in Adobe Forms explores a feature called “Alternative” that allows you to print data conditionally based on the requirements.

Transaction Code: SFP.

Enter the connection point name and make (the connection point is compulsory for Adobe structure).

Adobe Form Tutorial

Enter the necessary short portrayal and save.

Adobe Form Tutorial

Enter the bundle name and save.

Allow us to add our own custom boundary name. Select the Import choice under the Structure Connection point (left side) and press the Make button (right side) to add a bringing-in boundary.

Adobe Form Tutorial

FLAG is for alternative. TEXT1 and TEXT2 are for printing the texts.

Save, Check, and Actuate the Connection Point.

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

Adobe Form Tutorial

Press the make button. Give the short portrayal and connection point name that you have made before.

Adobe Form Tutorial

Enter the bundle name and save.

Drag Banner, TEXT1, and TEXT2 from Point of Interaction to Setting.

Adobe Form Tutorial

Go to setting. Right-click on the YRAM_ADOBE_FORM10 under the unique circumstance and make an alternative.

Adobe Form Tutorial

Alternative:

Alternative is the option that we use for conditional printing with TRUE / FALSE option.

When it is TRUE, it will print the details, which are specified under TRUE and vice versa.

Adobe Form Tutorial

Simplified the TEXT1 under the Genuine Condition and the TEXT2 to Bogus Condition.

Adobe Form Tutorial

Make a condition for elective. Press on Alternative Conditions button.

Add a condition:  FLAG = ‘X’

Adobe Form Tutorial

That’s what it intends – when you pass ‘X’ it is Valid, when Space it is Misleading.

Go to Design. Simplified the TEXT1 and TEXT2 to the design.

Adobe Form Tutorial

Save and enact the structure.

Allow us to construct the Driver program

*&---------------------------------------------------------------------*
*======================================================================*
* YRAM_ADOBE_FORM_PROGRAM8 *
*======================================================================*
* Project : SAP Adobe Forms Tutorial                                   *
* Author : varad (www.elearningsolutions.co.in)                    *
* Description : Using Alternative in Adobe form                        *
*======================================================================*
REPORT yram_adobe_form_program10.

*======================================================================*
* Selection Screen
*======================================================================*
PARAMETERS : p_flag TYPE char1.
*======================================================================*
* Data Objects
*======================================================================*

DATA: gv_fm_name         TYPE rs38l_fnam, " FM Name
      gs_fp_docparams    TYPE sfpdocparams,
      gs_fp_outputparams TYPE sfpoutputparams,
      gv_text1           type char255,
      gv_text2           type char255.

*======================================================================*
* Constants
*======================================================================*
CONSTANTS : gv_form_name TYPE fpname VALUE 'YRAM_ADOBE_FORM10'.

 gv_text1 = 'Welcome to Adobe form tutorial'.
 gv_text2 = 'Welcome to SAP ABAP'.
*======================================================================*
* START of Calling the Form
*======================================================================*
*&---------------------------------------------------------------------*
**&&~~ 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
 EXPORTING
   /1BCDWB/DOCPARAMS        = gs_fp_docparams
   FLAG                     = p_flag
   TEXT1                    = gv_text1
   TEXT2                    = gv_text2
* IMPORTING
*   /1BCDWB/FORMOUTPUT       =
 EXCEPTIONS
   USAGE_ERROR              = 1
   SYSTEM_ERROR             = 2
   INTERNAL_ERROR           = 3
   OTHERS                   = 4
          .
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.

Allow us to execute this structure and see the result.

Test 1 :  Execute program YRAM_ADOBE_FORM_PROGRAM10 to test TRUE Alternative.

Adobe Form Tutorial

Pass ‘X’

Execute. Press on Print see

Test 2 :  Execute program YRAM_ADOBE_FORM_PROGRAM10 to test FALSE Alternative

Pass no worth.

Execute. Press on Print see.

Trust this post was clear enough for you to comprehend. A legitimate showcase is something which we really want in each elective structures. It tends to be taken care of in more than one way however when SAP has given a shrewd Elective why not use it.

We put a lot of effort into conceptualizing, testing, and writing each article. If you could share this link with at least 5 colleagues or friends who might benefit from our post, it would be a great support to our team. We believe our articles, including “SAP Adobe Form Tutorial Part X Alternative in Adobe Forms,” should reach as many audiences as possible so that everyone can benefit and our team remains motivated, ensuring our work does not get lost in the vast expanse of the web.

Thank you kindly for visiting. Kindly leave your remarks/praises, great and no so great so we can continue to improve and giving you quality stuff.

YOU MAY BE INTERESTED IN

Your Definitive Guide to Becoming a SAP ABAP Developer

Understanding the Depth of SAP Audits: A Comprehensive Guide

10 Real-World SAP ABAP Programming Examples (with Code!)

SAP

SAP Adobe Interactive Form Tutorial Part IX Displaying Dynamic Text in Adobe Forms

We have previously learned how to display Text Modules t-code Smartforms and Include Texts (t-code SO10) in SAP Adobe Forms. While working with text types, we encounter three options in the drop-down menu. Today, in SAP Adobe Interactive Form Tutorial Part IX Displaying Dynamic Text in Adobe Forms,” we will focus on the third text type, Dynamic Text. Depending on your business needs and scenarios, you can decide which text type to use.

Transaction Code: SFP.

The Point of interaction name and Make (Point of interaction is compulsory for Adobe structure).

Enter the necessary short portrayal and Save.

Enter the Bundle name and Save.

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.

TSFTEXT is the Table Type can be used to display the dynamic text in Adobe form.

TLINE is the structure included in Table type TSFTEXT.

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.

Save, Check and Initiate the Point of interaction.

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

Press on create button. Provide the short description and Interface name which you have created earlier.

Enter the Package name and Save.

Drag IT_TSFTEXT Table from Interface to Context

Go to Context. Right click on the YRAM_ADOBE_FORM9 under the context and create a text

Select the Text Type drop down.

You can see 3 choices:

  1. Text Module
  2. Include text
  3. Dynamic text

Right snap on the YRAM_ADOBE_FORM9 under the unique circumstance and make a message. Select the TEXT and double tap. Change the text type to Dynamic text and Enter. Enter the subtleties like beneath

Field = IT_TSFTEXT 

Save and go to Design. Embed a Text and increment the size according to your prerequisite.

Map your TEXT to drifting field {TextField}.

Save and actuate the structure.

Allow us to execute this Structure and see the result. Press on Test Button (F8).

Enter the text in to IT_TSFTEXT.

Press on Insert  data  button.

Execute. Press on Print Review.

Thank you very much for your time! I hope you found this guide helpful. For a deeper dive into working with Adobe Forms, check out SAP Adobe Interactive Form Tutorial Part IX Displaying Dynamic Text in Adobe Forms

YOU MAY BE INTERESTED IN

How to check your custom ABAP code for SAP BTP ABAP Environment

Understanding the Role of an SAP Application Support Specialist

SAP

SAP Adobe Interactive Form Tutorial Part VIII

Today, we will explore another relative of the Text Module, i.e., Include Text. I like to refer to this Include Text as Standard Texts, which can be created and saved using transaction SO10. In SAP Adobe Interactive Form Tutorial Part VIII Displaying Include Texts in Adobe forms, we will dive into how to efficiently use these texts in your Adobe forms.

Allow us to make the Structure Connection point utilizing Exchange Code SFP. Enter the Connection point name and Make (Connection point is required for Adobe structure).

SO10

Enter the required short description and Save.

SO10 transaction

Click the Package name and Save.

SAP ABAP Training


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

Free Adobe Training
IV_LANGU TYPE SY-LANGU

Save, Check and Enact the Connection point.

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

Press on make button. Give the short depiction and Connection point name which you have made before.

Enter the Bundle name and Save.

Drag IV_LANG Field from Connection point to Setting

Go to setting. Right snap on the YRAM_ADOBE_FORM6 under the specific circumstance and make a Message.

Select the drop down. You can see 3 choices:

1. Text Module
2. Include text
3. Dynamic text

We have proactively talked about Text Module in our past article. Today we will discuss include Text.
Incorporate Texts are only Standard Texts. Go to Exchange SO10 for Incorporate Text.

Create texts in required languages: English

Press on Make. Enter the necessary text in English and Save it.

Allow us to save some text in another dialect: German.

language translation

Press on Create. Enter the required text in German and Save it.

You can create in all available languages and use them.
Right snap on the YRAM_ADOBE_FORM8 under the specific circumstance and make a Message (or change the Message made previously)
Select the TEXT and double tap. Change the text type to include Text and hit Enter.

Enter the details like below
Name: TEXT_FROM_SO10
Text Name: ‘YRAM_TEXT1’
Text Language: IV_LANGU
No error if text not available = Check the box.

Save .
Go to Layout. Go to Data View Select TEXT_FROM_SO10, drag and drop to Layout.

Save and enact the structure.

Allow us to plan the Driver program for the above structure.

*&---------------------------------------------------------------------*
*======================================================================*
* YRAM_ADOBE_FORM_PROGRAM8 *
*======================================================================*
* Project : SAP Adobe Forms Tutorial *
* Author : Varad (www.elearningsolutions.co.in) *
* Description : Printing SO10 Text in Adobe form *
*======================================================================*
REPORT yram_adobe_form_program8.

*======================================================================*
* Selection Screen
*======================================================================*
PARAMETERS : p_langu TYPE sy-langu.
*======================================================================*
* Data Objects
*======================================================================*

DATA: gv_fm_name TYPE rs38l_fnam, " FM Name
gs_fp_docparams TYPE sfpdocparams,
gs_fp_outputparams TYPE sfpoutputparams.

*======================================================================*
* Constants
*======================================================================*
CONSTANTS : gv_form_name TYPE fpname VALUE 'YRAM_ADOBE_FORM8'.

*======================================================================*
* START of Calling the Form
*======================================================================*
*&---------------------------------------------------------------------*
**&&~~ 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
EXPORTING
/1bcdwb/docparams = gs_fp_docparams
iv_langu = p_langu
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
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.

In the event that your client has roll outs in two unique nations with two distinct dialects. In light of the sign on language of the SAP framework, the structure ought to print the result in that language. Incorporate/Standard Text helps in such interpretations.

The IV_LANGU field of the structure ought to preferably be populated progressively in genuine undertakings. However, for our test, we would include them as our choice screen boundary.

Test 1 :
Run the Program : YRAM_ADOBE_FORM_PROGRAM8
Enter the Language as ‘EN’.

Press on Print preview

Test 2 :
Run the Program : YRAM_ADOBE_FORM_PROGRAM8
Enter the Language as ‘DE’.

Press on Print preview

Thank you very much for your time! I hope you found this SAP Adobe Interactive Form Tutorial Part VIII Displaying Include Texts in Adobe forms helpful and informative.

YOU MAY BE INTERESTED IN

ABAP Units – Test a Little, Implement a Little, Reflect a Little

Application Development Life Cycle in Cloud Computing: A Comprehensive Guide

A to Z of OLE Excel in ABAP 7.

SAP Adobe Interactive Form Tutorial Part VII Printing Address in Adobe Form

SAP

SAP Adobe Interactive Form Tutorial Part VII Printing Address in Adobe Form

One of our readers left us a question: “I was expecting and am still looking for a way to add an address—customer/vendor—to the Adobe Form using the ADRNR number, similar to how SMARTFORMS handled this. I thought it was managed very well in SMARTFORMS with all the options like country code, postal code, etc. Isn’t there a way to handle this in the Adobe tool as well?” In SAP Adobe Interactive Form Tutorial Part VII Printing Address in Adobe Form,” we will explore how to achieve this in the Adobe tool with similar flexibility.

Our Response: Adobe Structure should be a move up to what we as of now have in SMARTFORMS. Consequently it requirements to acquire the elements of SMARTFORMS. Indeed, Adobe is adequately shrewd to deal with it and we would show you precisely the way that it tends to be accomplished.

Transaction Code: SFP.
Enter the Interface name and Create (Interface is mandatory for Adobe form).

Address in Adobe

Click the short portrayal and Save.

Adobe in SAP

Enter the Bundle name and Save.

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

IV_ADDRESS_TYPE TYPE CHAR1
IV_ADDRNUMBER   TYPE AD_ADDRNUM
IV_PERSNUMBER   TYPE AD_PERSNUM
IV_LAND1        TYPE LAND1

Save, Check and Activate the Interface.

Go to back SFP Exchange primary screen. Make the Form.

Press on make button. Give the short portrayal and Connection point name which you have made before.

Enter the Bundle name and Save. Go to Context.

Right snap on the YRAM_ADOBE_FORM7 under the Unique circumstance and make an “Address“.

Double Click on Address and enter the below details.

Save. Go to Layout.

Go to Data View. Drag and Drop the ADDRESS Context.

Increment/Change the size of the Location to account for different lines and eliminate the subtitle.

Save and Activate.

Now, let us go and create the Driver Program.

*&---------------------------------------------------------------------*
*======================================================================*
* YRAM_ADOBE_FORM_PROGRAM7 *
*======================================================================*
* Project : SAP Adobe Forms Tutorial *
* Author : Varad (www.elearningsolutions.co.in) *
* Description : Printing the Address in Adobe form *
*======================================================================*
REPORT yram_adobe_form_program7.

*======================================================================*
* Selection Screen
*======================================================================*
PARAMETERS :
p_atype TYPE char1,
p_adrnr TYPE ad_addrnum,
p_pernr TYPE ad_persnum,
p_land1 TYPE land1.

*======================================================================*
* Data Objects
*======================================================================*

DATA: gv_fm_name TYPE rs38l_fnam, " FM Name
gs_fp_docparams TYPE sfpdocparams,
gs_fp_outputparams TYPE sfpoutputparams.

*======================================================================*
* Constants
*======================================================================*
CONSTANTS : gv_form_name TYPE fpname VALUE 'YRAM_ADOBE_FORM7'.

*======================================================================*
* START of Calling the Form
*======================================================================*
*&---------------------------------------------------------------------*
**&&~~ 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 executing 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/SM00000204'
EXPORTING
/1bcdwb/docparams = gs_fp_docparams
iv_address_type = P_atype
iv_addrnumber = p_adrnr
iv_persnumber = p_pernr
iv_land1 = p_land1
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
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.

Allow us to test this Adobe improvement to check our Location populated utilizing simply the Location Number.Run Program : YRAM_ADOBE_FORM_PROGRAM7.


Press on Print Preview. Please design your Form better than this. 

This is the confirmation from ADRC (Address) table.

The Location is printed accurately.

I trust that next time you need to print an address in your Adobe form, you’ll know exactly what to do after following the SAP Adobe Interactive Form Tutorial Part VII: Printing Address in Adobe Form. This guide will help streamline the process for you.

YOU MAY BE INTERESTED IN

Best Practices for SAP ABAP Development: A Comprehensive Guide

ABAP Applications for the Cloud: Modernizing for the Future

Future of ABAP on Cloud

SAP Adobe Interactive Form Tutorial. Part IV

SAP

SAP Adobe Interactive Form Tutorial Part VI Displaying Text Module Texts in Adobe forms

Today, we will explore another frequently used feature of any printing technology (SAPScript, Smartform, and Adobe). Just like displaying the standard texts maintained in the SO10 t-code is a very common requirement in forms, displaying the texts maintained in the text modules in the SMARTFORMS t-code is another common business need. In this SAP Adobe Interactive Form Tutorial Part VI, Displaying Text Module Texts in Adobe Forms, we will walk you through how to achieve this efficiently.

Allow us to figure out how to show text modules in SAP Adobe Structures.

Transaction Code: SFP.
Enter the Interface name and Create (Interface is mandatory for Adobe form).

SAP Adobe Tutorial

Enter the expected short portrayal and Save. Click the Bundle name and Save.

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

Text Modules in SAP

IV_LANGU TYPE SY-LANGU
Save, Check and Activate the Interface.

Go to back SFP Transaction main screen. Create the Form.

ABAP Freshers

Press on make button. Give the short depiction and Connection point name which you have made before.

Enter the Bundle name and Save.

Drag IV_LANG Field from Interface to Context.

Go to context
Right click on the YRAM_ADOBE_FORM6 under the Context and create a Text.

context and create a text

Select the drop down.

Text Module

You can see 3 options:
1. Text Module
2. Include Text
3. Dynamic Text

Text Module: Text modules can be made in exchange SMARTFORMS.

Go to Transaction: SMARTFORMS.

Smartforms and SAP Adobe

Press On Make and enter the necessary text – you can utilize existing text modules moreover.

Save in a Bundle. Back. Return to your SFP Context.
Select the TEXT and double tap.
Change the Text Type to Text Module and hit Enter.
Enter the subtleties like underneath:
           Name: TEXT_FROM_TEXT_MODULE
           Text Name: ‘YRAM_TEXTMODULE’
           Text Language: IV_LANGU
           No error if text not available = Check the box.

Save.

Go to design. Simplified the “TEXT_FROM_THE_TEXT_MODULE” Field to the Layout.

Increment the size of the showcase field according to your prerequisite. Do we have to likewise say, you can change the Subtitle ‘TEXT_FROM_TEXT_MODULE’ too? We are getting apathetic today. We will keep it all things considered.

Check, Save and Activate.

You can approve the result, by executing the Structure independent. However, preferably, it ought to be tried from a driver program. Kindly check the driver program from past articles in the series. We have not composed it for you this time. Treat it as a hand-on home work for you.

Execute

Press on Print review. Whatever was saved in the Text Module is printed.

I trust this information helps you in some real-world projects. Hardcoding data that can change is not a good approach in any printing method. That’s why Text Modules and Standard Texts hold their own importance. In SAP Adobe Interactive Form Tutorial Part VI Displaying Text Module Texts in Adobe forms,” we will explore how to effectively display text modules in Adobe forms, ensuring flexibility and reducing the need for hardcoded values.

YOU MAY BE INTERESTED IN

ABAP Applications for the Cloud: Modernizing for the Future

ABAP Evolution: From Monolithic Masterpieces to Agile Architects

ABAP Development Environment in the Cloud

SAP Adobe Interactive Form Tutorial. Part I.

SAP

SAP Adobe Interactive Form Tutorial Part V Images Graphics and Logo in Adobe Forms

oday, we will learn how to incorporate a logo into an Adobe Form output in “SAP Adobe Interactive Form Tutorial Part V: Images, Graphics, and Logo in Adobe Forms.”

Pre-requisite: We need to upload the required logo or image as shown below in T-code SE78, similar to the process we follow for Smartforms.

When you transfer the image to SAP from your PC or local machine, please remember to validate it in T-code SE78. This step ensures that the logo or image is properly stored in the SAP system. For more detailed steps, you can refer to SAP Form Tutorial Part V: Images, Graphics, and Logo in Adobe Forms to understand how to work with images and graphics in Adobe Forms.

Prepare the Form Interface

Transaction Code: SFP. Enter the interface name and create (interface is mandatory for Adobe Form). In this SAP Adobe Interactive Form Tutorial Part V: Images, Graphics, and Logo in Adobe Forms, we will explore how to incorporate visual elements such as images, graphics, and logos into your Adobe Forms to enhance the user experience and provide a polished look to your outputs.

SAP Adobe Form Tutorial

Enter the short description and Save.

SAP ABAP Training

Enter the Package name and Save.

Free SAP ABAP Training

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

se78

Please note: IV_LOGO is of type XSTRING (Data Type).
Save, Check and Enact the Connection point.

Design the Form Layout
Go to back SFP Exchange principal screen. Make the structure.

What is SAP Adobe Form?

Press on make button. Give the short depiction and point of interaction name that you have made before.

SAP Training

Enter the bundle name and save.
Drag IV_LOGO from the point of interaction that we made before and drop them to the setting region.

Logo in SAPScript

Right-click on the YRAM_ADOBE_FORM5 under the specific circumstance and create a graphic.

create a graphic
Printing in SAP


Important step: Change the Graphic type from Graphic Reference to Graphic content

Configure Adobe Forms in SAP

Hit return key/enter key.

Select Yes option.

Enter Field as IV_LOGO (or whatever name you have given above)
And MIME Type as ‘IMAGE/BMP’.

Save.

Go to Design. Pick the Information View Tab. Simplified the Realistic on the design.

You can expand or accumulate your logo as per your need. You ought to dispense with the logo engraving for instance the default Picture Field text. This Image Field text is a respectable spot to make the motto out of the association/logo if you have any. Else we can leave it clear.

We have added one more text component beneath the logo for showing reason.

Check, Save and Actuate. Our Design with a Realistic and Structure Point of interaction is finished. Did you notice, we have two components in our format. The logo field and the realistic substance. It tends to be contrasted with the variable name and the real satisfied.

Driver Program to call the Adobe Form
You can use the below code as a reference to plug and play for printing the logo.

*&---------------------------------------------------------------------*
*======================================================================*
* YRAM_ADOBE_FORM_PROGRAM5 *
*======================================================================*
* Project : SAP Adobe Forms Tutorial *
* Author : Varad (www.elearningsolutions.co.in) *
* Description : Printing a logo in the adobe form *
*======================================================================*
REPORT yram_adobe_form_program5.

*======================================================================*
* Selection Screen
*======================================================================*
PARAMETERS : p_logo TYPE rstxt-tdname.
*======================================================================*
* Data Objects
*======================================================================*

DATA: gv_fm_name TYPE rs38l_fnam, " FM Name
gs_fp_docparams TYPE sfpdocparams,
gs_fp_outputparams TYPE sfpoutputparams,
gv_name TYPE tdobname,
gv_logo TYPE xstring ,
gv_bmp TYPE xstring.
*======================================================================*
* Constants
*======================================================================*
CONSTANTS : gc_btype TYPE tdbtype VALUE 'BCOL',
gc_id TYPE tdidgr VALUE 'BMAP',
gc_object TYPE tdobjectgr VALUE 'GRAPHICS',
gv_form_name TYPE fpname VALUE 'YRAM_ADOBE_FORM5'.

*======================================================================*
* START of Calling the Form
*======================================================================*
*&---------------------------------------------------------------------*
**&&~~ 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.

*  Passing the logo name
gv_name = p_logo.

*  Get the image/logo graphic information
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = gc_object " GRAPHICS
p_name = gv_name " Name of the Logo
p_id = gc_id " BMAP
p_btype = gc_btype " BCOL for color, 'BMON' for Black & White
RECEIVING
p_bmp = gv_bmp
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.

gv_logo = gv_bmp.

*&---------------------------------------------------------------------*
**&&~~ 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
EXPORTING
/1bcdwb/docparams = gs_fp_docparams
* iv_name = p_name
* iv_flag = p_flag
iv_logo = gv_logo
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
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.

Let us Test our baby 
Execute Program : YRAM_ADOBE_FORM_PROGRAM5

Give the picture/logo name which we transferred in SE78 or some other logo name which is now accessible in SAP framework. We would use ELS Logo.

If it’s not too much trouble, actually take a look at the program above. The logo property is powerfully acquired from the picture name and took care of to the SAP Adobe Structure. You can include any picture you need from your SAP Adobe Interactive framework. The program would deal with it consequently to acquire the mark of the picture and pass it accurately to the Adobe Structure.

Press on Print see and view the result with your picture.

YOU MAY BE INTERESTED IN

ABAP Development Environment in the Cloud

SAP ABAP on HANA

SAP PO Orchestra Optimizing for future

SAP

SAP Adobe Interactive Form Tutorial. Part IV

Adobe Form Based on Conditions

SAP ABAP SAP UI5 SAP HANA SAP FIORI
As of now, we have learned the basics of SAP Adobe Forms. We learned how to create our first Adobe layout and trigger it from the Driver program, played with static and dynamic tables. We also made our hands dirty dealing with Date, Time and Floating Fields. always believe in presenting the small tweaks and tips which are useful in real project scenarios. In the same line of our thought process, let us start another really useful feature of Adobe forms which every Adobe Programmer should know.

Conditions (IF-ENDIF, CASEs, WHILE etc) are an integral part of our programs and in fact any programming language. After all, everything is not in black and white. There would be exceptions and developers would be asked to handle those exceptions. For example, all employees of your client have to print the time zone as GMT – 6 in the form signature they print from their office. So, 98% of your clients would use GMT – 6 hours as their time but there would be 2 % users who live in another state and they use time as GMT – 7 hours. So for those particular users, you need to put special logic so that their signature would show GMT – 7. Here you have to handle the conditions and print the values according to the conditions.

For demonstration purpose:
Say, in your driver program you have identified the employee’s time zone and you have set the flag v_regular_employee = ‘X’ or blank depending where they work from.

PS: There might be many ways to achieve the above scenario. We have kept it simple for the sake of clarity.

I think, we have provided enough teaser for our today’s tutorial. Let’s watch the full movie now.

We assume that you have been following our series step by step. That is the reason we have specified the Part number in each tutorial title so that you can study and learn systematically, part by part. If you are a novice in the field of Adobe forms and you have not checked our earlier series, we would suggest you pause here. Go back to our earlier tutorials and refresh your Adobe skills. At least know the t-codes and Form, Interface, Context and Driver program concepts.

Transaction Code: SFP.

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

Enter the short description and Save.

sap adobe form for beginners

Enter the Package name and Save.

Step by Step tutorial on SAP Adobe Form

Let us add our own custom Parameter Name. Select the Import option under Form Interface (left side) and press the Create button (right side) to add an Importing Parameter.

Tutorial on SAP Adobe Form

IV_NAME is of type NAME1 (Data Element). IV_FLAG is of type CHAR1. Save, Check and Activate the Interface.

Go to back SFP Transaction main screen. Create the form.

Adobe Forms for Beginners

Press on create button
Provide the short description and Interface name which you have created earlier.

Step by step to Adobe Form

Enter the Package name and Save.

Drag IV_NAME and IV_FLAG from Interface which we created earlier and drop them to the Context area.

drag from interface to layout

Go to Layout

Go to Data View and Drag and drop the field IV_NAME.

Select the field IV_NAME and go to Palettes->Script Editor.

You will see below screen.

Javascript in SAP Adobe Form

Go to Show option and select form: ready from the drop down list.

Javascript in SAP ABAP

Here you will get a chance to write Javascript or Form Calc Code.

We will go with Javascript for now. Lucky ABAPer!!

if($record.IV_FLAG.value != “X”)
{
this.presence = “hidden”;
}

Check, Save and Activate.


Adobe Form example with Javascript

Case 1 : When IV_FLAG = ‘X’.

Execute the Form or Press F8 which is at the top of your screen. Enter values against IV_NAME and IV_FLAG.

stand alone test of Adobe Form

Press F8. Press on Print Preview button.

How to use Javascript in Adobe Form
Since the script to hide the elements did not get triggered as we passed IV_FLAG = X. Therefore the elements are not hidden in the output.

Case 2 : When IV_FLAG = ‘ ’.


Press F8. Enter values against IV_NAME and pass blank value to IV_FLAG.

Press F8. Press on Print Preview button.

This time the Javascript code gets triggered to hide the element. So the Output is a blank page this time.

You can call the above Form from driver program and get the same output. Please check the below-working code.

Selection Screen of the Program:

Try this short hands on Adobe Form and Driver program in your system and have fun.

&———————————————————————
======================================================================

  • YRAM_ADOBE_FORM_PROGRAM4 *
    ======================================================================
  • Project : SAP Adobe Forms Tutorial *
  • author name: Varad (www.elearningsolutions.co.in)
  • Description : Dynamically Hiding & Displaying a field on the Adobe Form
  • Layout based on Condition *
    ======================================================================
    REPORT yram_adobe_form_program4.

======================================================================

  • Selection Screen
    ======================================================================
    PARAMETERS: p_name TYPE name1,
    p_flag TYPE char1.

**&&~~ Data Objects
DATA: gv_fm_name TYPE rs38l_fnam, ” FM Name
gs_fp_docparams TYPE sfpdocparams,
gs_fp_outputparams TYPE sfpoutputparams.

CONSTANTS : gv_form_name TYPE fpname VALUE ‘YRAM_ADOBE_FORM4’.

======================================================================

  • START of Calling the Form
    ======================================================================
    &———————————————————————
    **&& 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
    EXPORTING
    /1bcdwb/docparams = gs_fp_docparams
    iv_name = p_name
    iv_flag = p_flag
    EXCEPTIONS
    usage_error = 1
    system_error = 2
    internal_error = 3
    OTHERS = 4.
    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.

YOU MAY LIKE THIS

SAP ABAP Checkpoint Group – Chase the Mysterious SAP Issues with a Smile

Best Practices for SAP ABAP Development: A Comprehensive Guide

4 Useful Tips on ABAP and ABAP on HANA

× How can I help you?