Skip to Content

Connecting SAP and Sharepoint by ABAP and WebDAV

Hello everybody,

I'm trying to read and write files from our SAP system (ERP) to Sharepoint (in the Office365-cloud). I think WebDAV is the way to go, so after some searching I came to this testprogram.

p_host TYPE string DEFAULT 'https://<companyname>' LOWER CASE ,
p_url  TYPE string DEFAULT '/sites/<dir1>/<dir2>/' LOWER CASE,
p_unam TYPE string DEFAULT '<user email>' ,
p_pwd  TYPE string LOWER CASE.

  lo_connection TYPE REF TO if_swdcl_connection,
  lo_client     TYPE REF TO if_swdcl_client,
  lo_namespace  TYPE REF TO if_swdcl_namespace_client,
  l_content     TYPE xstring,
  lo_error      TYPE REF TO cx_root,
  ip_http_client TYPE REF TO IF_HTTP_CLIENT.

DATA: mt_tab TYPE sdavc_tt_resource_data,
      ms_tab TYPE sdavc_ts_resource_data,
      prop TYPE REF TO if_swdcl_property_client.

      lo_connection = cl_swdcl_connection=>create_by_user(
        i_server      = p_host
        i_user        = p_unam
        i_password    = p_pwd

      lo_client = cl_swdcl_client=>get_instance( lo_connection ).

      prop = lo_client->get_property_client( ).
            i_url                 = p_url
            i_depth               = '1'  
            rt_resources          = mt_tab 

      LOOP AT mt_tab INTO ms_tab.


As a first step I'm trying to read the contents of the directory, but I keep getting HTTP error 400 "ICM_HTTP_CONNECTION_FAILED" and DAV_ERROR "SF I616ZTEST102" on get_properties.

What am I doing wrong ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers