Application Development and Automation 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: 
Read only

Print & in Smartform

Former Member
0 Likes
522

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
Read only

Former Member
0 Likes
486

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.

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"....

2 REPLIES 2
Read only

Former Member
0 Likes
486

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

Read only

Former Member
0 Likes
487

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.