02-09-2009 5:02 PM
Hi Gurus,
I am facing issue with the newly converted unicode (cp 4102) spool files. I am using the standard functions RSTS_OPEN_RLC , RSTS_READ and RSTS_CLOSE to read TemSe files and create output files on application server using OPEN DATASET and TRANSFER.
After conversion to unicode, these function calls are returning some greek characters with size of the itab doubled (and that is due to double-byte UTF-16 charcter set) .
The program generates
Runtime Error CONVT_CODEPAGE
Except. CX_SY_CONVERSION_CODEPAGE
" While a text was being converted from code page '4102' to '1100', on
the following occurred:
- an character was discovered that could not be represented in one o
the two code pages;
- the system established that this conversion is not supported."
the statement
TRANSFER TEMSE_DATA TO ACT_FILE
generates this error.
Can someone tell me what is missing ?
TIA
Wasim
02-09-2009 5:55 PM
Hi Wasim,
please have a look at note 901004.
Best regards,
Nils
02-09-2009 5:55 PM
Hi Wasim,
please have a look at note 901004.
Best regards,
Nils
02-09-2009 6:36 PM
Hi Nils,
Thanks for the sap note. The issue is not just the old spool files, its the ones created afresh on unicode system with cp 4102. Even when I run SP11 and see the contents of the spool files recently created on unicode system, it shows characters like # , boxes and some greek characters.
Regards
Wasim
02-10-2009 11:45 AM
create output files on application server using OPEN DATASET and TRANSFER.
How does this open dataset line look like? Is the application server you´re doing that also Unicode?
Markus
02-10-2009 2:59 PM
Hi Markus,
The statements in the program are as below:
Data: ACT_FILE LIKE RLGRAP-FILENAME.
OPEN DATASET ACT_FILE FOR OUTPUT IN LEGACY TEXT MODE MESSAGE MSG80.
Regards
Wasim
02-10-2009 3:00 PM
The database and application server are both unicode. We are using HP-UX 64 bit server for hosting SAP instance.
Regards
Wasim
02-10-2009 3:18 PM
> OPEN DATASET ACT_FILE FOR OUTPUT IN LEGACY TEXT MODE MESSAGE MSG80.
If you open the file in "legacy" mode, that means "ASCII". The file created is a Unicode file so you need to open it in "unicode mode":
OPEN DATASET ACT_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
which will open the file in the same codepage your app-server is running on (so Unicode).
Markus
02-10-2009 4:37 PM
Hi Markus,
If I use the ENCODING DEFAULT, that eliminates the ABAP dump but the output file generated contains extra characters and its not the same as in the non-unicode system.
The objective is to read the TemSe spool file using RSTS_READ function and generate a text file on the application server while preserving the format of interface file at the output, as it was in non-unicode system.
Even when I look at the contents of the spool file using SP11 it shows some greek characters. Is it normal for a unicode converted system ?
Thanks
Wasim
02-10-2009 4:45 PM
> If I use the ENCODING DEFAULT, that eliminates the ABAP dump but the output file generated contains extra characters and its not the same as in the non-unicode system.
What "extra characters"?
> The objective is to read the TemSe spool file using RSTS_READ function and generate a text file on the application server while preserving the format of interface file at the output, as it was in non-unicode system.
>
> Even when I look at the contents of the spool file using SP11 it shows some greek characters. Is it normal for a unicode converted system ?
You have Greek data in your system and/or in those spool files? Which font do you use on the frontend? The standard/default "Arial monospace" has not all characters and may display things wrong (switch to Courier New).
Markus
02-10-2009 7:24 PM
Hi Markus,
The extra characters are pasted below:
㤀 ㈀㈀㐀 ㈀㜀㐀㐀㐀 㤀 ㈀ 㘀 㤀㈀ 圀 㤀㐀 唀⸀匀⸀ 䈀䄀一䬀
These kind of characters are also visible in SP11 contents for spool files.
The spool files are generated through language EN and should not show any non-english characters.
Thanks
Wasim
02-10-2009 7:27 PM
The extra characters are pasted below:
㤀 ㈀㈀㐀 ㈀㜀㐀㐀㐀 㤀 ㈀ 㘀 㤀㈀ 圀 㤀㐀 唀⸀匀⸀ 䈀䄀一䬀
These kind of characters are also visible in SP11 contents for spool files.
Again the question: which font to you use to display in your SAPGUI?
The spool files are generated through language EN and should not show any non-english characters.
That doesn´t tell anything. One advantage of Unicode is that you can enter, display and modify all languages/characters with an English logon.
Another question: What technology is generating those spool files? Sapscript? Smartforms? Self written program?
Markus
02-10-2009 7:38 PM
Hi Markus,
The SAPGUI font(I18N) is "Courier New" Regular 11. GUI version is 710 Final release , Patch Level 4.
The output is a DTA file generated through sapscript form , program is ZFFOCA_T .
Regards
Wasim
02-10-2009 9:11 PM
If you check the print preview in SP01 for that spool - is the output there correct?
Markus
02-10-2009 9:33 PM
The TemSe object name starts with DTA* and its object - Data type is DATA with code page 4102.
Its not visible in SP01 transaction.
Thanks
Wasim
02-10-2009 9:41 PM
Honestly I have no reason for that behaviour. Since your program seems to be a customer program it´s even more difficult to suggest something.
I found however
Note 1179713 - ZTF: Downloading from TemSe with alternative code page
which may help. If it does not I´d open an OSS call.
Markus
02-10-2009 9:51 PM
Markus,
I noticed that in unicode system the code page for the DTA file is 4102 whereas in non-unicode system the codepage is 1100. Is there a way I can get the DTA files generated in cp 1100 on a unicode system ?
Regards
Wasim
02-10-2009 9:57 PM
The question is: Where is that conversion done? Before (in sapscript) or after (during download)?
I don´t know the application to create DTA files good enough to judge anything here.
Have you maybe hardcoded the codepage into sapscript somewhere?
Markus