Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unicode Compliant: Sample test plan

Former Member
0 Kudos

We are trying to make all Z objects Unicode compliant in Non-Unicode system.

After checking Unicode flag in program attributes, what are the important points which any developer should check to make sure changes are working Ok

4 REPLIES 4

uwe_schieferstein
Active Contributor
0 Kudos

Hello Manali

You need to run transaction UCCHECK (SAP release >= 6.20) and remove all errors displayed with a red LED.

Warnings (yellow LED) may be corrected as well but usually there are so many of them that you do not have the time to remove them.

You need to test the ABAP file interface (OPEN DATASET) very carefully because it makes a difference whether you open or write a file as UTF-8 / NON-UTF-8 on Unicode / non-Unicode system.

Further reading: [SAP Network Blog: Unicode File Handling in ABAP|/people/ulrich.brink/blog/2005/08/18/unicode-file-handling-in-abap]

Regards

Uwe

Former Member
0 Kudos

Off the top of my head... (ok not really, I did a little looking back at old code)

-"Open Dataset" needs the "encoding" statement added to it. Like

OPEN  DATASET F_FILELIST FOR INPUT IN TEXT MODE encoding default.

-Anywhere where you have inserted a carriage return/Line feed could need attention. Like....

data: v_cr(1) type c.   "Carrage return = '0D'
FORM get_CR_character .
  data: f_cr_hex(5) type c value ''.
* Unicode/4.7 Upgrade Fix 21/9/2005
  CALL FUNCTION 'STPU1_HEX_TO_CHAR'
    EXPORTING
      HEX_STRING       = '\X\0D'      "Carrage return
    IMPORTING
      CHAR_STRING       = f_cr_hex.
  v_cr = f_cr_hex.
ENDFORM.                    " get_CR_character

-Closing files that didn't open properly

OPEN DATASET V_DEV_NULL FOR OUTPUT FILTER V_COMMAND in text mode encoding default.
  IF SY-SUBRC <> 0.
    RAISE WORKFILE_DELETE_ERROR.
  ENDIF.
* Unicode/4.7 Upgrade Fix 
* Added the TRY/CATCH as now if there are no files to process,
* then core dumps when it tries to CLOSE it
  try.
    CLOSE DATASET V_DEV_NULL.
    catch CX_SY_FILE_CLOSE.
  endtry.

-Describe statements

DESCRIBE FIELD IT_DATA_MEDIUM LENGTH F_MEDIUM_SIZE in character mode.

-Structure assigning (or overlaying)

* Unicode/4.7 Upgrade Fix 
field-symbols: <G_FROM_STRUCT> type x.
field-symbols: <G_TO_STRUCT>   type x.
*  F_RECORD = IT_RAW.
  assign IT_RAW           to <G_FROM_STRUCT> casting.
  assign F_RECORD         to <G_TO_STRUCT>   casting.
  <G_TO_STRUCT> =  <G_FROM_STRUCT>.

-Tab characters

CONSTANTS:  c_delimiter TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.

-Substring commands can cause issues

-Function Module WS_UPLOAD and WS_DOWNLOAD changed to GUI_UPLOAD and GUI_DOWNLOAD

0 Kudos

Hi, i cant get your second point. can you please explain me and post in manju.chintha@gmail .com ...... Please ..........

Former Member
0 Kudos

Thanks for all these suggestion..

-We did UCCheck

-Complied all list

-Made required changes in development

-Now we have to check Unicode flag and test program.

I am trying to come up with generic test script which will be applicable to most of the ABAP..

I was thinking of dividing testing in following categories..

-Interface

*Inbound

*Outbound

-Function Group

-Class/Methods

-Reports

-User exits / enhancements and bolt-ons

-BSPs

As suggested by you for interfaces it is important to test

-open/close data set is functioning as per expectation

-Describe is length is returning right count etc

I want to understand, excluding above, are there any important steps which should be included in test script.