Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Line Breaks from Smartform Paragraph, PDF

Former Member
0 Kudos
500

Hi Abapers,

I have an issue while printing some content in PDF via Smartforms. The text displayed in the PDF is as below: (This is just an example)

" This is not 132 characters

hence

the file is not valid"

Now, the issue is the above paragraph is one line, however, it gets divided into 3 lines with lots of space after "hence". I need to merge the lines without the extra spaces. Another crux is that since there was ## in the text I have used NEWLINE to remove the #. I think the issue is occurring because of the NEWLINE as SAP only identifies the # and creates a NEWLINE without understanding the sentence completion.

Is there a way to solve this issue? Any snippet or FM which completes sentences would be of tremendous help.

Awaiting reply.

Regards,

Nehal

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos
97

Does this text come from some READ_TEXT, and in this case did you use a FM like CONVERT_ITF_TO_ASCII to reformat the text?

Regards,

Raymond

0 Kudos
97

Hi Raymond,

Thanks for the response, however I have tried this FM and it merges the entire paragraph without respecting the NEWLINE.

So e.g if I have a text like " This is 132 characters

                                         hence

                                         <NEWLINE>

                                         <NEWLINE>

                                         This is invalid"

The FM returns the result as " This is 132 characters hence this is invalid" which is not what I want. I need the blank lines to be retained as it is.