Data Extraction in CAF and SAP BW Integration

Extraction Process Selection Parameters

The CAF and SAP Business Warehouse (SAP 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.

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

Extraction Implementation

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 .

Extractor Methods in CAF and SAP BW

You can create SAP 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 SAP BW, CAF framework calls your extract method and returns the result of the method to SAP 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. BISelection represents a condition on a particular column. BICompositeExpression represents two expressions, linked with logical operator. If there are no selections specified in SAP 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

Example Data Extraction

  1. Launch the SAP BW Administrator Workbench and go to Modeling.
  2. Create the following SAP BW object types:
    • InfoArea
    • InfoObjects catalog
    • InfoObjects
  3. Create an InfoSource and set up transfer rules for SAP BW extractor from UD Connect.
  4. Create an ODS object and update transfer rules.
  5. Execute the extraction process.