cancel
Showing results for 
Search instead for 
Did you mean: 

Expose Custom schema view on Service Layer SAP B1 ON HANA

dimtriant_
Explorer
0 Kudos

Is it possible to expose a HANA DB view on Service Layer with the same way as on MSSQL Server using the post call https://server:50000/b1s/v1/SQLViews('B1_TESTB1SLQuery')/Expose ?

Accepted Solutions (0)

Answers (3)

Answers (3)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi dimtriant_,

Last time when I checked, arithmetic operations were not supported in SQLQueries.

It only supports a limited subset of SQL.

As this is not essential, users can do the operation in the client side.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi dimtriant_,

For both the Customized Views and Semantic Layer Views in SAP Business One, version for SAP HANA, it is required to expose the views to Service Layer first.

For this, you need to use the option 'Enable for Service Layer' or 'Service Layer Expose'.

As far as I know, there is no such option as you are looking for.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

hdolenec
Contributor
0 Kudos

If you are talking about calculation views from semantic layer, you need to tick "Enable for Service Layer" checkbox in both Content package tool and when deploying package in B1. Then it will be accessible from service layer.

As for custom DB views (created via CREATE VIEW syntax), they are not supported on SL. But you can create a view directly on service layer and then you are able to query it.

POST https://server:50000/b1s/v1/SQLQueries
{
 "SqlCode": "TestOINV",
 "SqlName": "TestOINV",
 "SqlText": "select top 10 T0.ObjType, T0.DocNum, T0.DocDate, T0.CardCode, T0.DocTotal, T1.CardName 
 FROM OINV T0 
 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode 
 WHERE T0.CANCELED = 'N'"
}

GET https://server:50000/b1s/v1/SQLQueries('TestOINV')/List

dimtriant_
Explorer
0 Kudos

Does arithmetic operations supported on SQLQueries?