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: 

Print & in Smartform

Former Member
0 Kudos

Hi,

I want to print & in smartform like this '&' but it prints like this <(>&<)>. Plz suggest me how solve this problem.

i used function module Read_text ..

e.g i want to print " Mohan & Sohan"

But it prints " Mohan <(>&<)> Sohan"....

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ram,

You can use this code :


LOOP AT it_lines.
      IF sy-subrc = 0.
        REPLACE ALL OCCURRENCES OF '<(>' IN it_lines-tdline WITH ''.
        REPLACE ALL OCCURRENCES OF '<)>' IN it_lines-tdline WITH ''.
        CONCATENATE wa_vbak-r_txt  it_lines-tdline INTO wa_vbak-r_txt.
      ENDIF.
    ENDLOOP.

2 REPLIES 2

Former Member
0 Kudos

hey ,

You can put symbols in smartform try that,

Open the text node in the Line Editor.

Insert > SAP Symbols .

This symbols will not show up in the Print Preview or actual Spool. When you print the spool, it will show up in the Actual hardcopy

Regards,

Midhun Abraham

Former Member
0 Kudos

Hi Ram,

You can use this code :


LOOP AT it_lines.
      IF sy-subrc = 0.
        REPLACE ALL OCCURRENCES OF '<(>' IN it_lines-tdline WITH ''.
        REPLACE ALL OCCURRENCES OF '<)>' IN it_lines-tdline WITH ''.
        CONCATENATE wa_vbak-r_txt  it_lines-tdline INTO wa_vbak-r_txt.
      ENDIF.
    ENDLOOP.