Interactive Adobe Part 17 How to Execute URL Dynamically by Button Click Event?

Many times, we encounter business requirements where we need to have editable fields or buttons/checkboxes in the Adobe form that users can click to execute a desired action. In some cases, we also need to interact with SAP by performing actions through interactive forms. In Interactive Adobe Part 17 How to Execute URL Dynamically by Button Click Event?, we will explore how to set up such functionality to dynamically execute URLs based on button click events in Adobe forms.

These sorts of business necessities can be satisfied utilizing IFBA (SAP Intelligent Structures By Adobe). Or on the other hand basically Intelligent Structure By Adobe.

IFBA can be utilized in 2 situations:

  • Offline
  • Online

Online situations are significantly utilized in Web Dynpro Applications where IFBA can be coordinated as UI component of web dynpro part.

Offline situations can be perceived as IFBA utilizing email connection shipped off a client, client opens the pdf connection, top off the information in the structure and submit it.

Prerequisites:

  1. Most significant essential is to empower intelligent highlights on Promotions. Of course, printed Adobe structures can be made and worked upon however for IFBA, Adobe peruser privileges qualifications ought to be designed on Promotions. These peruser privileges would be given in “.pfx” document by SAP itself. If it’s not too much trouble, go through the accompanying SAP Notes and solicitation your Premise group for this arrangement:

 

How to test configuration of SAP ADS?

You can continuously check in the event that Adobe peruser freedoms qualifications are designed accurately by executing a test report given by SAP: FP_TEST_IA_01.

In the event that adobe structure shows subsequent to executing above report, you can alter the structure and save then your SAP Adobe Advertisements setup is turned out totally great.

2. Knowledge of creating Adobe forms and scripting.

3. Basic knowledge of ABAP.

Business requirement:

In Receipt Structure, a button for installment connect page ought to be accessible so clients with substantial email locations can get the receipt on their letter box and can pay the due sum utilizing that button.

Solution:

We will make a basic Adobe Structure with some text fields and a button. In structure interface, we will make an import boundary IV_URL. From driver program, we can give the URL data and utilizing JavaScript, we can peruse this URL in Structure and dilemma to Fasten click activity.

Step 1 – Create an Adobe Form and the corresponding Interface

Make an Adobe structure ELS_DISPLAY_DYNAMIC_URL and interact with import boundary IV_URL as follow:

Step 2 – Design your form as per the requirement

For our case, we are making a straightforward text for guidelines and a button for installment as keep:

Now, we need to provide the URL which should be executed as soon as payment button is clicked.

On the off chance that we have a static URL (for example organization site), we don’t have to pass it from driver program/structure interface. We can straightforwardly deal with it in the Adobe Structure itself. Simply change the “Control Type” property of Button object to “Submit” and give the URL there.

Step 3 – Choose the Button Control Type as Submit

Select button “btn_payment” from Progressive system. Go to toolbar, select Ranges and select Article – > Control Type – > Submit.

Step 4 – Assign the URL to Button

Select “Submit” tab in Article palates and give the static URL:

Step 5 – Test the Button with URL Hyperlink

To test the usefulness, go to “Preview PDF” and click on Installment Button:

You can see the result as below:

That is very simple with practically no ABAP code and Java Content code. Yet, life isn’t that simple in genuine undertakings. Recollect our business necessity?

We need to pass this URL progressively from driver program. URL for each and every other client would be unique and not entirely set in stone at run-time. As such, the installment connect URL would be produced diversely for each request. So it’s a precarious part and indeed, Java Contents can assist us with accomplishing it.

JavaScripts Saves the Day for an ABAPer

Step 6 – Go to Script Editor of Adobe

Select button and go to prearrange supervisor

Step 7 – Write JavaScripts code on Click Event

We need to compose our content on “Snap” occasion of button. Select “Snap” occasion from accessible occasions drop down:

Did you take note? “Click” occasion is crippled and can’t be chosen for this installment button.

Reason: Since we chose Control Sort of button as “Submit”, framework would expect the activity statically and that is the reason “click” occasion is handicapped.

To empower it, we want to change the Control Sort of button as “Regular“.

Step 8 – Change the Button Control Type to Regular

Go to protest palates of installment button and select control type “Normal”.

Rehash stage 7 and attempt to choose “alter” occasion, it will be accessible this time.

Step 9 – Insert the JavaScript code

Select “click” occasion for button “btn_payment”, language as formcalc and run at client.

Compose the beneath JavaScript code in script manager:

var valueUrl = xfa.resolveNode("$record.IV_URL").value;
xfa.host.gotoURL(valueUrl);

We are finished with Structure advancement. Presently, one more precarious part is passing control boundaries for intelligent structures.

Step 10 – Call Adobe Form from Driver Program

Make a driver program and call all the Structure handling FMs with required control boundaries and produce the result.

Assuming that you see intently, there is NO intuitive element empowered on button and it wouldn’t permit tapping on button. What might be the issue then? We previously checked Promotions design in requirements segment and its turned out great.

Reason:

There is a banner in structure boundaries structure SFPDOCPARAMS called Usable.

As a matter of course it’s clear so adobe structures are shown as a print structure naturally.

Assuming that we maintain that structure should have intelligent elements, this banner ought to be set.

Step 11 – Set the FILLABLE Form Parameter to ‘X’

Set the structure boundary prior to calling Structure Capability Module as follow :

fp_docparams-fillable = 'X'.

CALL FUNCTION i_funcname
   EXPORTING
     /1bcdwb/docparams  = fp_docparams
     iv_url             = gv_url
   IMPORTING
     /1bcdwb/formoutput = fp_formoutput
   EXCEPTIONS
     usage_error        = 1
     system_error       = 2
     internal_error     = 3.

Step 12 – Re-test the driver program

Presently execute the driver program once more and actually take a look at the result.

In the event that you check the featured segment on button, you can see a cursor and button is enabled to be clicked. Here we proceed to get the admittance to URL which was passed from driver program:

This is a genuine task advancement. I have involved this choice in my task where we are sending solicitations with due sum to our advanced clients. For each receipt, installment presentation page URL is produced progressively so that when clients will tap on installment button, they simply have to enter their Charge card subtleties and installment will be caught against that receipt.

An example of the receipt with installment button shipped off clients is:

In my next blog, I will share a business scenario in Interactive Adobe Part 17 How to Execute URL Dynamically by Button Click Event? where end users can fill out details in an editable form and submit it to SAP database tables. Essentially, you will be performing an action in SAP from an Adobe form. Stay tuned to learn more about this process.

 

YOU MAY BE INTERESTED IN

SAP ABAP Salary in India

AI and Machine Learning in SAP: A Practical Guide

Performance Optimization in ABAP on HANA: Uniting CDS and AMDP

 

WhatsApp WhatsApp us