Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
7,177

Generally open SQL DB Hints are not recommended in programs and needs to be replaced  with equivalent statements  while migrating to HANA DB.

But if the performance of “Select for all entries “  is poor in programs  then SAP HANA Specific DB Hints may help optimize the code.


If the select Query is as below

SELECT VBELN POSNR MATNR

FROM VBAK

INTO CORRESPONDING FIELDS OF TABLE LT_RESULT

FOR ALL ENTRIES IN LT_VBAK

WHERE VBELN = LT_VBAK-VBELN.

If the performance of the above statement is poor, the equivalent statement with DB Hints that can be checked would be

DATA: L_T_TABLNM TYPE RSDU_T_TABLNM,

L_LINES TYPE I,

L_HINT TYPE RSDU_HINT.

APPEND 'TAB1' TO L_T_TABLNM.

L_LINES = LINES( LT_VBAK ).

CALL FUNCTION 'RSDU_CREATE_HINT_FAE'

EXPORTING

I_T_TABLNM = L_T_TABLNM

I_FAE_FIELDS = 3

I_FAE_LINES = L_LINES

I_EQUI_JOIN = RS_C_TRUE

IMPORTING

E_HINT = L_HINT

EXCEPTIONS

OTHERS = 0.

SELECT VBELN POSNR MATNR

FROM VBAK

INTO CORRESPONDING FIELDS OF TABLE LT_RESULT

FOR ALL ENTRIES IN LT_VBAK

WHERE VBELN = LT_VBAK-VBELN

%_HINTS ADABAS L_HINT.

1 Comment
Labels in this area