on 12-14-2011 7:24 AM
Hello,
I'm very new in developing smartforms, so please excuse if it's a silly question.
I created a table form in smartforms listing all entries of an article database as an internal table.
(Loop operand t_table into ls_table.)
Inside of one table field I want to list the article name and that's my problem the article description.
The problem is that there could exist unlimited description lines, but also no one.
Of course I only want to list the existing ones one per line.
I get the descriptions calling the function READ_TEXT and the information is stored in ls_txttab from type LTY_TXTTAB.
I tried to list the information by using the following code snippet.
LOOP AT ls_txttab INTO lf_text_zz.
concatenate lf_text_gz
CL_ABAP_CHAR_UTILITIES=>NEWLINE
lf_text_zz
into lf_text_gz.
ENDLOOP.
But smartforms ignores the newline char and just displays a '#' instead.
Do you have any idea how I can solve this?
I'd greatly appreciate your help.
Knud
Hi Knud,
If Smartform is not accepting the new-line character, then you can just concatenate space with your dynamic text.
say for e.g. if your description field space on smartform can accomodate maximum say 80 characters and your dynamic text holds 40 characters, then you need to concatenate remaining 40 characters as space to your dynamic text, so that, first charcter of new text will print on next line.
also , I found one thread similar to your issue, pls have a look. It might be helpful,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Knud,
In that case, you can simply display within loop only.
In ur code,
LOOP AT ls_txttab INTO lf_text_zz.
concatenate lf_text_gz
CL_ABAP_CHAR_UTILITIES=>NEWLINE
lf_text_zz
into lf_text_gz.
ENDLOOP.
Here, instead of concatenating and then printing it separately, u can print d current text, (lf_text_zz) within loop under a table line.
Here, u have to take care of table line design, as to under which cell u want to print it.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.