Data Extraction in CAF and SAP
NetWeaver BW Integration
The CAF and SAP NetWeaver Business Warehouse (SAPNetWeaver BW) integration supports the use of selection parameters, defined at the beginning of the extraction process. You can set needed selections in the InfoPackage to filter the extracted data by the values of one or more of its fields.
For all DataSources (except for these for Application Service BI extractor methods) all work is done by CAF connector. For DataSources for AS Java BI, extractor methods the extraction should be done by the developer.

When you enter selection parameters for DataSource for business object node attributes have in mind that CAF makes case sensitive search. If SAP NETWEAVER BW does not preserve the case, these selections do not work correctly.

DataSource for business object node associations does not support selections. DataSource for business object node language-dependent attributes supports case-insensitive selections. The support for selections in DataSources for BI Extractor operations is up to the developer.

As described in the DataSource definitions, when CAF discovers in a structure an attribute of type with built-in type DATETIME it creates three columns in the DataSource – one for date, one for time and one for the time in milliseconds. Selections over the time column and equals selection over the date column does not work. However, you can make a selection over the milliseconds column.
The extraction of CAF applications data is provided by CAF runtime automatically. If you want to make custom DataSource and extraction logic you should use application service BI extractor methods. CAF Runtime automatically provides a DataSource for each such method and calls it when extraction is initiated.
For more information, see Extractor Method Implementation Example.
You can create SAP NetWeaver BW extractor methods in application services by using the new method wizard in the Composite Application perspective in SAP NetWeaver Developer Studio. When an extraction is initiated by the SAPNetWeaver BW, CAF framework calls your extract method and returns the result of the method to SAP NetWeaver BW.
The extractor method should:
● Have next signature: <method name>(com.sap.caf.core.services.bi.IBIExpression expression).
● Return a collection of DataStructures (you should choose the particular structure in the extractor method creation wizard)
● Support selection parameters on resulting DataStructure fields. Selection parameters are passed as binary tree, represented by an instance of the interface IBIExpression. This instance can be com.sap.caf.core.services.bi.BISelection or com.sap.caf.core.services.bi.BICompositeExpression. Both classes implement this interface. BISelectionrepresents a condition on a particular column. BICompositeExpression represents two expressions, linked with logical operator. If there are no selections specified in SAP NetWeaver BW then the expression parameter value is NULL.
● The structure BISelection has the following attributes
○ attributeName – String
○ fromValue – Object
○ toValue - Object
○ operator - com.sap.caf.core.services.bi.BIOperator
● The value of attribute operator could be one of the two enums:
○ BIOperator.EQ – equals
○ BIOperator.BW – between
● The structure BICompositeExpression has the following attributes:
○ operator – BILogicalOperator
○ leftExpression – IBIExpression
○ rightExpression – IBIExpression
● The value of attribute operator could be either:
○ BILogicalOperator.AND – logical operator AND
○ BILogicalOperator.OR – logical operator OR
1. Launch the SAP NetWeaver BW Administrator Workbench and go to Modeling.
2. Create the following SAP NetWeaver BW object types:
○ InfoArea
○ InfoObjects catalog
○ InfoObjects
3. Create an InfoSource and set up transfer rules for SAP NetWeaver BW extractor from UD Connect.
4. Create an ODS object and update transfer rules.
5. Execute the extraction process.