Before you start reading this blog it is good to read the blog series.
Before going for optimization, the existing custom code should result as expected after SAP HANA migration. In general the custom code should work perfectly as expected after migration until unless
The above checks can be identified using functional check. SAP provides tools to identify them and suggestions are given on the tool for the identified issues to correct them to work as expected.
The above source code shows an example of usage of DB hint in the SQL Query. The DB hint (from Oracle DB) is enforcing the SQL query to use the index defined at the DB level which means that post SAP HANA migration this index becomes invalid and leads to functional issues.
Have a look at the code which is reading data from the table “EKPO” which was a cluster / pool table before migration. After migration to SAP HANA this table becomes transparent table. The code is written to fetch the records from the table “EKPO”. The following statement reads the internal table “IT_BKPF” using binary search. Binary search, expects the internal table sorted by key attributes. If not, the search fails. The code works perfectly fine before migrating to SAP HANA as the internal table “IT_BKPF” is sorted by default as it is implicit behavior of cluster / pool table. Post migration to SAP HANA, this statement fails as the internal table “IT_BKPF” is not sorted. Hence before using the binary search on the internal table an explicit sort (based on primary key at least) is needed to make sure the migrated report / custom code results the same output.
SELECT
awkey
gjahr
belnr
xblnr
bldat
FROM bkpf " BYPASSING BUFFER
INTO CORRESPONDING FIELDS OF TABLE it_bkpf
FOR ALL ENTRIES IN lt_invoice_details
WHERE
gjahr = lt_invoice_details-gjahr AND
xblnr = lt_invoice_details-xblnr AND
awkey = lt_invoice_details-awkey.
“…… Some calculations
READ TABLE it_bkpf WITH KEY gjahr = invoice_details-gjahr
xblnr = invoice_details-xblnr
awkey = invoice_details-awkey
BINARY SEARCH
TRANSPORTING belnr bldat.
IF sy-subrc = 0 .
“ Further calculations
ENDIF.
SAP Provides tools to identify such issues during migration to SAP HANA. The tool ATC (ABAP Test Cockpit) helps to identify the functional issues.
The code inspector tool helps to identify the functional issues and potential performance issues. These checks are static check based on the custom code. SAP has improved the code inspector tool with more checks to identify the functional issues which can occur after migrating to SAP HANA. For SAP HANA, ATC is the tool for preparing the custom code for functional correctness and detecting custom code for potential optimization.
The code inspector tool is available to find all the functional issues easily. The image below shows the new checks added to the tool and its purpose. There are new checks added under category,
The blog series would discuss the different phases of the custom code management as follows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 |