You are on page 1of 4

4/2/2019 Access KM files from ear file in NW 7.

31 | SAP Blogs

Products Industries
Industries Services and Support
Services Support Training
Training Community
Community Developer

Partner About

 
Ask a Question Write a Blog Post Login

Former Member
February 7, 2014 4 minute read

Access KM les from ear le in NW 7.31

Follow RSS feed Like

1 Like 2,168 Views 2 Comments

In this blog describes the issues faced while accessing  KM les from ear le (iView in portal) in NW 7.31


You have created a ear le project in NWDS and need to access KM les or folders

Issues faced

1. How to get required KM API?

          By default NWDS is not having KM related dependencies , you need to download below two SCA les from Service market
place relevant to your server           version.

          KMCCM and KMCWPC 1/4
4/2/2019 Access KM files from ear file in NW 7.31 | SAP Blogs

          Then import these sca les into NWDS from development infrastructure perspective.

          Next step is in development infrastructure perspective click in KMC-CM SCA le-> in Component properties-> overview tab-
>Archive store ->select the           downloaded SCA le and upload.

   2. Adding KM API jar les to ear le?

          Right click ear le project->Properties->Java build path->Add external Jars then select KM API from          
“LocalDevelopment\KMC-          CM\\tc\km\frwk\_comp\gen\default\public\api\lib\java”

          Next is the important step in ear project-> dist-> portal-INF->portalapp.xml->Application Tab->SharingReference -> add this
value           “” . Now you can access KM related classes in ear le.

           Below code is an example to access les from a KM folder and lists users having access to le.

IResourceFactory resourceFactory = ResourceFactory.getInstance();

com.sapportals.wcm.repository.IResourceContext resourceContext =
RID rid = RID.getRID(“/documents/Files “);
com.sapportals.wcm.repository.IResource resourceN =
resourceFactory.getResource(rid, resourceContext);
ICollection collection=(ICollection)resourceN;
IResourceList resourceList=collection.getChildren();
IResourceListIterator iterator=resourceList.listIterator();
IResource resource2=(IResource);                          
ISecurityManager securityManager
IResourceAclManager irm =
IResourceAcl resourceAcl = irm.getAcl(resource2);                    
IResourceAclEntryList list = resourceAcl.getEntries();
IResourceAclEntryListIterator iteratorAcl =
                        while (iteratorAcl.hasNext()){
IResourceAclEntry entry =;
} catch ( Exception e) {
System.err.println(“exception: “ +
} 2/4
4/2/2019 Access KM files from ear file in NW 7.31 | SAP Blogs



Rakesh Mathew

Alert Moderator

Assigned tags

SAP Enterprise Portal | SAP NetWeaver | km | Portal And Collaboration | sap netweaver |

Related Blog Posts

KM Cache for portal application les

By Tobias Hofmann , Nov 30, 2010
Masthead customization and deployment through NWDS
By RAVI DIKSHIT , Feb 13, 2015
Masthead Customization in NW 7.31
By Former Member , Aug 30, 2013

Related Questions

Ask about ESS user id and EHP 6 user id

By Former Member , Jun 19, 2017

SAP EP Portal Upgraded from NW 7.31 to NW 7.50

By Pankaj S , Nov 27, 2018

EP 7.0 Web Dynpro Java Project Import into NWDS

By Siddhartha Kanjilal , Jun 30, 2017 3/4
4/2/2019 Access KM files from ear file in NW 7.31 | SAP Blogs


You must be Logged on to comment or reply to a post.

Former Member

November 14, 2014 at 6:40 pm

Thank you for Nice Blog. Currently i am migrating from Netweaver 7.0 to Netweaver 7.4

Wanted to know can we develop Portal Components reading KM data with out NWDI. Your thoughts please.

Like (0)

Former Member

March 23, 2015 at 12:04 pm

Hi Rakesh,

I am also in search of a custom par application that fetches the data from a KM folder and displays the content
as links in portal. Can you let me know how to achieve this.



Like (0)

Share & Follow

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Sitemap Newsletter 4/4