Hello Community,
I'm trying to retrieve data from a Semantic View deployed via the HANA Service Layer Script Engine.
The model has been successfully deployed through SAP Business One (SBO), and I can get the expected results when making requests through Postman.
However, when I attempt to access the same data using the Script Engine, it throws an error.
{
"error": {
"code": 201,
"message": {
"lang": "en-us",
"value": "Invalid query option: NCRNWMSItemCostQuery is not an EntitySet."
}
}
}Script Engine Code:
var queryOption = "$filter=contains(BASE_REF, '" + GIDocNum + "')&$select=CalcPrice";
var costResult = slContext.query("NCRNWMSItemCostQuery", queryOption, false);
// Check result
if (!costResult || costResult.toArray().length === 0) {
return http.response.send(http.HttpStatus.HTTP_BAD_REQUEST, { "error": "No CalcPrice found for base ref " + GIDocNum });
}
I'm wondering if this issue is due to a limitation within SAP or if there's something wrong with my code.
Has anyone encountered a similar problem or found a workaround?
Thank you.
Request clarification before answering.
Hi @ManishPant ,
The last time we checked, the Service Layer Script Engine (JavaScript Extension) did not support Semantic Layer views.
I don’t believe this has changed since then.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.