Skip to Content

Some companies still run non unicode SAP systems. if you plan to convert your system to unicode, you can run UCCHECK regularly on your system, or add the unicode check to the code inspector framework and perform the check e.g. during release of transports or create a list with links to the source code using code inspector / ATC.

The attached document shows how to create an own CI test class performing the unicode check.

Create checker classes

Base syntax check class

Copy class CL_CI_SOURCE_SYNTAX_CHECK to your own namespace:

/wp-content/uploads/2016/03/1_905927.png

Set Unicode flag to all the report sources before executing the check in the constructor method.

Either fixed:

/wp-content/uploads/2016/03/2_905928.png

Or – optional – by a parameter:

/wp-content/uploads/2016/03/3_905929.png

/wp-content/uploads/2016/03/4_905933.png

Code inspector class

Copy class CI_TEST_SYNTAX_CHECK to your namespace.

Adapt copied CI class:

  1. Replace the class names in your new class.
    1. In the local friend definition of the unit test with your new created class.

      /wp-content/uploads/2016/03/5_905935.png

    2. In the class constructor of the test class

      /wp-content/uploads/2016/03/6_905939.png

    3. In attribute C_MY_NAME:
      /wp-content/uploads/2016/03/7_905940.png
    4. In method IF_CI_TEST~QUERY_ATTRIBUTES

      /wp-content/uploads/2016/03/8_905941.png

    5. In attribute REF_CHECK

      /wp-content/uploads/2016/03/9_905942.png

    6. Optional: modifications for Unicode check as using a parameter.
      1. When using Unicode parameter in constructor of base syntax checker class, you can pass the parameter in the GET method:
        Fixed

        /wp-content/uploads/2016/03/10_905943.png

      2. Or create a parameter in your CI class for the UCCHECK
        1. Create attribute

          /wp-content/uploads/2016/03/11_905944.png

        2. Adapt IF_CI_TEST~QUERY_ATTRIBUTES to provide parameter

          /wp-content/uploads/2016/03/12_905945.png

 

  1. Adapt data transfer methods
    1. PUT_ATTRIBUTES
      /wp-content/uploads/2016/03/13_905946.png
    2. GET_ATTRIBUTES
      /wp-content/uploads/2016/03/14_905947.png
  2. Change the description of the test in the constructor, to find it afterwards in the CI tree.
    (Length of the text symbol as to be adapted)

/wp-content/uploads/2016/03/15_905948.png

Prepare code inspector

Activate your test (class)

/wp-content/uploads/2016/03/16_905949.png

/wp-content/uploads/2016/03/17_905950.png

Create public check variant

/wp-content/uploads/2016/03/18_905957.png

Activate your check and set attribute for code inspector

/wp-content/uploads/2016/03/19_905958.png

Example Use check in AT

The created check variant can be used in various scenarios e.g. during transport release.

Prepare ATC

Set check variant & activate inform on errors

  /wp-content/uploads/2016/03/20_905959.png

With this settings, the UC check is performed on release.

/wp-content/uploads/2016/03/21_905978.png

/wp-content/uploads/2016/03/22_905979.png

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply