This website is not affiliated with, sponsored by, or approved by SAP AG.

<New Line> character in Smartform

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

<New Line> character in Smartform

Postby 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!
EvaLam
 
Posts: 8
Joined: Mon Mar 26, 2012 8:02 pm

Re: <New Line> character in Smartform

Postby 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
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: <New Line> character in Smartform

Postby 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.)
EvaLam
 
Posts: 8
Joined: Mon Mar 26, 2012 8:02 pm

Re: <New Line> character in Smartform

Postby 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?
SHS
 
Posts: 483
Joined: Mon Mar 06, 2006 3:57 am

Re: <New Line> character in Smartform

Postby 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.
EvaLam
 
Posts: 8
Joined: Mon Mar 26, 2012 8:02 pm

Re: <New Line> character in Smartform

Postby 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
adhimas
 
Posts: 3
Joined: Mon Feb 14, 2005 6:50 am


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 4 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.