Skip to Content
Technical Articles
Author's profile photo Satish Kumar Balasubramanian

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):

tt1.PNG

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.

 

tt2.PNG

 

 

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.

tt3.PNG

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.

tt4.PNG

 

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.

 

tt5.PNG

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.

 

tt6.PNG

 

 

In the next screen enter the required text and save it as shown below.

 

tt7.PNG

 

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.

 

tt9.PNG



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.

tt8.PNG

 

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

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jānis B
      Jānis B

      I don't believe any table type can be specified for dynamic text table - at least not on SAP Basis 702. The table typeshould be "type-compatible" to type TSFTEXT.

      /wp-content/uploads/2015/07/dyntxt_744395.png

      Author's profile photo Satish Kumar Balasubramanian
      Satish Kumar Balasubramanian
      Blog Post Author

      Hi Janis,

      You may be rite. Am not sure about the earlier releases, we are using 730 and its working perfectly when we assign the table type.

      Thanks for bringing this to notice.

      Regards,

      Satish

      Author's profile photo Karthick R
      Karthick R

      Thanks you so much for sharing such an useful information, Satish.

      Actually I am new to ABAP technology, I have few points to say,

      1. In Include text type, I have come across some smart form where - some text is fetching from Header text which we maintain in the billing document by using its text object. Can you please explain this? How to differentiate the source of Include text whether it came from SO10 or from header text?
      2. In Dynamic text type, Can we use the table type which we declared and populated in the global definitions instead of SE11? I mean locally.

      Regards

      Karthick

       

      Author's profile photo priyadarshini c
      priyadarshini c

      Thanks for sharing!

      Author's profile photo Satish Kumar Balasubramanian
      Satish Kumar Balasubramanian
      Blog Post Author
      Regarding your Questions,
      1) Both the texts will be part of the text table but one simple way to differentiate is, the custom texts we create in SO10 will always hold a Static Name where as the texts that’s flow from Header are dynamic and dependent on the billing document they are associated with. With the name of the two texts you can find the difference between the same.
      2) The answer is Yes, you could try the same if the version is updated one.
      Regards!