Unicode check with Code Inspector
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:
Set Unicode flag to all the report sources before executing the check in the constructor method.
Or – optional – by a parameter:
Code inspector class
Copy class CI_TEST_SYNTAX_CHECK to your namespace.
Adapt copied CI class:
- Replace the class names in your new class.
- In the local friend definition of the unit test with your new created class.
- In the class constructor of the test class
- In attribute C_MY_NAME:
- In method IF_CI_TEST~QUERY_ATTRIBUTES
- In attribute REF_CHECK
- Optional: modifications for Unicode check as using a parameter.
- Adapt data transfer methods
- 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)
Prepare code inspector
Activate your test (class)
Create public check variant
Activate your check and set attribute for code inspector
Example Use check in AT
The created check variant can be used in various scenarios e.g. during transport release.
Set check variant & activate inform on errors
With this settings, the UC check is performed on release.