sqlca format placeholders

Working with place holder:

 

You must always convert Beas variables and placeholders in the correct format.

 

select "ItemName" from "OITM" where "ItemCode"=<dw_1.item.itemcode.value,dbstring>

 

 

Use the following format:

String

dbstring

Number

num(6)

DateTiem

dbdate

 

 

Format dbstring

Use dbstring format for format string commands to SQL String format

Example 1:

select "ItemName" from "OITM" where "ItemCode"=<dw_1.item.itemcode.value,dbstring>

 

Differences between MSSQL and HANA

Example:

setvar=ls_itemcode=my"Item"
select .. where "ItemCode"=<itemcode,dbstring>

 

Convert - Result in MSSQL:       where "ItemCode"=N'my "Item"'

Convert - Result in HANA:         where "ItemCode"='my "Item"'
 

Format dbdate

use dbdate to format dates in sql-string:

select "kwid" from "BEAS_KALENDER" where "datum_id"=<mydatecolumn,dbdate>

 

Format num()

use format num(x) for decimal:

x=count of decimal numbers. In beas standard we use always 6 decimal places.

sql=update "MYTABLE" set "quantity"=<myquantity,dbnum(6)>

 

 

Note:

If you don't use the correct format, the SQL command will not be stable in a different environment.

Example:

- Problem with Unicode

- Problem with ' inside Strings

- Problem with windows regional settings for Dates and Numbers

- Problem with different syntax between MSSQL and HANA