Hi,
I am creating a prototype on HANA ALV where i plan to use a calculation view as an input to the ALV. The end user would enter some selection criteria from the selection screen and the result would then be displayed in the ALV.
My query in the calc view looks something like this:
var_out = SELECTDISTINCT B.MATNR AS MATNR, C.ASORT AS ASORT,
A.OBJECTID AS OBJECTID, A.UDATE AS UDATE,
A.UTIME AS UTIME, A.USERNAME AS USERNAME,
A.TCODE AS TCODE, A.CHANGENR AS CHANGENR
FROM CDHDR AS A, MARA AS B, WRS1 AS C
WHERE A.OBJECTCLAS = 'WLK1'
AND A.OBJECTID LIKE'001' || C.ASORT || '%' || B.MATNR || '%';
The problem here i am facing is that the above query in itself takes a lot of time because it joins all the three Db tables and the output is too big.
The query ideally would also atleast have MATNR as input from the end user (as a Range) and that's when the result would be less. And that input would be coming from the selection screen.
something like :
AND B.MATNR IN ('INPUT_1', 'INPUT_2');
But i am not able to understand how to set this value from outside the view itself.
If i undertood correctly then using input parameter i can only set one value and could not pass the range as input. Could you please let me know what would be best approach here.
The HANA ALV consumes the view in such a way:
lo_alv_display = cl_salv_gui_table_ida=>create( iv_table_name = 'EXTV_WSLI' io_gui_container = lo_container_d0555 ).
and then i can set the matnr as range or condition through ALV APIs but if my original query does not contain the additonal condition for MATNR then it is not able to execute as the result is too big.
I would really appreciate any help in this regard. Thanks,
Ashish