on 2025 Apr 03 1:31 PM
Hi,
i am encountering a Problem in SAP-BusinessOne 10 FP2502
The like-Expression does not work.
I think this is a bug.
kind Regards,
Matthias Lakämper
----------------------------------------------------------------------------------------------------------
Request clarification before answering.
Hello,
You can use the SQLQueries entity, you have more possibilites to work with queries.
Here is a sample:
You send a POST to the endpoint b1s/v1/SQLQueries
The payload:
{
"SqlCode": "Demo_Q1",
"SqlName": "Demo - list of Salesorder",
"SqlText": "SELECT T0.[DocNum],T0.[DocDate], T0.[DocDueDate], T0.[CreateDate] FROM ORDR T0 WHERE T0.[CardName] like '002%' order by T0.[Createdate] desc"
}
It will create the query with ID "Demo_Q1. You can then list the result by sending a POST to the endpoint b1s/v1/SQLQueries('Demo_Q1')/List
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello William,
thank you for your Answer, i know that possibility.
But i need the functionality within CAP-Sql
eg. cds-repl-Command: (Standard for Odata).
qx = B1Svl.run(SELECT.columns('CardCode', 'DocNum').from('B1Svl.Orders').where `CardName like '001%' `
and here i get the error...
So my opinion is, that is a bug and should be fixed.
Kind Regards,
Matthias
Hi MatLakaemper,
It appears that Service Layer does not support like operator.
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.
Hi Ankit,
thanks for the link,
so the solution is:
GET {{SboServicelayerHost}}Orders?$select=CardCode,DocNum,CardName&$filter=startswith(CardName, 'W')
GET {{SboServicelayerHost}}Orders?$select=CardCode,DocNum,CardName&$filter=contains(CardName, 'Way')
that works for me.
kind Regards,
Matthias
| User | Count |
|---|---|
| 26 | |
| 18 | |
| 14 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.