SAP & Oracle partner and support companies

Loading

01
Quality Service
Sed perspe unde omnis natus sit voluptatem acc doloremue.
02
Expert Team
Sed perspe unde omnis natus sit voluptatem acc doloremue.
03
Excellent Support
Sed perspe unde omnis natus sit voluptatem acc doloremue.
04
Management
Sed perspe unde omnis natus sit voluptatem acc doloremue.
Advance ProtectAdvance ProtectAdvance Protect

Protecting your privacy Is
Our Priority

Amet consectur adipiscing elit sed eiusmod ex tempor incididunt labore dolore magna aliquaenim ad minim veniam.

What We’re OfferingWhat We’re OfferingWhat We’re Offering

Dealing in all Professional IT
Services

There are many variations of passages of available but majority have suffered alteration in some form, by humou or randomised words which don't look even slightly believable.

What’s HappeningWhat’s HappeningWhat’s Happening

Latest News & Articles from the
Posts

Amet consectur adipiscing elit sed eiusmod ex tempor incididunt labore dolore magna aliquaenim ad minim veniam.

SAP

Adobe Interactive Forms. Part 23. How to Hide the Fields and Acquired Space Dynamically using JavaScript in Adobe Form

PREQ: Should be aware of basics of Adobe Form.

Transaction code: SFP

Enter the interface name and click on create.

Enter the description and save it.

Create the custom importing parameters variables by clicking the import button on the left side and click on create button on right side and save and activate it. We have declared three parameters of same type of CHAR20.

Now go back to the main screen of SFP and choose the option Form and create it by adding the interface which we had created previously.

On the left side expand import section of interface and drag and drop all the importing variables IV_NAME1, IV_NAME2 and IV_NAME3 to context.

Let’s create the Layout of form which is available next to Context button.

Switch to design view and click on Hierarchy part. Select the content area of a form and click on object (right side) after that click on Subform and choose content type: Flowed

Now here we will design the form using Subform and wrap every object like text fields, text box, Buttons and tables etc. in it.

Here we will create 4 Subforms in content area.

Now select the Subform and inert the text fields and rename the default name of Text Fields to:

Name1, Name2 and Name3

 

Do the binding of all three text fields from the importing parameter variables (IV_NAME1, IV_NAME2 and IV_NAME3) by clicking on the the binding > Data Binding > choose the field

After the we will hide the field Name2 of subform2 using JavaScript. Select the subform2 and go to Palettes > Script Editor

You will get the below screen

Choose the event Initialize and language JavaScript and write the below code.

if( this.Name2.rawValue == null )

{              this.presence = ‘hidden’

}

We are hiding the field Name2 if its empty.

Always use the same field name (Name2) in script which is defined in the subform and it’s a case sensitive also otherwise it won’t work.

Check save and activate it.

Let’s test our form.

Case 1: Press F8 and pass all the importing values.

Press F8 and press on print preview.

Here script won’t hide Name2 as have passed the value in IV_NAME2. 

Case 2:  IV_NAME2 =   ‘ ‘.

Press F8 and don’t pass the value in IV_NAME2.

This time JavaScript code gets executed to hide the field Name2 and removed the space also.

If you see below fields has shifted to up and adjusted the space automatically. This is only possible if you wrap the fields in Subform. 

Hope you were able to get a fair idea about this interesting topic. If you have any doubts, queries or suggestions for us, please put your comments below. I will be happy to respond you.

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 Interactive Adobe Forms. Part 22. Handle Different Paper Size templates into single Adobe Form

SAP Adobe is still a niche area. With S/4HANA eventually almost all forms will be converted to Adobe. So, if you have not started learning SAP Adobe, it is high time you did it. Put this in your new year resolutions. 

This article presents an intriguing method for combining different paper sizes into a single format. While most other countries use A4 paper size, we have a legal need for US-based countries to use LETTER paper size in various roll-outs for different countries. In order to meet this need, we typically need to maintain multiple forms and design two distinct  templates, one for the US and one for the other countries.Having a single Global Form Template that works for  both A4 and letter sizes would be very beneficial.

SAP HANA ABAP Programming

Before we move forward with this tutorial, we have a quick announcement to make. A new batch of ABAP Programming on SAP HANA is commencing on 18th Jan 2020. If ABAP on HANA is in your kitty list, do take a look into the course content and enroll for the same.

Steps to create Template:

  • Create Adobe form with 2 master Pages – LetterMaster and A4Master
Hierarchy of Adobe Form with 2 master Pages
  • Set Paper Type of LetterMaster page as ‘LETTER’

Go to Object Palette->Select “Master page” tab->Select ‘paper type” as Letter

  • Set paper Type of A4Master page as ‘A4’.

Go to Object Palette->Select “Master page” tab->Select ‘paper type” as A4

  • Create 2 body pages – LetterDetails and A4Details and create a text field in each body page

If we try to generate output with this template, we would see 2 pages. But our business requirement is to show only one page – either Letter or A4.

How can we achieve it? A conditional flag can come to our rescue.

For that, we have to declare a flag containing identifier for both paper sizes and based on that flag, we have to hide/ display the relevant pages.

  • Declare an import parameter in Form interface as IV_PAPER_TYPE with type BOOLEAN.
  • In Driver program, we have to pass the value of the above flag as :

When LETTER is needed, set IV_PAPER_TYPE = ‘X’

When A4 is needed, set IV_PAPER_TYPE = ‘-‘

  • Drag and drop the import parameter From Interface to Form Context.
  • On LetterDetails Page, add the following Java script in INITIALIZATION event to hide the LetterDetails page based on flag value relevant to A4:
 if( $record.FLAGS_DYNAMIC_CONTENT.IV_PAPERTYPE_FLAG.value == "-" )
 {
 	this.presence = "hidden";
 }
  • On A4Details Page, add the following Java script in INITIALIZATION event to hide the A4Details page based on flag value relevant to LETTER :
  if( $record.FLAGS_DYNAMIC_CONTENT.IV_PAPERTYPE_FLAG.value == "X" )
 {
 	this.presence = "hidden";
 }

Here is the Main Trick

We need to link the Body pages with the respective Master pages so that when Form processing runs, Life Cycle Designer should trigger the correct page.

  • Set the pagination of LetterDetails page with LetterMaster page
Select required page from drop-down list in “Place”
  • Set the pagination of A4Details page with A4Master page
Select required page from drop-down list in “Place”

Testing :

Execute the driver program and set the Paper Size as LETTER

Execute the driver program and set the Paper Size as A4

I hope you’ll be able to apply this tip to your project at some point. This tip is useful if your organization operates globally using a single SAP system. It’s not necessary to make duplicate forms. All of your templates can be used with a single form. We used two templates in this example, but you can use more than two.

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

Adobe Forms. Part 21. Display Rich Texts from UI App on Adobe Forms

SAP One technology that merits greater recolonization than it currently receives is Adobe Form. You can use Adobe to accomplish any demand you can think of. The use of Adobe Forms’ Rich Texts Integration will be demonstrated in this article. To put it briefly, the Adobe Form should be dynamic in order to carry out one or more of the following tasks using texts:

  1. Can be hard coded in the form, 
  2. Can be maintained in a standard text in SAP and displayed in forms using include texts
  3. Maintain in a UI App with required formatting (Font type-Bold, Italic / different Headings / Bullet points/Numbering) and integrate on Adobe Form.

The first two are easy to understand. According to SAPYard, it is putting something that is not easily found online. Thus, we will focus on point 3.

Prerequisites:

  • Basic familiarity with Java scripts and Adobe forms.
  • fundamental understanding of SAPUI5 and Web Dynpro ABAP (to construct a FormattedText Editor).
  • comprehension of XSLT conversion.
  • strong ABAP knowledge.

Business requirement:

In output forms (AR Correspondences / FSCM Dunning Letters / Billing Invoices etc.), there are lot of text information which is customized based on company code or output types. Business would be interested to maintain these texts outside the Form with desired formatting so that in future, if any related texts need to be changed, business can maintain by themselves and would be updated in forms without doing any form enhancements.

Solution Design:

Implementation Steps:

Make a custom SAPUI5 or Web Dynpro application (you can choose) with the following buttons to  change and save the text in the database, formattedTextEdit UI element, and selection fields:

FormattedText Editor in WD ABAP

FormattedText Editor in SAPUI5

  • Create a Data Base table ZPB_TEXT_HTML which will save Formatted text as HTML as follow
  • Create XSLT transformation ZPB_TEST_FORMATTED_TEXT using  STRANS T-code and type “XSLT program”. Sample used is as follow:

Please note that ADS can’t identify normal HTML tags. ADS can only identify XHTML tags so we would need to transform the HTML tags into XHTML and that’s why XSLT transformation becomes very handy for these string replacement operation. You can also use regular expression and other ways to transform.

Bold tag in HTML from formatted text in UI          :        <strong> </strong>

Bold tag in XHTML identified by ADS : <b></b>

  • In transaction SFP, create the Adobe form interface ZPB_RICH_TEXT_INTERFACE.
  • For HTML documents, create global data:
  • Create an optional input parameter LS_HEADER which will contain input data from calling program.
  • In code initialization, perform following steps:
    1. Select HTML text from DB table.
    2. Get HTML text for header section and transform using XSLT transformation.
    3. Update transformed text into Global data for header text.

In transaction SFP, create Adobe Form ZPB_RICH_TEXT_FORM and pass the interface above. Import parameters and drag Interface Global data into Form Context. In Form layout, create a text field “txtHeader” in detail view and set it’s property as:

  • Since the text field may include many lines (entried from a UI application), we need surround it in a flowing subform and set its height to “Expand to fit” as seen below:
  • Since field format has been set to “Rich Text“, we need to write java script to bind the XHTML text. Select text field, go to script editor and select “initialize” event :
  • Create a test program to call the adobe form and generate PDFs:

Testing:

If you encounter similar requirements in your project, I hope this post will provide you with a basic understanding of how to address them. I wanted to offer the solution we used in our project, although there may be other options as well.

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?