cancel
Showing results for 
Search instead for 
Did you mean: 

Which contro can be used to show a multi-line text

Former Member
0 Kudos

regards ,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi. You can use TextView or TextEdit.

Former Member
0 Kudos

hi, I separate the string by CRLF

DATA: crlf(2) TYPE c.

crlf = cl_ABAP_char_utilities=>cr_lf.

......

CONCATENATE 'aa' 'bb' INTO l_tmp_str SEPARATED BY crlf.

......

But , in the Text view , I can not see the line has been changed , is there anything I had done wrong ?

Regards ,

shwetars
Advisor
Advisor
0 Kudos

Hi Blake,

I created a context attribute "TEXT" of type string, created a textview and bound it to this attribute.

as you have done I used the following code to set data into it

DATA lo_el_context TYPE REF TO if_wd_context_element.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

DATA: crlf(2) TYPE c,

lv_text TYPE string.

crlf = cl_abap_char_utilities=>cr_lf.

......

CONCATENATE 'aaaa' 'bbb' 'cc' 'd' INTO lv_text SEPARATED BY crlf.

lo_el_context->set_attribute(

EXPORTING

name = `TEXT`

value = lv_text ).

It works perfectly and I get output just as you want. Please check if you have followed all the steps, there is nothing wrong in the approach you have followed.

Regards,

Shweta

Former Member
0 Kudos

hi blake,

even i have tried it and it seems to work...

please check if you are missing any of the suggested steps...it could be as simple as not checking the WRAPPABLE property...

shwetars
Advisor
Advisor
0 Kudos

checking or unchecking the wrapping property doesn't make any difference

Former Member
0 Kudos

@ shwtha ::

checking wrappabble displays the text automatically in the next line when the width is exceeded on the screen else you need to manually scroll and see the text.......

correct me if i am wrong

Former Member
0 Kudos

@Rahul,

Wrapping is to display text in the next line only when the length exceeds the field length. In this case, he wants to force a newline character even without the text exceeding the length. So whether or not the wrapping property is checked does not matter.

Regards,

Nithya

Former Member
0 Kudos

@nithya

thx for the clarification

shwetars
Advisor
Advisor
0 Kudos

Hi Rahul,

your understanding is perfectly right.

what i meant was in this particular case it doesn't matter because he is anyways appending a carriage return character at the end of the text.

Regards,

Shweta

Answers (3)

Answers (3)

Former Member
0 Kudos

Also, you may have to check the "WRAPPABLE" option for text to automatically come to next line

Former Member
0 Kudos

hi , Rahul

the problem is that I have a string like the following :

aaaa

bbbb

ccc

ddd

I wanna to show it in the textview and it seems to be ##aaaa##bb##cc##dd

not that I was expected .

Can you help me ?

Former Member
0 Kudos

Hello everyone

I have the same problem where a string contains CR_LF but at the WD does shown #.

Example:

the problem is that I have a string like the following :

aaaa

bbbb

ccc

ddd

I wanna to show it in the textview and it seems to be ##aaaa##bb##cc##dd

not that I was expected .

Is anyone found a solution?


Regards

dstj

libor_janka
Explorer
0 Kudos

Hello,

I have the same problem on SAP NetWeaver 7.0 SP15:

line1

line2

line3

after save:

line1#line2#line3#

Any solution?

Thank You

Former Member
0 Kudos

Hello Libor

I solved the problem by applying SAP notes: 0001783767, 0001797388 and 0001813468.

I hope that will help you.

Regards

Daniel

libor_janka
Explorer
0 Kudos

Hello,

thank you very much for your solution. I have applied note 1797388 and problem is solved.

Best Regards

Libor Janka

libor_janka
Explorer
0 Kudos

Hello,

new lines is OK, but we have problem with space between some words. For example:

words1 words2

after save:

words1words2

Thank you very much for your time

Libor Janka

libor_janka
Explorer
0 Kudos

Hello,

I have implemented note 1813468 and it seems OK. Now we are testing 🙂

Libor Janka

Former Member
0 Kudos

hi blake,

text view can show a multiline text ...but it is "read only ".

if you want to edit also then you should go for textedit...

S-H
Active Participant
0 Kudos

Hi,

Use the UI Element Explanation. The UI element explanation is used to display single-line or multi-line help texts for UI element or a Web Dynpro application.

You can find more information about this element at:

<a href="http://aiokeh.wdf.sap.corp:50000/SAPIKS2/contentShow.sap?_SCLASS=IWB_STRUCT&_SLOIO=7C3545415EA6F523E10000000A155106&TMP_IWB_TASK=DISPLAY&RELEASE=688&LANGUAGE=EN&_SEQNUM=433&_LOIO=A942C041E125C917E10000000A155106&_CLASS=IWB_EXTHLP">http://aiokeh.wdf.sap.corp:50000/SAPIKS2/contentShow.sap?_SCLASS=IWB_STRUCT&_SLOIO=7C3545415EA6F523E10000000A155106&TMP_IWB_TASK=DISPLAY&RELEASE=688&LANGUAGE=EN&_SEQNUM=433&_LOIO=A942C041E125C917E10000000A155106&_CLASS=IWB_EXTHLP</a>

Best regards,

Suresh

Former Member
0 Kudos

hi, Suresh

I don't want to use help text which is transalatable . I just wanna to show a multi line text . Can th etext view showed an multiline text ?

Regards