on 04-21-2016 5:22 PM
Hi folks,
I am having a requirement to get sharepoint lists into SAP. I have created already a odata model based on XML output of the sharepoint db. I am struggling now to get the data from sharepoint into SAP.
Most examples which I found so far are working the other way round, so SAP data is offered to outside world.
Anybody any idea how I can do this? I guess somehow I have to trigger the sharepoint services like List, but I have no clue how.
Any idea, help, suggestion is much appreciated.
Regards, Thomas
Hi there,
yes, i was using TO /iwfnd/cl_sutil_client_proxy as well and also /IWFND/CL_SUTIL_ODATA_MAPPER
The http reply has to be converted into a DOM object which can then be parsed by using interface if_ixml_document
Hope that helps, Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thomas,
There is no official OData client-library available within ABAP.
But if you are ready for some hard work, class /IWFND/CL_OCI_REQ_PROCESSOR should put you in right direction. This class is part of this product.
This product consumes an external OData service, so should ideally have the code you require.
Regards
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
thanks for your reply.
I made some progress which I would like to share:
I was able to import a WDSL file via tcode SEGW and corresponding Runtime Artifacts were created .
I wrote a little ABAP report that calls method WEB_REQUEST of class /IWFND/CL_SUTIL_CLIENT_PROXY
The method returns a xstring and with the help of type definitions of the Model Provider Class and a call of method CONVERT_TO_ABAP of class /IWFND/CL_SUTIL_ODATA_MAPPER I got an internal table with the structure and the data of the sharepoint list.
I am facing now the following problem: Objective is to have a generic datasource in BW that pulls sharepoint lists from sharepoint server. However so far I was not able to store somewhere userid/password therewith the described procedure runs in background.
Any thoughts on this?
Kind REgards, Thomas
One option may be is to pass user name and password through HTTP headers and then utilizing them within the DPC/MPC for the Sharepoint call.
DATA: lo_facade TYPE REF TO /iwbep/if_mgw_dp_int_facade,
lt_request_headers TYPE tihttpnvp,
ls_request_headers LIKE LINE OF lt_request_headers.
* Read the HTTP Request headers.
lo_facade ?= /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).
lt_request_headers = lo_facade->get_request_header( ).
Hi Atanu,
thanks for replying.
finally I got there:
I created a RFC connection in SM59 pointing to sharepoint server.
In my ABAP I had to pass the SM59 connection to the request like hereafter:
l_s_header-Name = '~request_uri'.
l_s_header-value = p_url.
append l_s_header to l_it_header.
l_s_header-Name = '~request_method'.
l_s_header-value = 'GET'.
append l_s_header to l_it_header.
l_s_header-Name = 'sm59_http_dest'.
l_s_header-value = 'xxx.xxx.xxx.xxx'.
append l_s_header to l_it_header.
CALL METHOD LC_REF->WEB_REQUEST
EXPORTING
IT_REQUEST_HEADER = l_it_header
IMPORTING
EV_RESPONSE_BODY = l_xstring
That's it!
Hi Krishna,
I didnt get how to use class /IWFND/CL_OCI_REQ_PROCESSOR, will check on this
We have same kind of requirement now where in SAP need to read and post data in MES system, earlier it was done using SOAP(Sproxy...wsdl) protocol but now client want to use rest(odata).
We are able to do small poc where in we used /IWFND/CL_SUTIL_CLIENT_PROXY to send data, but the complete solution found.
Did you found any way for using SAP odata.
Regards,
Abhijeet Kankani
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.