SAP Adobe Form Tutorial. Part X. Alternative in Adobe Forms


Ifs and Buts are part and parcel of life. So how can Adobe Form stay away from it? 🙂 You always have real case scenario where you need to print based on some condition. In Adobe forms when you want to print the data conditionally we use an option called Alternative.

Transaction Code: SFP.

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

Adobe Form Tutorial

Enter the required short description and Save.

Adobe Form Tutorial

Enter the Package name and Save.

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.

Adobe Form Tutorial

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

Save, Check and Activate the Interface.

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

Adobe Form Tutorial

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

Adobe Form Tutorial

Enter the Package name and Save.

Drag FLAG, TEXT1 and TEXT2 from Interface to Context.

Adobe Form Tutorial

Go to context. Right click on the YRAM_ADOBE_FORM10 under the context and create an Alternative.

Adobe Form Tutorial


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

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

Adobe Form Tutorial

Drag and Drop the TEXT1 under the TRUE Condition and TEXT2 to FALSE condition.

Adobe Form Tutorial

Create a condition for Alternative. Press on Alternative Conditions button.

Add a condition:  FLAG = ‘X’

Adobe Form Tutorial

It means that – when you pass ‘X’ it is TRUE, when Space it is FALSE.

Go to Layout. Drag and drop the TEXT1 And TEXT2 to the Layout.

Adobe Form Tutorial

Save and activate the form.

Let us build the Driver program

Let us execute this form and see the output.

Test 1 :  Execute program YRAM_ADOBE_FORM_PROGRAM10 to test TRUE Alternative.

Pass ‘X’Adobe Form Tutorial

Execute. Press on Print preview

Test 2 :  Execute program YRAM_ADOBE_FORM_PROGRAM10 to test FALSE Alternative

Don’t pass any value.

Execute. Press on Print preview.

Hope this post was clear enough for you to understand. A logical display is something which we need in every alternative forms. It can be handled in multiple ways but when SAP has provided a smart Alternative then why not use it.

We put a lot of effort in conceptualizing, testing and writing each and every article. If you could pass this link to at least 5 colleagues/friends who you think would benefit from our post, it would be a great favor to our team. We want our articles to reach to as many audiences as possible so that everyone would benefit and our team would remain motivated and our work does not get lost in this huge ocean of the internet.

Please, please share our post in your professional and social media and introduce your friends/colleagues/co-workers to our blog page.

Thank you very much for visiting. Please leave your comments/compliments, good and no so good so that we can keep on improving and providing you quality stuff.

Also, check our popular step by step tutorials on some of the important topics of SAP ABAP.

1. ABAP for SAP HANA Tutorials
2. ABAP Web Dynpro Tutorials
3. GOS Tutorial
4. OOPs ABAP Tutorial
5. HANA Tutorial
6. SAP Netweaver and OData Tutorial
7. SAP Adobe Form Tutorial
8. SAP Fiori Tutorial
9. SAPUI5 Tutorial
10. SAP Screen Personas Tutorials



  1. Hi Nice article. Please provide a tutorial for displaying elements in form layout using java script. some times java script will not work as expected. Please provide the regularly used java script and also errors mostly occured and how to resolve.
    Once again thanks for you Tutorial. 🙂

Leave a Reply to Raju Cancel reply

Please enter your comment!
Please enter your name here