Show TOC

Procedure documentationCreating and Adjusting News Filters Locate this document in the navigation structure

 

You can use a news filter to filter the news in a folder according to precisely defined rules.

For example, as an administrator, you can display all news in a folder, whereas an author can only see the news created personally.

Specially for the news for partners, you can define a filter criterion that reads specific properties of the current user from the CRM system and compares them with attributes of the news.

Procedure

  1. Log on to the SAP NetWeaver Portal as portal administrator.

  2. Choose   System Administration   System Configuration   Knowledge Management   Content Management   Repository Filters   CRM Namespace Filter  .

    • If you want to create a new filter, choose New and specify a name for the filter.

      Note Note

      You cannot change this name later.

      End of the note.
    • If you want to adjust an existing filter, select it (CRMNamespaceFilter) in the list, and choose Edit.

  3. Specify the folder and the repository on which the filter is to be used.

  4. Restart the servlet engine.

Specify the following parameters when creating a filter:

Parameter

Mandatory

Description

Example or Default Entry

Extensions

No

Default parameter from the namespace filter (not taken into account at present)

The CRMNamespaceFilter is derived from a (default)NamespaceFilter that originates from KM.

Filter Condition 1

No

Filter Criterion

$DOC.createdby = $USER.getId

Filter Condition 2

No

Filter Criterion

Filter Condition 3

No

Filter Criterion

Filter Condition 4

No

Filter Criterion

Filter Condition 5

No

Filter Criterion

Folder

Yes

Folder on which the filter is to be used. Specify the fully qualified path (that is, including the repository name)

/sapcrmnews/Partnernews/

MIME Types

No

MIME types on which the filter is to be used (not taken into account at present)

Paths

No

Default parameter from the namespace filter (not taken into account at present)

Resource Checker Classname

No

If a special ResourceChecker (compares filter criteria with resources) was created (Java coding), this can be specified here. If no value is specified, then the DefaultResourceChecker is used

Crmsystem

Yes

System alias that should not be changed

SAP_CRM

Active

No

Input whether the filter is to be active

Priority

No

Input for filter priority (values between 1 and 99) in case several filters are used on the same folder

Repositories

Yes

Folder on which the filter is to be used

sapcrmnews

The single filter criteria are linked to one another by means of an OR condition.

To enable partner program filtering, the following instances of CRMNamespaceFilter must be created:

Name

CRMNameSpaceFilter

Active

Yes

Priority

20

Repositories

sapcrmnews

Filter Condition 1

$DOC.createdby = $USER.getId

Filter Condition 2

$CRM.CRM_PRT_KM_NEWS_V_PARTNERPROGRmatches $DOC.partnerprogram x

Filter Condition 3

$USER.getroles matches "com.sap.pct.crm.portaladmin"

Folder

/sapcrmnews/Partnernews/**

Tracelevel

31

crmsystem

SAP_CRM

Name

CRMNewsFlashFilter

Active

Yes

Priority

20

Repositories

taxonomy

Filter Condition 1

$DOC.createdby = $USER.getId

Filter Condition 2

$CRM.CRM_PRT_KM_NEWS_V_PARTNERPROGR matches $DOC.partnerprogram

Filter Condition 3

$USER.getroles matches "com.sap.pct.crm.portaladmin"

Folder

/taxonomies/sapcrmpartnernews/PartnerNewsFlash/**

Tracelevel

31

crmsystem

SAP_CRM

Example

$DOC.createdby = $USER.getId

Users only see documents they have created themselves.

$USER.getroles matches "com.sap.pct.crm.PortalAdmin"

Users of the role comt.sap.pct.crm.Portaladmin see the folder documents.

$CRM.CRM_PRT_KM_NEWS_V_PARTNERPROGR matches $DOC.partnerprogram

The result of the function module CRM_PRT_KM_NEWS_V_PARTNERPROGR is compared with the document property partnerprogram.

Note Note

The filter conditions are processed in sequence. Because Filterconditions 1 to 5 represent a logical or- condition, the complete expression is true if a condition has the value true. For this reason, you should place time-critical filter conditions at the end of the list.

To call a function module from the backend, the function module must be RFC-capable, have no transfer parameters, and return the structure TABLES KEYS TYPE CRMT_PRT_KM_NEWS_KEYS. Furthermore, the logged-on user must have authorization in the CRM server. Logon is by single-sign-on.

For optimization reasons, values from the CRM server are cached in the portal server. The default time after which a cache entry is removed automatically is 1800 seconds.

End of the note.