Playing Sherlock Holmes to detect CONVT_CODEPAGE runtime error mystery. As of late we had our unicode redesign alongside Ehp7. One of our group work, which is utilized for transferring mass information from a record in application server to Drain framework, irregularly beginning giving runtime mistake.
Special case : CX_SY_CONVERSION_CODEPAGE
Reason: During change of a text from code page ‘4110’ to code page ‘4102’, one of the accompanying happened:
- characters were found that can’t be dislpayed in one of the code pages, or
- the change couldn’t be performed for another explanation
Playing Sherlock Holmes to detect CONVT_CODEPAGE runtime error mystery: The landfill looked like underneath.
The landfill occurred at READ explanation.
The issue was bizarre, as it worked for the vast majority of records however unloaded for some not many. That is to say, the code turns out really great for most extreme cases yet couldn’t deal with a few explicit situations. I took a gander at the text record which was stacked to application server minutely. Be that as it may, nothing dubious was apparent to open eyes.
Since a large portion of the records were stacked effectively, I wanted to explore this document more to sort out what was different in this record from rest which stacked accurately. To my best of luck, this example record had only 3 lines, for me to look over. Yet at the same time, I saw as nothing off-base.
Not certain why, might be blaze of Mr Holmes , I considered opening this record utilizing Microsoft Succeed. Opened a clear succeed document. Document – > Open – > txt record.
The second I hit ‘Open’, look what I found!! Exceptional characters treasure which I was chasing after. Some way or another, the maker of this document wound up putting a few extraordinary characters (might be Chinese) which our program couldn’t deal with.
When you realize the underlying driver, finding arrangement was easy decision. Our business expert immediately erased the unique characters and once again ran the work. Blast!! everything stacked effectively.
As an ABAPer, I thought, our program ought to have been savvy to the point of dealing with such straightforward exemption. I, did an ‘F4’ on ‘OPEN DATASET’ catchphrases and saw as the beneath archives. I probably seen it many time, however interestingly I went through each words to comprehend what it implied. I needed to comprehend, how the framework would act when we consolidate the watchwords determined in sap report.
Alternative 1.
I tried explicitly specifying UTF-8, but got the same dump.
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING UTF-8 SKIPPING BYTE-ORDER MARK.
Alternative 2.
Then I tried replacing ‘ENCODING DEFAULT’ by ‘ENCODING NON-UNICODE‘.
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
Bingo.. It worked!!!
Troubleshoot screen shows that SAP thinks about the exceptional characters as space. In this way, no issue.
Is this a correct way? I didn’t know and I don’t know till date. Might be some master in this space can toss some light. What I could do best was run Broadened Linguistic structure Check and Code Examiner. Not even one of them gave any advance notice or mistake. Ideally SAP likes it..
Be that as it may, previously being in UNICODE framework, is it great practice to OPEN document utilizing NON-UNICODE encoding? Not certain..
Elective 3.
I additionally took a stab at adding the catchphrase ‘Disregarding Change Mistakes’.
OPEN DATASET p_file FOR Contribution to TEXT MODE ENCODING DEFAULT Disregarding Change Blunders.
The document didn’t dump in that frame of mind also. SAP took care of the change.
Investigate screen shows that the extraordinary person is perused as ‘#’ at runtime. Likewise note that the extraordinary person ‘#’ and the Tab separator ‘#’ appears to be identical.
Presently, I was pondering, will the SPLIT AT TAB (separator) explanation give wrong result. Look how it acts in Troubleshoot.
Despite the fact that it didn’t dump, however the Overlooking Transformation Blunders would add those undesirable ‘#’, assuming we load the information to Drain Framework.
For the present, I accept Elective 2 is alright, however I’m not completely mindful on the off chance that we ought to utilize it or not.
YOU MAY BE INTERESTED IN
Triggering Workflow using Business Transaction Events
The Tech Tamer: Conquering the Monsters of Technical Troubleshooting
SAP Institutes in Ameerpet with Elearning Solutions