cancel
Showing results for 
Search instead for 
Did you mean: 

Double quotes printing as # in smartform

Former Member
0 Kudos

Hi Experts,

I am trying to print double quotes " in the smart form which is converting to # at the time of printing.

The data is coming from a BADI. So I cannot make use of Include symbols in the form.

Kindly suggest that how can I retain " at the time of printing.

Thanks.

Regards,

Megha

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Did you check the value in debugging mode?

If it shows # inside the smartform in debugging mode then include below code before displaying the variable in your smartform.

    • that is replace # with " it will work out.

If in debugging mode, double code is displayed correctly then check the raw format of your spool, I guess it is mostly because of the font family that does not have double code.. try to assign following fonts to your variable that is "Courier" or "Times New Roman".

Close the thread once your question is answered.

Regards,

saiRam

Former Member
0 Kudos

Hi,

Thanks for the suggestions but still the issue is not resolved.

In debugging mode,it is showing as double quotes itself. As suggested,I have changed the font to courier of the particular text element but still it is showing as '#' in the output. I tried removing those double quotes,as we don't want '#' to be displayed in the output.

For that I have written the below line of code

Replace all OCCURRENCES OF ' " ' in pv_description with ' '.

But still that # is coming in the output.

This data is coming from the database. It is no where hard coded in the smartform.

Kindly advise, how to remove those double quotes.

Thanks.

Regards,

Megha

Former Member
0 Kudos

Hi Megha,

In debugging mode, try removing the double quotes from the variable and again type the double quotes in the variable value and then try seeing the printout. Check whether in this case the doubles quotes 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.

Thanks & Regards,

Harish

Former Member
0 Kudos

Hi Harish,

Yes when I have removed and retyped the double quotes in debugging mode,it worked. The Print is showing the double quotes correctly. I have tried putting the statement 'Replace all occurences of ' so that the issue can be resolved completely but this statement is not useful for that.

Kindly suggest the way by which we can completely resolve this issue.

Thanks.

Regards,

Megha

Former Member
0 Kudos

Hi,

Use Change editor method and type the quotes or use the word editor and pass the ASCII character of double quote using symbol option.

Regards

Shiva

Former Member
0 Kudos

Thank you all for the valuable inputs.

This dynamic data had some special characters which looked like double quotes in debugging mode.

But the system was not able to replace them as they were not double quotes.Below statement worked

REPLACE all OCCURRENCES OF ' u201D ' in lv_desc with ' " '.

Special thanks to Harish. Closing the thread.

Regards,

Megha

Answers (3)

Answers (3)

Former Member
0 Kudos

Is character " has been hardcoded in the data where you are passing it to form?

aidan_black
Active Contributor
0 Kudos

Hi Megha,

I am not familiar with your application. It is possible that the default outout device of the user is the one that is picked. you can check this via transaction SU01. Otherwise the output device and device type is set in the application customizing.

When your application calls the smartform function module, the parameter USER_SETTINGS should be empty and the parameter OUTPUT_OPTIONS-TDDEST should be filled with a correct output device.

Regards,

Aidan

aidan_black
Active Contributor
0 Kudos

Hi Megha,

Try printing via windows and device type SWINCF.

Regards,

Aidan

Former Member
0 Kudos

Hi Aidan,

Thanks for the reply. But I am not sure ,how can I change the device type as printing of the form is triggered through the portal.

There is lot of dynamic data and this double quote data will not be printed in the print preview unless we trigger it through the portal.

Regards,

Megha