SAP ABAP IMG Activity BW_BCT_ME_FILTER (Define Dynamic Filter Conditions for Update Rules)
Hierarchy
BI_CONT (Software Component) Business Intelligence Content
   BW-BCT-ISM (Application Component) Media
     RS_BCT_ME (Package) BW: IBU Media Content
IMG Activity
ID BW_BCT_ME_FILTER Define Dynamic Filter Conditions for Update Rules  
Transaction Code S_B71_29000002   (empty) 
Created on 20050322    
Customizing Attributes BW_BCT_ME_FILTER   Define Dynamic Filter Conditions for Update Rules 
Customizing Activity BW_BCT_ME_FILTER   Define Dynamic Filter Conditions for Update Rules 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name BW_BCT_ME_FILTER    

Use

You can use this activity to define flexible filter conditions in the start routine for an update rule.

Requirements

The function module RS_BCT_ME_UPDATE_CONDITION must be implemented in the corresponding start routine for the update rule (see the coding example).

The function module RS_BCT_ME_UPDATE_CONDITION is implemented as standard in the following update rules. You only need to define the corresponding filter conditions for these update rules (see examples). If no Customizing settings have been maintained, the system updates all data records.

Update Rules (InfoProvider and InfoSource)

0MEMPSDS1 2LIS_11_VAITM     Order item data (media-specific)

0IPM_C07    80IPM_DS16        Service contract (billing-relevant items)

0IPM_C08    80IPM_DS17        Service contract (rights-relevant items)

0IPM_C06    80IPM_DS17        License acquisition contract (rights-relevant items)

0IPM_C05    80IPM_DS16        License acquisition contract (billing-relevant items)

0IPM_C10    80IPM_DS15        Outgoing royalties for the service contract

0IPM_C09    80IPM_DS15        Outgoing royalties for the license acquisition contract

Standard settings

Activities

Perform the following steps to define the filter conditions:

1. Define the update rule in which you select the InfoProvider and the associated InfoSource. You should always select the InfoProvider first, so that the system only offers you the associated InfoSources for selection. You should then save your entry.

2. Select the update rule for which you want to define filter conditions and choose the Define Filter Conditions node in the dialog structure.

3. By executing the New Entries function, you can select the InfoObject that is relevant for filtering. Enter the relational operator and the filter value required. If you want to link several conditions manually, you can use the AND/OR field to do so. Check that the connections have been defined so they make logical sense. You should always leave the last condition line blank so that the system can interpret the syntax correctly.

Note:

When you define the filter conditions, you should check that the filter condition defines which data is to be filtered (and not therefore updated).

Interpretation of Logical Expressions

1. 0CRM_PRCTYP (business transaction type)     EQ IPME

The system filters all data records in which the business transaction type is identical to IPME. This means that all business transaction types except IPME are updated.

2. 0CRM_PRCTYP (business transaction type)     NE IPME

The system filters all data records in which the business transaction type is not identical to IPME. This means that it only updates IPME.

3. 0IPM_POBJID (transaction number for license acquisition contract) GE 1200000

The system filters all data records in which the business transaction number is equal to or greater than 1200000. This means that it only updates contracts whose transaction number is less than 1200000.

4. 0IPM_POBJID (transaction number for license acquisition contract LE 1200000

The system filters all data records in which the business transaction number is less than or equal to 1200000. This means that it only updates contracts whose transaction number is greater than 1200000.

5. . 0CRM_PRCTYP (business transaction type) NE IPME AND 0CRM_PRCTYP (business transaction type) NE IPMB

The system filters all data records in which the business transaction types are not identical to IPME or IPMB. This means that it only updates business transaction types IPMB and IPME.

Example

1. Customizing example for updating IPM service contracts

The distinction between the license acquisition contract (example: IPM example Customizing settings business transaction type IPME) and the service contract (example: IPM example Customizing settings business transaction type IPMB) takes place in the start routine for the InfoProvider update rules using the business transaction type (InfoObject 0CRM_PRCTYP) for the acquisition document.

a) Define update rule

Select InfoProvider:         0IPM_C07

Select InfoSource:         80IPM_DS16

b)    Define filter conditions

Select InfoObject:        0CRM_PRCTYP

Define operator:         NE (not equal to)

Define filter value:        IPMB

.

Coding example:

If you want to use these functions in a start routine, you must insert the following coding in the corresponding start routine and define the filter conditions for the update rule:

CONSTANTS:

ld_fieldname_isource TYPE fieldname VALUE 'G_S_MINFO-ISOURCE',

ld_fieldname_infocube TYPE fieldname VALUE 'I_INFOCUBE'.

DATA: lt_ref_to_lt_DATA_PACKAGE TYPE REF TO data.

FIELD-SYMBOLS: <lt_DATA_PACKAGE> TYPE ANY.

FIELD-SYMBOLS: <fs_minfo_isource> TYPE ANY.

FIELD-SYMBOLS: <fs_infocube> TYPE ANY.

* convert datapackage type

CREATE DATA lt_ref_to_lt_DATA_PACKAGE LIKE TABLE OF DATA_PACKAGE.

ASSIGN lt_ref_to_lt_DATA_PACKAGE->* TO <lt_DATA_PACKAGE>.

* fetch infosource name

ASSIGN (ld_fieldname_isource) TO <fs_minfo_isource>.

* fetch infoprovider name

ASSIGN (ld_fieldname_infocube) TO <fs_infocube>.

* transfer data_package data

<lt_DATA_PACKAGE> = DATA_PACKAGE[].

CALL FUNCTION 'RS_BCT_ME_UPDATE_CONDITION'

EXPORTING

iv_infoprov = <fs_infocube>

iv_isource = <fs_minfo_isource>

TABLES

ct_monitor = MONITOR

CHANGING

ct_DATA_PACKAGE = <lt_DATA_PACKAGE>

EXCEPTIONS

coding_error = 1

name_error = 2

comstru_error = 3

OTHERS = 4.

* if abort is not equal zero, the update process will be canceled

IF sy-subrc = 0.

* transfer data_package data

DATA_PACKAGE[] = <lt_DATA_PACKAGE> .

ABORT = 0.

ELSE.

* the update process will be canceled

ABORT = 4.

ENDIF.

Business Attributes
ASAP Roadmap ID 899   not to be assigned 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG BW_BCT_ME_FILTER 0 ARS0000023 Business Content and Extractors 
Maintenance Objects
Maintenance object type C   Customizing Object 
Assigned objects
Customizing Object Object Type Transaction Code Sub-object Do not Summarize Skip Subset Dialog Box Description for multiple selections
RSBCT_MEV_VALUE C - View cluster SM34  
History
Last changed by/on SAP  20050713 
SAP Release Created in 702