2015 Jun 30 7:27 AM
I AM GREETING BELOW ERROR WHILE UPDATING ZTABLE THROUH ODATA.
I AM FOLLOWING BELOW PROCEDURE
1) Execute GET to read single entity /sap/opu/odata/sap/ZUSERINFO_SRV/UserCollection('Test')
2) Click Use as Request button
3) Update your request properties.
4) Select HTTP method as POST
5) Query as /sap/opu/odata/sap/ZUSERINFO_SRV/UserCollection and execute
PLEASE HELP
2015 Jun 30 7:44 AM
Hi Praveer
I have create one ztable and i want to update ztable through Odata but getting attached error screen shot
2015 Jun 30 7:29 AM
Hi Ajay,
While kind of data are you trying to update through oData service.
Regards,
Praveer.
2015 Jun 30 7:44 AM
Hi Praveer
I have create one ztable and i want to update ztable through Odata but getting attached error screen shot
2015 Jun 30 7:48 AM
Hi Ajay,
Can you share the update code, just wondering how are you updating the information / data and what kind of data consist in your internal table or array when you are passing in odata service / URL.
Regards,
Praveer.
2015 Jun 30 8:22 AM
method USERCOLLECTION_UPDATE_ENTITY. DATA: ls_request_input_data TYPE zcl_zuserinfo_mpc=>ts_user, ls_key_tab TYPE /iwbep/s_mgw_name_value_pair, lv_userid TYPE zuserinfo-userid, ls_userinfo TYPE zuserinfo. * Get key values READ TABLE it_key_tab WITH KEY name = 'Userid' INTO ls_key_tab. lv_userid = ls_key_tab-value. IF lv_userid IS NOT INITIAL. * Read request data io_data_provider->read_entry_data( IMPORTING es_data = ls_request_input_data ). * Update fields of table ZUSERINFO UPDATE zuserinfo SET firstname = ls_request_input_data-firstname lastname = ls_request_input_data-lastname email = ls_request_input_data-email phone = ls_request_input_data-phone country = ls_request_input_data-country WHERE userid = lv_userid. IF sy-subrc = 0. er_entity = ls_request_input_data. "Fill exporting parameter ER_ENTITY ENDIF. ENDIF. endmethod.
2015 Jul 01 7:52 AM
2015 Jul 01 9:39 AM
What you think? Maybe it would be nice if you shared the solution? After all, you were expecting the community to help you with the issue - why not help the community by sharing what you discovered?
"I got the solution" isn't massively helpful to anyone. In fact it's more frustrating than this scenario:
2015 Jul 01 9:58 AM
Hi Matthew Billingham ,
I am trying to update multiple records that why it throw error.
Update and create Record one by one only. Follow below guide line.
Data Operation HTTP Method Create POST Insert
fromRead GET Select Single * FromintoUpdate PUT/PATCH UpdatesetDelete DELETE Delete fromQuery GET Select * FromInto Table Regards Ajay Singh Bisht
Message was edited by: Matthew Billingham - attempted to make it a bit more clear
2015 Jul 01 10:20 AM
Great. Now please mark it as the correct answer for any future searchers.