cancel
Showing results for 
Search instead for 
Did you mean: 

Two question about KM API

Former Member
0 Kudos

Hi all,

I have a requirement to use KM API, to upload doc files to a specific repo & to display a list for user download files.

Now I get two problem:

1, how to write description while creating a resource.

I know how to create resource, but after new a Content, I tried to new instance of IMutableProperty and write in, there's ReadOnlyPropertyExcetion, I do not know where to set property of this resource.

2, I did above test by setting sharing reference in webdynpro reference & import some external jar files, this works fine for standalone component. But if I want to checkIn it as a DC to NWDI, I got compile error, what kind of used DC shall I import, I guess this is the way DC can accept.

Thank you

William

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi William,

try this code to set the description for the IResource:


String description = "My description";
res.setProperty(Property.createDescriptionProp(description));

Can't comment on NWDI though, never seen a properly working one...

regards,

Christian

Former Member
0 Kudos

Thank you for ur response, Christian.

It seems useful, but I dont have env to check this.

Anyone else can give me a hint about used DCs?

Thanks in advance.

Former Member
0 Kudos

Hi William,

Check the document Knowledge Management Search and Replace - Web Dynpro Java KM-API Example

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05c7e2ae-0a01-0010-ca98-fe42dbe0...

Regards

Pavel