Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Introduction

This Blog describes how you can use the KM API within a WebDynpro Java DC. 

Implementation Steps

Step 1: Creating a new External Library Development Component

Using the KM API in a WebDynpro Development Component is different from a normal WebDynpro Application. Instead of adding the required libraries to the build path manually you have to create them in a seperate external library development component. For creating a new External Library Development Component proceed as follows:

  • Choose "File -> new -> Project -> Development Component -> Development Component Project
  • Select your corresponding track -> Next -> Select a vendor and name -> Type External Library
  • Press Finish

image

Step 2: Add all relevant jar-files to DC

Now it's time to add all jar-files which are relevant to use the KM API. Below is a list of all relevant jar-files:

  • com.sap.security.api.ep5.jar
  • bc.rf.framework_api.jar
  • bc.rf.global.service.urlgenerator_api.jar
  • bc.sf.framework_api.jar
  • bc.util.public_api.jar

 Add these jar-files to your libraries-folder in your External Library DC.

image

Step 3: Add jar-files to a new Public Part

After adding the jar-files to your external library DC, you also have to include them in a Public Part. To add them to a Public Part, select all jar-files and right click -> Development Component -> Add to Public Part.

image

image

Step 4: Creating a new WebDynpro Development Component

For creating a new WebDynpro Development Component proceed as follows:

  • Choose "File -> new -> Project -> Development Component -> Development Component Project
  • Select your corresponding track -> Next -> Select a vendor and name -> Type WebDynpro
  • Press Finish

image

Step 5: Integrate Public Part as used DC to your WebDynpro DC

To make the KM Library available at Design Time for your Web Dynpro Project, you have to add your previous created external KM Library DC as Used DC.

Therefore navigate to DC MetaData -> DC Definition -> Used DC -> Context Menu (Add Used DC)

image

image

I have to mention, that here is a little mistake in the screenshot. Sorry for that. You can see a Public Part named "extLibKM". According to Step 3 we have defined the name "kmclib".

Step 6: Add SharingReference to your WebDynpro DC

The first steps we have done are only relevant for design and build time. To use the KM API at Run-Time also, we have to add a SharingReference to our project. Therefore we have to proceed as follows:

  • Open Context Menu of project and select 'Properties'
  • Select WebDynpro References
  • Select SharingReference
  • Add the following: PORTAL:sap/com.sap.km.application 

Step 7: Deploy and run your application

Deploy and run your application. Activate your open activities and create a WebDynpro iView in your Portal.Now you should be able to use the KM Library at Design and Runtime.

2 Comments