Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 
ZCL_EUI_CRC64 class

Source code in github

Why do we need another class?
ABAP has a lot of methods to calutae md5, sha1 or sha256 hashes. But there are some limitation with:

  • Data references

  • Objects

  • Strings & xStrings

  • Tables with complex data types

Main methods

DATA(lo_crc64) = NEW zcl_eui_crc64( ).
lo_crc64->add_to_hash( zsaqo3_general_info ).
lo_crc64->add_to_hash( mt_fld_value ).

rv_hash = lo_crc64->get_hash( ).

Data references

By default mc_dref-data_value, you can calculate and add referenced data to the resulting hash.
Also you can skip them mc_dref-no_info or just compare types mc_dref-type_info.

By default public attributes values are added to the resulting hash.
If you also want to calculate private attributes hashes just add ZCL_EUI_CRC64 to friends.

Strings & xStrings

Processing these data types a little bit tricky. First of all SHA1 hashes are calculating via


respectively. And then these hashes are added to the final result.

Tables with complex data types

Since structures fields and table rows can contain all above mentioned data types, they are processed separately and the resulting hashes are added to the final result.

Show logs

If you want to compare very complex data structures you can pass iv_log = abap_true parameter to the ZCL_EUI_CRC64 constructor, and see which fielde are differ.

Labels in this area