on 2024 Jul 11 1:24 AM
Hello Experts,
(1) Our ECC system is non-unicode system
We have a custom prog it is reading Acc. doc BKPF data and storing in App server, then other legacy non-SAP system is consuming the same data from App server, this prog has below syntax
OPEN DATASET <file name> FOR OUTPUT IN TEXT MODE MESSAGE <my messsages>
ENCODING DEFAULT
TRANSFER <my rec> TO <file name>
The above is worked fine
(2) Recently we unicode enabled our ECC system,
Then the receiving / consuming non-SAP legacy system is throwing an error as "Truncation of a record occurred during I/O operation"
After investigation we saw that the NBSP (Non blank space in Notepad++) in BKPF-BKTXT is causing the issue of truncation then we changed the ABAP syntax to as below
OPEN DATASET <file name> FOR OUTPUT IN TEXT MODE MESSAGE <my messsages>
ENCODING NON-UNICODE
Worked fine, no longer NBSP issue
(3) But yesterday we got dump in SAP as CONVT_CODEPAGE with below message
"When converting a text from code page '4102' to code page '1100', either
- characters are detected that cannot be displayed in one of the two code pages or
- the conversion could not be carried out for another reason"
(4) So it means that the BKPF-BKTXT (free/long text) has non-unicode for some acc. docs and unicode text for some other acc. docs
Pls. let us know a syntax that works for non-unicode text and unicode text, can we go with BINARY format like below,
OPEN DATASET <fine name> FOR OUTPUT IN BINARY MODE
Request clarification before answering.
Hi,
this is a general problem when exchanging char-like data between Non-Unicode and Unicode based systems. It can happen during transport, interfacing (e.g. via RFC) or (as in your case) file exchange.
Unicode is supporting more than 100000 characters, while code page 1100 (ISO-Latin-1) supports less than 256. As soon as a character outside the Non-Unicode codepage is transferred, the system needs raise an error or to replace it with a replacement character (default in SAP is "#") Alternatively it might be also possible (as already mentioned) to convert the problematic character via transliteration.
However when transferring textual data from Unicode to Non-Unicode, you cannot avoid risk of data loss - this will always be recognized (at the latest) in the receiving Non-Unicode system.
By the way using binary mode is not an option at all - the content will not be readable anymore ...
The best solution would be to use Unicode systems in the landscape only, but this is often not possible in reality ....
Please also have a look at SAP note 1322715 and the attachment of that SAP note called Requirements_of_ABAP_Programs_in_Unicode_Systems.pdf.
Best regards,
Nils
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unicode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unicode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@raymond_giuseppi yes, you are correct, thank you. Do you have any thoughts on our issue because the receiving system analyst said their code page is IBM 37 (CCSID37) with full Latin-1 char set
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Consider using REPLACEMENT CHARACTER rc and IGNORING CONVERSION ERRORS in the OPEN DATASET statement to handle Unicode character that cannot be converted to your non Unicode page code (and are not handled thru transliteration. Look for FM such as SCP_REPLACE_STRANGE_CHARS)
As your users are now able to copy/paste exotic character to SAP from Word or any Web sources, this is likely to become a frequent occurrence.
NB: Does you company use some ESB, those tools are often able to perform those conversions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
IBM 37 is a Latin1 EBCDIC page code.
Be aware that SCP_REPLACE_STRANGE_CHAR can and will change number of characters (e.g. '±' > '+/-' or '€' > 'EUR'
@Sandra_Rossi Thank you for the suggestions, you mean, I need to write the syntax as below, just for example purpose?
OPEN DATASET <file name> FOR OUTPUT IN TEXT MODE MESSAGE <my message> ENCODING '1100'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
64 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.