Text Types used in Smartforms
Hi All,
In this blog i would like to explain briefly on the different text types that are used in smarforms. We all use text element node to display data via smartforms. Have you ever seen the different options avaialable while creating the text elements in smartforms? Do you know the purpose of each?
Well in this blog i would like explain the different text types and make you familiar on this. Hope this gives a good idea to the beginners and others who seek knowledge on the same.
Introduction:
To start with there are four types of text types available, they are:
1) Dynamic Text (D)
2) Text Element (E)
3) Include Text (I)
4) Text Module (M)
You can see the same in the below screen shot which gives you a better idea(Marked in Red below):
Now let us look into the purpose of each text types:
1) Dynamic Text (D):
Usually we use to display each field explicitly using text element by mentioning the field name. Using the dynamic text type we can display the complete table type which ever is assigned to it. Hope You will get a better understanding once you go through the below screen shot and example.
Now in the below screen shot you can find how the dynamic text is assigned in smartforms.
Now this field which is assigned as L_TEXT shoud be declared in global definitions of smartforms whose type is of some Table type created in SE11.
Also all the fields in L_TEXT will be filled either in smartform or in driver program and the values will get displayed accordingly based on the number of fields in the structure of the table type.
2) Text Element (E):
This text type is used for displaying the values where we have to either explicitly mention the variable name or the field name if it is a workarea. This is generally used in most instances.
It will continue to display the value in the field whichever is mentioned explicitly, using this text type we can only display one field value at a time. The below screen shot will help you better on how it needs to be assigned.
Here GV_HEADER is a variable to display the required value, please note that this variable is used locally and valid only within the smartform which concludes that this text type is for variables confined within the smartforms.
3) Include Text (I)
This text type is used to display the standard text that is created in the T-CODE SO10. Usually we use to read the data created in standard text using READ_TEXT function module, but in smart form we have the flexibility to directly use it. It can be best understood by the below screen shot.
As we can see above the include text can be used in the smartform directly by giving the header details of the standard text created in SO10. The header details can be taken from SO10 t-code by using the below navigation. As soon as you reach the text maintained in SO10 navigate to:
Goto –> Header.
You will be getting the below pop up. where you can find all the details needed to enter during the include text creation.
Now whatever text that we have maintained in SO10 will be displayed.
4) Text Module (M)
This text type is helpful for using the same text in multiple smartforms. Suppose say we have a header text which will be same for most of the smartforms that we create then first we have to create the text module and then assign them in the smartform.
Lets go step by step. As a first step we need to create a text module, the t-code for this is SMARTFORMS. Click on the text module radio button and click create as shown below.
In the next screen enter the required text and save it as shown below.
You also have the option to translate the text module text in mutiple languages as shown below in the Management Tab. By clicking on the arrow against the ‘selected language’ radio button you will find all the available languages.
Once you have created, the module text is ready to be used, now select the text type as text module and assign the name as shown below.
Please note that this same text module can be used in multiple smartforms.
Conclusion:
Hope this document gave you a good idea about the different text types that are used in the smartforms. Am sure most of you will have more such things to share, eagerly waiting for your posts.
I will be vary happy for your comments, corrections, ratings etc. Hope this bolg was useful and helped you to increase your knowlege account.
Once again thanks to SCN for its wonderful efforts it has taken till now.
“Lets Learn Share and Collaborate” ???? ???? ????
Please note that to maintain confidentialy about the client information the screen shots are screened at certain places.
Thanks and Regards,
Satish Kumar Balasubramanian
New NetWeaver Information at SAP.com
Very Helpfull