on 2020 Jun 25 6:11 PM
I'm passing some ids in the form of JSON to backend sap server. The query I wrote is hitting the method but I'm unable to find in which variable I will get the input values.
Thanks and Regards
Naveen
Request clarification before answering.
Hi Naveen,
You might need to elaborate this little more. I see that you have written a read call to GetEntitySet.
I understand that you need to pass these ID's to the backend, may be to filter out the results.
You cannot send JSON object to read call. What you need instead is to send this ID's as a filter parameter ?$filter.
Read call is suppose only to get the information from the backend based on the request you made.
The request can have filters, orderby or select statement.
I hope it clarify your doubt.
Thanks
Prashil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you doing function import. Use below code to get jason data.
DATA : Lt_data type <structure> " fields which you are getting from frontend.
** ************************** BAckend
READ TABLE it_parameter WITH KEY name = 'JSONData' ASSIGNING FIELD-SYMBOL(<fs_parameter>).
IF sy-subrc EQ 0.
/ui2/cl_json=>deserialize( EXPORTING json = <fs_parameter>-value
pretty_name = abap_false
CHANGING data = lt_data ).
****************Frontend
this.getOwnerComponent().getModel().callFunction("/<fucntion import>", { method: "POST", urlParameters: { JSONData: JSON.stringify(this.<entries array>),
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 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 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.