Skip to Content
0
May 24, 2016 at 06:12 AM

How to use variable in PLACEHOLDER in a SQL query ABAP progamming.

1297 Views

In ABAP programming I am using one query which fetches data from table. The same query is being used to show result in HANA Studio. Just some syntactical changes. But query contains two placeholder with its value. In abap programming I am trying to convert those placeholder values to parameter. e.g. the query I am using in ABAP programming is as below:

'Select * FROM "_SYS_BIC"."sap.is.retail.car/InventoryVisibilityWithSalesOrderReservedQuantity" (' & '''' & 'PLACEHOLDER' & '''' & '= (' & '''' & '$$P_DateFrom$$' & '''' & ',' & '''' & '20160510' & '''' & '),' & '''' & 'PLACEHOLDER' & '''' & '= (' & '''' & '$$P_DateTo$$' & '''' & ',' & '''' & '20160510'

& '''' & '))'.

This query is giving me proper result. But I want to use parameter in place of date value (Highlighted in RED). I am not sure about the syntax to use varibles in this kind of query. Please let me know if anyone is having any info.

WR,

Sumanjit