sqlca format placeholders

Working with place holder:

 

You must convert beas variables and beas place holders always in correct format

 

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

 

 

use follow 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 fomrat, then the sql command is not stable in 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