cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SDK Code in Hana

ramco1917
Participant
294

Hi

  I have below query and i want to do it through SDK for Hana version. Can anyone guide.

 

Select sum(*) from ODPO A
WHERE
A.cardcode = "C00001' and A.Canceled = 'N' and A.Docstatus = 'O'

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

mgregur
Active Contributor

Hi,

 

HANA is Case Sensitive, so your query should take that into account:

Select sum(*) from ODPO A
WHERE
A."CardCode" = "C00001' and A."Canceled" = 'N' and A."DocStatus" = 'O'
 
BR,
Matija
ramco1917
Participant
0 Kudos
Hi All . I want to know how to do it using SDK with c#.
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi ramco1917,

It can be done something as below:

 

Query = @"SELECT IFNULL(SUM(""U_PKGWGHT"") + SUM(""U_BAGWGHT""), 0) AS ""BAGWGHT"" FROM " + TEST.HanaDBName + @".""@PACKINGTABLE"" WHERE ""U_BAGNUM"" = '" + MYBAGNUM + "'";
SAPbobsCOM.Recordset oRs = ((SAPbobsCOM.Recordset)(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)));
oRs.DoQuery(Query);

 

Kind regards,

ANKIT CHAUHAN

SAP Business One Support