<New Line> character in Smartform

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Locked
EvaLam
Posts: 8
Joined: Mon Mar 26, 2012 8:02 pm

<New Line> character in Smartform

Post by EvaLam » Thu Apr 26, 2012 3:11 am

Hi,

Is it feasible to insert a <New Line> character in a cell of a table in SmartForm? Please find a sample as below.

Here is a Text Line. <New Line>
New Start of Line 2.

Please help and Thanks!

Gothmog
Posts: 1952
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: <New Line> character in Smartform

Post by Gothmog » Thu Apr 26, 2012 3:18 am

Have you tried using CL_ABAP_CHAR_UTILITIES=>CR_LF ?
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67

EvaLam
Posts: 8
Joined: Mon Mar 26, 2012 8:02 pm

Re: <New Line> character in Smartform

Post by EvaLam » Thu Apr 26, 2012 3:28 am

The text already contains the <New Line> character, just it would not be breakdown in a new paragraph. (i.e. the text would be shown in one line.)

SHS
Posts: 483
Joined: Mon Mar 06, 2006 3:57 am

Re: <New Line> character in Smartform

Post by SHS » Thu Apr 26, 2012 8:47 am

It seems a bit strange to me. I have never encountered problems with this.
Is your cell large enough to contain two lines?

And if you check the text using the text editor (i.e. click the icon with the notepad), is the text also split into two lines there?

EvaLam
Posts: 8
Joined: Mon Mar 26, 2012 8:02 pm

Re: <New Line> character in Smartform

Post by EvaLam » Fri Apr 27, 2012 1:52 am

The cell is large enough to contain two lines (word wrap is applied, and the text would be wrap to the second line if the text is too long.)

Checked. The text is also split into two lines in the text editor (both MS Word and SAP standard text editor).

Thanks.

adhimas
Posts: 3
Joined: Mon Feb 14, 2005 6:50 am
Contact:

Re: <New Line> character in Smartform

Post by adhimas » Fri Jul 27, 2012 3:25 am

If you get the text from long text (using the FM read_text,) then you can directly set the text type to Include Text and set the right parameters for it. It will retain all the formatting from the long text.
Last edited by YuriT on Fri Jul 27, 2012 3:49 am, edited 1 time in total.
Reason: Necroposting

Locked