Quantcast
Channel: SCN: Message List - Push down SELECT-OPTIONS to HANA
Viewing all articles
Browse latest Browse all 9

Re: Push down SELECT-OPTIONS to HANA

$
0
0

data: vint type int.

SELECT-OPTIONS: S_NAME FOR VINT.

 

DATA: VSTRING TYPE STRING.

 

DATA: VCOUNT TYPE I

 

 

LOOP AT S_NAME .

         CONCATENATE S_NAME-LOW  VSTRING INTO VSTRING SEPARATED BY ','

 

ENDLOOP.

 

VCOUNT   = STRLEN( VSTRING )

 

VCOUNT = VCOUNT - 1.

 

VSTRING = VSTRING(VCOUNT).        " Remove the comma in the last position of strng and Now vstring contains all the values.

 

 

" Prepare native SQL

LV_SQL = |SELECT * FROM <SCHEMA_NAME>.<HANA_VIEW> WHERE NAME IN (| && VSTRING && |)|.

 

 

CREATE OBJECT LO_SQL.

LO_RESULT = LO_SQL->EXECUTE_QUERY( LV_SQL ).

 

GET REFERENCE OF IT_HEADER INTO LR_DATA.

LO_RESULT->SET_PARAM_TABLE( LR_DATA ).

LO_RESULT->NEXT_PACKAGE( ).

LO_RESULT->CLOSE( ).

 

Please not that above logic will work only for single multiple entries i.e. SIGN = 'I' and OPTION = 'EQ'.

 

 

Thanks and Regards,

Nagaraj


Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>