on 09-11-2008 3:56 PM
Hi,
I use a text edit to display comments on a business object.
the comments are stored in SAP systems own text reopository, where texts are stored as lines of a table
for example:
this is a comment
to business object XY
I want to display this in a text edit UI element. the text edit ui element needs a context attribute of type string (or char I guess). I need to bring the lines of the table into lines of the text edit.
when entering values with line break, the text looks like this in the context attribute: "this is a comment#to business object XY".
even when I concatenate it like this is a comment#to business object XYthis is a comment#to business object XY
in the text edit box it is displayed like
this is a comment
to business object XY
this is a comment
to business object XY
I assumed that the symbol hash # is the line break symbol but I cannot programmatically add the symbol for a line break.
If I set the context attribute with "this is #a test" it won't show as
this is
a test
it displays
this is#a test
how can I add a line break programmatically at runtime?
best regards
Stefan
Hi Stefan,
In order to have a line break in between the text while you concatenate, you have to use the attributes from the character utility class instead of #
Eg.
CONCATENATE 'this is'
CL_ABAP_CHAR_UTILITIES=>NEWLINE
'a test'
CL_ABAP_CHAR_UTILITIES=>NEWLINE
to <your string name>.
This would show as you expected like:
this is
a test
Regards,
Trikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try concatenating the CR_LF attribute of the class CL_ABAP_CHAR_UTILITIES
concatenate str cl_abap_char_utilities=>cr_lf into str.
it should work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.