Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

exclude range in where clause in scripted calc view

$
0
0

Hi,

We are trying to create a stored procedure or scripted calc view to join 2 tables. Our requirement is something like below:

 

WHERE Substr(SDATA, dynamic_offset, dynamic_length) between range_low and range_high;

 

The difficulty we are facing is that the range_low and range_high are coming from select options (it can be single value, multiple
single values, range, excluding range, excluding outside range). We tried to do it with an internal table and >= and <= in the foll way:

 

FROM:IT_RANGE as range

WHERE 

/* Including Range
*/
              

     (substr(A.SDATA, :i_offset, :i_length) >= range.low  

AND      substr(A.SDATA, :i_offset, :i_length) <= range.high

 

But the difficulty now is with the other options. How to make it work in a way that this could work for all the options that we have in
the SELECT-OPTIONS?

 

We cannot fill the complete range table (and use it as a IN clause) already from ABAP because the field is dynamic (coming from substr(A.SDATA, :i_offset, :i_length)) and it is not possible to get the list in ABAP itself.

 

We prefer to use a scripted calc view, because of the complexity of the above, we put this condition in calculation view itslef and then put the additional where conditions in the ABAP coding itself.

 

Thanks a lot.


Viewing all articles
Browse latest Browse all 5653

Latest Images

Trending Articles



Latest Images

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