cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORM Include text node not handling "-" in text

Former Member
0 Kudos

Whenever I have a hyphen "-" in text that is referenced in SMARTFORM text node it prints "-" as "#". I went as far as debugging the INCLUDE TEXT perform within the generated function code created by the SMARTFORM.

There I found the output table %TEXTAREA of fm 'SSFRT_READ_INCLUDE_TEXT and L_TOKEN of fm SSFCOMP_CONVERT_ITF_TO_TOKEN to be exactly as text entered.

While within SMARTFORM I change TDDEST and the paragraph used and it still makes "-" as "#" .

This happens in print preview and print.

In this specific SMARTFORM I am attempting this using either ME23N or ME9F.

Are there any safeguards when using special characters within SMARTFORM texts?

Very strange as for other SMARTFORMS I can even sucessfully print or preview Chinese and eight other languages.

2/16/2011 > went further in dbug and found that text is actually changed by the beginning of CONV_STRUC_OTF_TO_PLAIN_OTF within generated SMARTFORM. I have change SAPSCRIPT paragraph to remove color feature and change font size; the text is placed within a table line that tabbed so I even removed/changed so text could take full line. Still makes "-" become "#".

This is not one SMARTFORM but four distinct SMARTFORMS for Purchase Orders and quotes. Can always be seen in print preview as it happens within generated SMARTFORMS standard routines,

Edited by: Michael Hintergardt on Feb 16, 2011 4:08 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

aidan_black
Active Contributor
0 Kudos

Hi,

The # character printed usually means that the character is not supported by the character set of the device type used to print the character. What is the result if you create the spool and print via unicode device type SWINCF(see SAP note #812821)?

Regards,

Aidan

Former Member
0 Kudos

It could be printer issue,please try to use READ_TEXT Function in smart form then see the output.

If not then you have to see OSS note.

Former Member
0 Kudos

READ_TEXT views text perfectly.

Additionally, when debugging the SMARTFORM I found FUNCTION 'SSFRT_READ_INCLUDE_TEXT' and FUNCTION 'SSFCOMP_CONVERT_ITF_TO_TOKEN' both also made text perfectly. It is only later within the SMARTFORM that the text character "-" becomes "#".

As this happens to all four purchase order SMARTFORM outputs I have in use here I suspect that the print program that calls the SMARTFORMS could be at fault. Either the control_parameters or output_options.

DEVICE PRINTER

NO_DIALOG X

PREVIEW X

GETOTF

LANGU E

-


TDARMOD 1

TDNOARMCH

TDARCCOP

TDTITLE

TDNOPREV

TDNOPRINT

TDNOARCH

TDIEXIT X

TDDATASET NB_PO

former_member196280
Active Contributor
0 Kudos

Try changing the paragraph format that is attached to the text. or check with font family TIMES.

Regards,

SaiRam

Former Member
0 Kudos

I tried changing Paragraph Formats in Include text within SMARTFORM. All PO smartforms have same error. A smartform for proforma invoice will do same text perfect as seen in READ_TEXT fm.

I know I can use fm READ_TEXT BUT this should NOT be necessary as other SMARTFORMS work fine with INCLUDE text of SMARTFORM and this method allows formatting with SMARTFORM. This is how this works.

Unfortunately, I think the PO SMARTFORMS have slightly diffenent logic just before the SMARTFORM fm CONV_STRUC_OTF_TO_PLAIN_OTF.

This means that the logic used when generating SMARTFORM can be slight different at a low level.

The parameters OUTPUT_OPTIONS and CONTROL_PARAMETERS were made the same so as to make SMARTFORM act similar with regards to TEXT formatting.

Former Member
0 Kudos

I tried this even though with all I have previously stated the suggestions made no sense to me.

TIMES paragraphs do not cahnge the results where special character "-" becomes "#".

If you F8 from within SMARTFORM you get the high level function. All look very similar and basically pass different parameter values.

Now if you continue to utilities and pull down Display Object List you find that how this function gets generated varies from SMARTFORM to SMARTFORM. Usually there are lower level INCLUDEs where all the differences lie.

What I have been saying is that within SMARTFORMS where you make your changes the resultant functions modules can and will be different. But this should not (in an ideal world) give results that differ as per text manipulation/translation work differently.

Here is what I did differently. In SMARTFORM that works I do INCLUDE text explicit values for Text object and ID. In the group that does not work I first read all Text ID for EKPO by using SELECT_TEXT and then passing whatever Text IDs happen to exist for the document (text name). This makes no difference as the results either way are good as I find via debug after the INCLUDE text statement in of the SMARTFORM. I always get resultant %text and when I view it all characters are as entered. Further, after the SSFRT_READ_INCLUDE_TEXT text OK, SSFCOMP_CONVERT_ITF_TO_TOKEN text OK.

Today I added logic to do READ_TEXT within A PURCHASE ORDER smartform. iT has same result as INCLUDE text.

Conclusion: something is very wrong with PO smartforms. This makes no sense.

Edited by: Michael Hintergardt on Feb 17, 2011 9:54 AM