CRITICAL
Rule Definition
Database hints provide a means to bypass the DBMS optimizer by passing additional information directly to the database interface, DBSL or the underlying database system in order to allow these components to optimize certain data access. See SAP Note 1622681 for the supported DBSL hints for SAP HANA.
Hints are specific for one system configuration and its quantity structure. For this reason only use hints in the standard SAP system with caution.
It is not recommended to use hard-coded hints for specific databases in your reports, function modules etc.
Remediation
Do not use hints for databases that are not listed in SAP note 129385 "Database hints in Open SQL".
Violation Code Sample
SELECT guid partner_no partner_fct
FROM crmd_partner
INTO TABLE lt_crmd_partner
FOR ALL ENTRIES IN lt_links
WHERE guid EQ lt_links-guid_set AND partner_fct IN lt_proc_ranges
%_HINTS DB6 '<IXSCAN TABLE=''CRMD_PARTNER'' INDEX=''"CRMD_PARTNER~SET"'' />'.
Fixed Code Sample
SELECT guid partner_no partner_fct
FROM crmd_partner
INTO TABLE lt_crmd_partner
FOR ALL ENTRIES IN lt_links
WHERE guid EQ lt_links-guid_set AND partner_fct IN lt_proc_ranges.
Reference
SAP - Considerations for Custom ABAP Code When Migrating to SAP HANA - Best Practices and Recommendations
Related Technologies
Technical Criterion
Efficiency - SQL and Data Handling Performance
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.