cancel
Showing results for 
Search instead for 
Did you mean: 

Service Layer SQL QUERY 502 Proxy Error When retrieving list of results

masharipovfarrux
Discoverer

Hello, I wanted to implement new Service Layer - SQL Querying feature, which was introduced recently

https://blogs.sap.com/2021/01/08/new-sap-business-one-service-layer-sql-query/

I created SQL Query like

POST
https://51.15.155.70:50000/b1s/v1/SQLQueries
{"SqlCode":
"sql09","SqlName":
"queryOnItem11811111","SqlText":
"select TOP 1 ItemCode, ItemName, ItmsGrpCod from oitm"}

It was created successfully

Then i retrieved query like

GET https://myserver:50000/b1s/v1/SQLQueries('sql09')

and it was successful too

BUT when i tried to retrieve list of results

GET
https://myserver:50000/b1s/v1/SQLQueries('sql09')/List

I got this error 502 Proxy error

Has anyone faced the same problem? How can i solve it?

I thought that the reason is that response contains many rows, so tries the following

1. Created query with TOP 1 to ensure that i'm gettin only 1 row

2. Added page size into header of GET query like Prefer: odata.maxpagesize=5 and Content-Type: application/json; charset=UTF-8; Tried to add each header separately, and both headers into query

3. Tried with POSThttps://myserver:50000/b1s/v1/SQLQueries('sql09')/List

Thank You in advance!

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear masharipovfarrux,

Have you been able to check the logs?

Refer to the following topics in SAP Note 2607373:

  • Steps to enable detailed Service Layer error logs [error_50000_log_xxxx_xx_xx]
  • Steps to enable detailed SAP Business One logs for Service Layer operations

Kindly enable both these logs and send those to us. Please help to do it in the following way:

  • Enable both the detailed logs.
  • Use Postman to login. Note the exact time when you login.
  • Send GET request 3-4 times to Service Layer to process and reproduce the issue. Note the exact time for this process.
  • Collect the detailed logs.
  • Disable the detailed logs as mentioned in SAP Note 2607373.
  • Check what is being captured in the logs.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

masharipovfarrux
Discoverer
0 Kudos

Dear ankit.chauhan1, thank You for response.

I have tested many queries and found that, the issued was that my resultset contained Cyrillic letters. I tried other queries that do not have cyrillic letters or queries that contain only numeric data, all of them worked.

Look, for example

When i create query like select ItemCode from OITM everything works fine. But when i create query like select ItemName from OITM i get an error

So the new question is how can i enable Cyrillic letters in my queries?

Thank You in advance!

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear masharipovfarrux,

I have forwarded this information to my Development Team. I will update you once there is any information.

If you would like to follow-up, you can create an incident under the component SBO-SDK-SVL for SAP Business One Support Team. Kindly mention the link of this communication while creating the incident.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Dear masharipovfarrux,

This issue was forwarded to our Development Team and has been documented in SAP Note 3029055 which will be released soon.

The issue is supposed to be fixed in Feature Package 2105 of SAP Business One Version 10.0. Be advised that the time-frame is subject to change without any further notice.

If you do not have any further question, kindly help to close this thread.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

masharipovfarrux
Discoverer
0 Kudos

Thank You very much!

Answers (0)