Hi Rossi
I think you got my question clearly. let me help you more. I am pasting some of code lines. Let me know whether we can use variable in place of dates.
lr_dbconn = cl_sql_connection=>get_connection( con_name = lv_con ).
create object lr_sql_env
exporting
con_ref = lr_dbconn.
*Define sql script
lv_sql = 'Select * '.
lv_from = 'FROM "_SYS_BIC"."sap.is.retail.car/InventoryVisibility'.
lv_from1 = 'WithSalesOrderReservedQuantity" (' & '''' & 'PLACEHOLDER' & '''' & '= (' & '''' & '$$P_DateFrom$$' & '''' & ',' &
'''' & '20160510' & '''' & '),' & '''' & 'PLACEHOLDER' & '''' & '= (' & '''' & '$$P_DateTo$$' & '''' & ',' & '''' & '20160510'
& '''' & '))'.
concatenate lv_from lv_from1 into lv_from respecting blanks.
lv_where1 = 'WHERE "SAPClient" = ''' && V_CLIENT && ''''.
lv_where2 = 'AND "Location" = ''' && V_PLANT && ''''.
lv_where3 = 'AND "Article" = ''' && V_ARTICLE && ''''.
I am consolidating all the lv_* variables. & executing the query to run in HANA Studio.
Thanks
Sumanjit