Skip to Content
author's profile photo Former Member
Former Member

Removing Line Breaks from Smartform Paragraph, PDF

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


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.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 15, 2016 at 10:25 AM

    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?



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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




      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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.