cancel
Showing results for 
Search instead for 
Did you mean: 

Space getting condesed in Text View UI Element

Former Member
0 Kudos

Hi ,

Hi ,

I have created and Text view and Binded it with Attribute lv_text type string .In WDDOINIT I am assigning value as 'this is          SAP' by set_attribute method .
But when Displaying it is showing it as this is SAP where the Space between IS and SAP is getting truncated .Any Idea how to solve this .

Thanks ,

San

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi San,

The problem is those duplicate spaces are discarded when rendered into HTML, similar to how keyword condense works in ABAP. Unfortunately, even an OTR text will have its extra spaces discarded.

To keep space between "this is" and "SAP", you'll need to break the phrase into separate UI elements and play with their properties. For example, using a matrix layout maybe left-justify "this is" and right-justify "SAP" or place an invisibleElement between the two parts of the phrase and give the invisibleElement a specific width to force it to take up space.

Out of curiosity, why do you need to format the phrase that way? Maybe there is another approach if we knew what the ultimate goal was.

Cheers,

Amy

Answers (3)

Answers (3)

former_member211591
Contributor
0 Kudos

Hi Sandeep,

please try "desing"  "label".

Set attribute design to value label within your viewdesigner for your textView UIelement.

BR

Former Member
0 Kudos

Hi Sandeep,

Create two text views and place your text 'This is' in one text view 'SAP' in another text view.

Add two TV's in Transparent container.

Go to second text view properties->Change vGutter Property to 'medium' or large' you will get space between two words.

Cheers,

Kris.

Former Member
0 Kudos

Hi sandeep,

go to  that method

Take 2 variables ex : text1, text2 of type char10. 

text1 = 'this is'.

text2 = 'sap'.

concatenate text1 text2 into lv_text seperated by  '          '.

now test it..