cancel
Showing results for 
Search instead for 
Did you mean: 

Single quotes( ' ) printing as # in smartform

Former Member
0 Kudos

Hi Experts,

I am trying to print single quotes( ' ) in the smart form which is converting to # at the time of printing.

The data is coming from a portal and finally the data is printed on portal through smartform.

Kindly suggest that how can I retain Single quote ( ' ) at the time of printing in portal.

Thanks.

Regards,

Kapil Sharma

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

In debugging mode, try removing the single quote from the variable and again type the single quote in the variable value and then try seeing the printout. Check whether in this case the single quote is being displayed in the print or not.

The system prints the # value at the places where it cannot identify the character which is passed on for printing. So just have a check witht he basis team regarding the character set used in the Device Type configured for your Output Device.

This dynamic data may have some special characters which looked like single quote in debugging mode.

But the system was not able to replace them as they were not single quote. Place the below statement before displaying the variable in your smartform.

REPLACE ALL OCCURRENCES OF ' ' ' IN lv_desc WITH ' ' '.

Former Member
0 Kudos

Thanx vinraaj,

But this is not solved tthe problem, because we can't put the single quotes inside a single quotes. It's a syntax error.

I find the another solution for this. Code is given below,

DATA lv_desc type string.

CONSTANTS c_asp TYPE char1 VALUE `'`.

REPLACE 'u2019' WITH c_asp INTO lv_desc .

OR

DATA lv_desc type string.

CONSTANTS c_asp TYPE char1 VALUE u2018u2019u2019u2019.

REPLACE 'u2019' WITH c_asp INTO lv_desc .

This thread has been closed.

Regards,

Kapil Sharma