on 10-03-2018 5:39 PM
Hello experts,
I want to read response of Northwind oData with xsjs and then put some of that values in hana mdc table, but i found this error trying to retrieve response. Suggestions?hanamdcxsjs.png
You are executing the xsjs via a scheduled job. The $.response object is only available in a web session (when you call the xsjs e.g. via a browser), but not when it is executed as job. If you wanna "return" something in your case, you have to persist the necessary information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The solution depends on what you wanna do? As said you cannot use the $.response object to return the result of the API call, because the xsjs coding is executed as job. Maybe if you share more details about your use case (who uses that, why it has to be executed as job ...) hints can be given for a more appropriate direction.
Then if you wanna store the data, why trying to return the result in the response body (as mentioned $.response is not available). Actually it seems that the determination of the result provided by the external OData API call works, and just the setting of response body fails. Replace the logic in your coding using the $.response with the logic to store the data, than it should/will work.
Hi,
I faced the same issue; As xsjob unabled to understand the $.response statements, we need to comment those lines then after it worked fine for me. If I understood your requirement correctly, you need to write some script to parse the response(for instance; XML or JSON or Tab separated Values response) and construct proper records and insert them into Hana tables.
Kind regards
Chenna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.