Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Creating internal links via WebDAV

We use WebDAV intensively to migrate content from our legacy portal to EP6. Creating folders and uploading documents from Excel/VBA works just fine.

For one of our projects we would like to create Internal link objects pointing to other KM resources (HTML pages, actually). Luckily, the WebDAV service supports the MKREDIRECTREF function of RFC. So sending a HTTP request with the action MKREDIRECTREF and the body

<D:mkredirectref xmlns:D="DAV:">

<D:reftarget>

<D:href>/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/.../Testtext.txt</D:href>

</D:reftarget>

</D:mkredirectref>

creates indeed a link. The links works like a link created in the Portal, except for one thing: if the target of the links is moved, the link is not updated.

This is even visible in the WebDAV property "resourcetype" of the link object.

For a link created in KM with the KM UI, the resourcetype is this.

<D:resourcetype>

<D:redirectref>

<internal-link xmlns="http://sapportals.com/xmlns/cm/webdav">

<dynamic/>

</internal-link>

</D:redirectref>

</D:resourcetype>

For my WebDAV link I receive:

<D:resourcetype>

<D:redirectref/>

</D:resourcetype>

Question: how can links of the type internal-link/dynamic be created using WebDAV?

Former Member
Former Member replied

I believe you'll need a SAP-specific extension in the request.

Try:

<D:mkredirectref xmlns:D="DAV:">

<link-type xmlns="http://sapportals.com/xmlns/cm/webdav">

<internal-link xmlns="http://sapportals.com/xmlns/cm/webdav"><dynamic/></internal-link>

</link-type>

<D:reftarget>

<D:href>/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/.../Testtext.txt</D:href>

</D:reftarget>

</D:mkredirectref>

The response should contain a similar element signaling whether the extension was understood.

Note that dynamic internal links aren't understood by all repository managers, though.

Best regards, Julian

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question