on 2021 May 19 7:14 AM
Hi All,
I have created an XSODATA service using a calculation view with multiple input parameters. Below is the code syntax.
service { "xxx_pal2::PAL2_INTRADAY_FORECAST" as "xyz" with ("LocationId", "ForecastDate", "StartTime", "EndTime", "ForecastValue" ) keys generate local "ProductId" parameters via entity "InputParams";}
When I try to preview data in browser. It throws error.
URL 1 : https://Port//Package/PAL2_INTRADAY_FORECAST.xsodata/xyz?$format=json
error:
{ "error": { "code": "", "message": { "lang": "en-US", "value": "Resource not found for the segment 'xyz' at position 0."}}}
URL 2:
https://Port//Package/PAL2_INTRADAY_FORECAST.xsodata/InputParams(P_SAPClient='100',P_DiagnosticId='0',P_SlotTimeFrame='120',P_DateFrom='0',P_DateTo='0',P_ForecastDateFrom=20210429,P_ForecastDateTo=20210429)/Results?$format=json
error:
{ "error": { "code": "", "message": { "lang": "en-US", "value": "Illegal query syntax."}}}
Could you please check if I am passing input parameter correctly? I have also attached metadata screenshot.
Request clarification before answering.
The 2nd URL has the right format, but I guess you get the error, because of how you pass the date parameters (P_DateFrom, P_DateTo, P_ForecastDateFrom, P_ForecastDateTo).
If the parameters are typed as strings you have to enclose it in single quotes, if they are real dates, you should pass it like following, for instance:
P_ForecastDateFrom=datetime'2021-05-19'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 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.