Monday 12 May 2008

SAP/ABAP - Unicode conversion

Due to expansion, my client is currently involved in Unicode conversion exercise which is due next week. The project has started quite a while back and as usual, most of the code changes had been outsourced to third party which seems to outsource it to you-know-where region. Anyway, found out that many of these programmers were interested in getting the codes past the syntax check and not more. 

Anyway, for those who are doing Unicode conversion, the following might be helpful:
  1. Transaction UCCHECK is available and very helpful to do a first time check on what needs to be changed in your coding.
  2. OSS Note/SAP Marketplace is the first place to pay a visit when you're working with copied version of standard code. There might be some codes that have been changed to reflect the Unicode support, especially if they've to do with file interfaces.
  3. Carriage return & line feed (CRLF) which has been denoted as hex '0D0A' all this while will fail during execution, change it to cl_abap_char_utilities=>cr_lf.
  4. Any calls to the old Function Modules WS_DOWNLOAD and WS_UPLOAD need to be changed to GUI_DOWNLOAD and GUI_UPLOAD.
  5. Any direct assignment of non-compatible structure will surely fail, do a casting instead, especially from type P to type C. 
  6. To make life easier, use method cl_abap_container_utilities=>fill_container_c to assign structure of mix types into a string/text.
  7. OPEN DATASET, for syntax which specify IN TEXT MODE, you need to add the ENCODING, the easiest is by DEFAULT, but if you found a syntax which does not specify the TEXT MODE, be very very careful. It might be opened in BINARY mode in previous release and need to be tested very carefully or otherwise, the file produced by your code will be garbled. There are few OSS notes related to this, check them out.

No comments:

Calling MS SQL Stored Procedure from ABAP

One of the few things sometime coming up in your ticket request. Calling stored procedure from ABAP to remote SQL server.  How do we send th...