cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms - Handle dynamic text

Former Member
0 Kudos

Hi All,

I have a smartform where in the "header" window is defined a "template1" which fields are: %graphic2, %text1, %text2, %text3 and %graphic3.

I need to change the text of the "header" if the plant changes. First of all, now I have 3 text elements but I wont to replace these text by only one text. In other words I need to set a condition for showing 3 text elents or 1 text element with a new text.

My doubt if about the definition and use of a text module (tcode smartforms) and how to link it in my smartforms without to remove the structure "template1".

Which is the best way to proceed?

Thanks in advance for your help.

Regards,

Giovanni

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I think you can do by another way.

1. create new template 'template2' with only one cell for single text.

2. Put the condition in condition tab.

3. similarly put opposite condition in template1 conditions tab.

check it

Plz close the thread if it is solved

Thanks,

suma.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I have understood the way to display the text under a condition (i.e. plant) but I don't need to print a string but a complex text on many lines and with words in bold and other words in different font and size. I wish to display dynamically the right text.

For example, is there the possibility do define a "global" text and outside the smarform? Then is it possible to set this text dynamically in this way:

<template name/node>-<name of the text field> = Z<text element defined globally or outside the smartform>

Should be an easy way for me.

Any help will be well appreciated.

Thanks.

Regards,

Giovanni

NAeda
Contributor
0 Kudos

hi,

For the same,

1) Create Text module out side the forms(Tcode Smartforms-Text moules).

2) Then assing the font style in the Management TAB.

3) Use the same text module in your SMARTFORM- Text( change the text element type to Textmodule)

4) Check the Text box : Always copy style from Text module.

Rgds

Aeda

Former Member
0 Kudos

hi

Before the Template , include Program lines and write a CASE ENDCASE and move the HEADER TEXT based on the PLANT to a LV_TEXT and print this Text in the template.

example

Case lv_werks.

when '1000' .

lv_text = 'PLANT 1000'

when '2000'

Lv_text Plant 2000'.

...

endcase

and print this LV_text in the TEMPLATE.

surya

Former Member
0 Kudos

Thanks for the quick reply.

I need more information about the condition that I can use for setting the right text on the right template. More exactly, how can I redirect the output on the right template?

My last request: I have the necessity to change the template, for example the template2 with only one text box but without including the logo at the right side.

Any help will be well appreciated.

Thanks in advance for your kind support.

Regards,

Giovanni

NAeda
Contributor
0 Kudos

hi,

Do you want to print the Text defined in Text module..?

double click on the textelement and change the Text type from Text element to Text module then use the conditions tab for the text to define the conditions, based on these conditions your text will display.

Rgds

Aeda