Contributed by: Ram Daruru, Cibersites India Pvt Ltd., Bengaluru, India
In our SAP Adobe Form Tutorial Series, we have taken baby steps from creating our first Adobe Form, designing our first table, playing with dynamic floating variables, logos and printing address. Today, we would show another frequently used element of any printing technology (SAPScript, Smartform, and Adobe). Just like displaying the Standard Texts maintained in SO10 t-code is one of the very common requirements in any forms similarly the texts maintained in the Text Modules in t-code SMARTFORMS is another common business requirement.
Let us learn how to display Text Modules in SAP Adobe Forms.
Transaction Code: SFP.
Enter the Interface name and Create (Interface is mandatory for Adobe form).
Enter the required short description and Save. 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.
IV_LANGU TYPE SY-LANGU
Save, Check and Activate the Interface.
Go to back SFP Transaction main screen. Create the Form.
Press on create button. Provide the short description and Interface name which you have created earlier.
Enter the Package 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.
Select the drop down.
You can see 3 options:
1. Text Module
2. Include Text
3. Dynamic Text
Text Module: Text modules can be created in transaction SMARTFORMS.
Go to Transaction: SMARTFORMS.
Press On Create and enter the required text – you can use existing text modules also.
Save in a Package. Back. Go back to your SFP Context.
Select the TEXT and double click.
Change the Text Type to Text Module and hit Enter.
Enter the details like below:
Text Name: ‘YRAM_TEXTMODULE’
Text Language: IV_LANGU
No error if text not available = Check the box.
Go to layout. Drag and drop the “TEXT_FROM_THE_TEXT_MODULE” Field to the Layout.
Increase the size of the display field as per your requirement. Do we need to also say, you can change the Caption ‘TEXT_FROM_TEXT_MODULE’ as well? We are getting lazy today. We will keep it as it is.
Check, Save and Activate.
You can validate the output, by executing the Form standalone. But ideally, it should be tested from a driver program. Please check the driver program from previous articles in the series. We have not written it for you this time. Treat it as a hand-on home work for you. 🙂
Press on Print preview. Whatever was saved in the Text Module is printed.
Hope this information helps you in some real projects. Hardcoding information which can change is not a good approach in any printing technique. Therefore Text Modules and Standard Texts have their own importance.
If you GENUINELY like our articles then it would be a HUGE help if you subscribed and liked us on facebook. It might seem insignificant, but it helps more than you might think.
Thank you very much for your time!!
Useful Tutorials in SAPYard
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
About the author: Ram Daruru
Ram is a senior SAP Technical Consultant. He has more than 6 years of experience in SAP ABAP. He is also trained in SAP PI. Ram provides training in the area of SAP ABAP in various institutes in Bangalore and also takes Online sessions.
In his leisure, Ram likes to play billiards, play and follow cricket. He is also a vivid reader.
Find more about Ram Daruru at LinkedIn.