cancel
Showing results for 
Search instead for 
Did you mean: 

Getting # instead of new line - in smartform

Former Member

Hello,

I am displaying a PDF in popup window, in which I am getting '#' instead of enter (Keyboard enter i.e. new line).

Details -

I have some text boxes, in which I can put the comments where user can press the enter on keyboard (new line character). When I look that comment on browser, I can see the enter pressed i.e. text is displayed on next line.

But when I open a smartform, it shows me '#' instead on new line. FYI - If I look in infotype value, there also it shows '#', but I am able to get new line in browser (it doesn't show '#' in browser i.e. it works fine in browser).

Only issue is with PDF or smartform.

Thanks & Regards,

Bhushan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi BhuShaan,

I understood your problem.

I faced similar issue in smartforms while printing Longtext text with #(enter). I found a solution for the same.

I got Text with # into ET_LONGTEXT Internal table. I have done below code

data : ET_LONGTEXT TYPE TABLE OF BBP_PDS_LONGTEXT,

ES_LONGTEXT TYPE BBP_PDS_LONGTEXT,

ET_TDLINE TYPE TABLE OF TDLINE,

ET_TDLINEF TYPE TABLE OF TDLINE.

LOOP AT ET_LONGTEXT INTO ES_LONGTEXT.

SPLIT ES_LONGTEXT-TDLINE AT cl_abap_char_utilities=>newline INTO TABLE ET_TDLINE .

APPEND LINES OF ET_TDLINE TO ET_TDLINEF .

ENDLOOP.

You can try above logic. Good Luck.