cancel
Showing results for 
Search instead for 
Did you mean: 

Document template - text lines

b_deterd2
Active Contributor
0 Kudos

Hi,

I have created a multine virtual attribute which is filled with text lines (from a PO).

I want to show these lines in a document template. It works but the lines are shown like this:

Line1Line2Line3

In the document template (word document) I want to show it like this:

Line1

Line2

Line3

How do I force a line-break?

I'm quite new in WF so i probably made some basic mistake.

Any help is welcome !

bert

Accepted Solutions (1)

Accepted Solutions (1)

ramki_maley
Active Contributor
0 Kudos

Bert,

What Aman mentioned is not available for Word Document Templates. I am not sure if this will work but try to introduce a linebreak character at the end of each line of the multiline container element. You could try that in the method that populates the multiline container or have a new background method.

You can try the following code (I have not checked the syntax).


  DATA:
    l_crlf(2).
  FIELD-SYMBOLS:
    <line>  TYPE t_line. "table type of the text

  l_crlf = cl_abap_char_utilities=>cr_lf.

  LOOP AT it_line ASSIGNING <line>.
    CONCATENATE <line> l_crlf INTO <line>.
  ENDLOOP.

Cheers,

Ramki.

b_deterd2
Active Contributor
0 Kudos

Thanks Ramki,

Your suggestion works. The only thing you have to do subsequently is to edit the link in the document template by manually adding a '##' at the end of the link.

I changed:

&MYOBJECT.SUBJECTDESCRIPTION&

manually to:

&MYOBJECT.SUBJECTDESCRIPTION##&

and it works !!!!!

Thanks again !

Bert

b_deterd2
Active Contributor
0 Kudos

Help: where are the radiobuttons to give Ramki his hard-earned points?

ramki_maley
Active Contributor
0 Kudos

Bert,

It may then work without the CRLF characters with &MYOBJECT.SUBJECTDESCRIPTION##&

Have you tried it?

Cheers,

Ramki.

ramki_maley
Active Contributor
0 Kudos

Bert,

I think you are supposed to see them against each reply. I am not sure if the system is having some problems at this time?

Ramki.

b_deterd2
Active Contributor
0 Kudos

Hi Ramki,

I've tried it but you have to do both.

Thanks again. Bye !

Ps.: you have got the points now !

Answers (1)

Answers (1)

Former Member
0 Kudos

Normally In the description tab of any task when you click on Express button and select Multiline container element it will give POPUP with three options with radio buttons.

Only First line

All line as Cont. text

All Line with line break

Select the last option

and it will insert like &POTEXT##&

POTEXT is the multiline container element.

Hope this will help you.

Regards

Aman