Sunday 12 July 2015

Text Types used in Smartforms

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

Text Types used in Smartforms

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.

Text Types used 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.

Text Types used in Smartforms

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.

Text Types used in Smartforms

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.

Text Types used in Smartforms

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.

Text Types used in Smartforms

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

Text Types used in Smartforms

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.

Text Types used in Smartforms

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.

Text Types used in Smartforms

No comments:

Post a Comment