Skip to Content

Knowledge Management Code Samples


It is a prerequisite that you are familiar with Java, the concepts of object orientation and SAP NetWeaver development. Any additional requirements needed to understand the sample applications and tutorials are explicitly stated when applicable. 


SAP code or applications samples and tutorials are NOT FOR PRODUCTION USE unless specifically noted. You may not demonstrate, test, examine, evaluate or otherwise use them in a live operating environment or with data that has not been sufficiently backed up. You may not rent, lease, lend, or resell SAP code or application samples and tutorials. 

Repository Framework

Code Sample



min. Release

Using the KMC Platform in Standalone Web Applications

With SAP Enterprise Portal 5.0, it became possible to use the Knowledge Management & Collaboration platform (KMC) in portal related components such as iViews. Now, with SAP NetWeaver '04 (and going forward) an increasing number of custom developments will be coded as standard web applications in the SAP Web Application Server Stack. Therefore, it is necessary to call the KMC platform at design time in the SAP NetWeaver Developer Studio and at runtime in the NetWeaver Stack. This technical article explains how.

RF Client API

NetWeaver 04 SPS 4
Enhancing a Customer Repository Manager with Advanced AspectsDeveloping Repository Managers for Knowledge Management is a common way to integrate unstructured data sources into the SAP NetWeaver Portal. For some reason, it is necessary to provide advanced features to enhance the capability of such a connector. This article will show you how to enhance a Repository Manager with read/write mode and security checks.

Repository Manager

NetWeaver 04 SPS 14
Developing a Property FilterRepository filters allow the manipulation of repository framework objects as they are passed through the repository framework. Property filters hide or modify existing properties of resources, or add virtual properties to resources.Repository FilterNetWeaver 04 SPS 4
An AntiVirus Solution for KMCThis article with code sample explains how to implement a possible antivirus solution for EP6 and EP5. It was developed before an antivirus solution existed in EP6 Content Management.
EP 5.0
Introduction to the Application Properties Service of KMThis article describes the application properties service. The purpose of this service is to persist properties of resources in the KM database independent of a specific repository. Coding examples are provided to demonstrate how you can store and retrieve properties.Application PropertiesNetWeaver 04 SPS 4

Implementing a Read-Only Security Manager

A security manager is used to handle the permissions that a principal (user, group, and so on) has for individual resources. Each repository manager can have a security manager configured to instantly establish if a user has the appropriate permission to perform an operation.Repository Manager -> Security ManagerNetWeaver 04 SPS 15

Knowledge Management

Code Sample



min. Release

Developing a Sponsored Link Component for KM SearchThis article describes how you can display sponsored links within standard KM Search results. The requirements some customization and one small example Java component is needed for basic featured sponsored links application. Ideas for further functional extensions are given.Search UI

NetWeaver 04 SPS 4

Developing a Search Component for KM Search iView

Customizable search interfaces are absolutely necessary for providing company-specific search functionality for KM content. Since the introduction of functionality for creating search dialogs with search components, it is possible to develop customized search components and plug them into the standard search iView of KM.

Search UINetWeaver 04 SPS 15
Implementing a Metadata Extension for KMC PropertiesModeling properties and assigning default values or value lists in KMC is a very useful feature delivered in the standard installment. You often need to provide metadata values for KMC properties that are delivered by external sources, e.g. backend systems or remote applications. Therefore, you can implement a Metadata Extension that provides dynamic value access and a validation check.Property Metadata Service -> Metadata ExtensionsNetWeaver 04 SPS 11
Using the KM Indexmanagement APIs for searching with TREXSearching in the SAP NetWeaver Enterprise Portal is a key feature of the product and is a requirement in most of the customer project scenarios. Search functionality within the SAP Enterprise Portal is exposed through the KM Indexmanagement service which offers a Java API for accessing the search capability in custom-developed components.

Index Management

NetWeaver 04 SPS 11
Integrating 3rd party search engines into KM index management

The Knowledge Management (KM) and Repository Framework (RF) API offers the significant possibility of implementing your own index services for KM's index management service. The index management service consolidates all search results coming from the different index service implementations and presents them in a unique way, using KM's flexible user interface, to the end user. Results can be shuffled, grouped by certain criteria, and rendered by standard KM technology without any additional development effort.

Index Management

NetWeaver 04 SPS 9

Using Flexible UI Ready-MadesDeveloping customer flexible UI components is important to extending the standard KM navigation UI with customer-specific functionality. To avoid complex UI element constructions with HTMLB technology, the flexible UI ready-mades concept is introduced, offering simplified usage of predefined ready-to-use components. These small flexible UI components can be used in programming in custom-developed flexible UI components that fasten the entire development process together for the flexible UI.ible UI -> Resource Renderer

NetWeaver 04 SPS 9

Implementing Customer Reports Using the KM Reporting APISince reporting was introduced in the KM application, it is a commonly used feature in many customer projects. Besides the standard reports, customers want to extend the reporting repository by adding their own reports for specific reporting activities. The new Reporting API offers the possibility to implement customer specific reports for this purpose.ReportingWeaver 04 SPS 11

Implementing Resource List Filters for Flexible UI Navigation

Hiding resources from the KM navigation iView is a mandatory feature for most of the customer scenarios. Filters are normally registered in the Repository Framework and are applied to all resources called from the KM application. There is no difference between End users calls and Service calls such as from crawlers or search. The resource list filter service offers additional possibilities to filter only on the Flexible UI runtime. Resource list filters can be activated on collection renderer settings and therefore are assigned more precisely than the repository framework filters.

Flexible UI -> Collection Renderer

NetWeaver 04 SPS 12

Enhancing Customer Reports with Commands and ParametersSince reporting was introduced in the KM application, it is a commonly used feature in many customer projects. Besides the standard reports, customers want to extend the reporting repository by adding their own reports for specific reporting activities. The KM Reporting API offers the possibility to implement customer specific reports for this purpose.Reporting, Application Properties, Respository ServiceNetWeaver 04 SPS 16
Writing custom renderers for KM property groupsThe following article contains a step by step example of writing custom renderers for property groups within the KM details properties dialog. These groups are part of the property structure concept, which allows you to structure the available properties for documents and folders into groups and subgroups as well as sorting these groups and properties when they are displayed. A plug-in mechanism provides the means to write custom renderers for dedicated property groups within the standard UI. This example describes a group renderer for rendering properties of a group in two columns.Flexible UI -> Group Renderer

EP 6.0 SP2

Former Member

No comments