Show TOC Start of Content Area

Background documentation Extractor Methods in CAF and SAP BW Integration  Locate the document in its SAP Library structure

You can create SAP BW extractor methods in application services by using the new method wizard in the Composite Application Services (CAS) plug-in to the SAP NetWeaver Developer Studio.

For more information, see Adding Application Service Operations.

Implementation Requirements

The extractor method should:

      Have next signature: <method name>(java.util.Map selections).

      Return a collection of DataStructures that have the field RECORDTYPE with the built in type Integer. This field is to be used for marking the state of the returned record.

       0 – record was deleted

       1 – record was created or updated

      Support delta loading by analyzing values of delta-relevant field selections and returning records indicating if a field was created, deleted, or updated (RECORDTYPE) in given time period.

      Use time difference (in hours) between the J2EE server of the CAF and SAP BW system. This information can be stored in a special static variable, whereas the value can be configured as the caf/runtime/ear property:

com.sap.caf.rt.bol.context.CAFContext.CAF_BW_SYSTEMS_TIMEZONE_DIFFERENCE

Note

For more information on configuration parameters for CAF and SAP BW integration, see Configuring CAF Runtime Properties for BW Integration.

      Support selection parameters on resulting DataStructure fields. Selection parameters should be stored in the selections map on the DataStructures field with:

       key – field name

       value – QueryFilter

Implementation Tips

      Delete the QueryFilter from the field RECORDTYPE before using selected data.

You can find deleted instances by using the findDeletedByObjectTypeAndDates method of class com.sap.caf.rt.bol.da.jdo.registration.DeletedObjectsRegistrationService. This service uses the field objectType from any JDO object that implements a dependent object interface (IDependentObject).

With the CAS plug-in to SAP NetWeaver Developer Studio, you can generate constants in appropriate classes. For example, in the entity service class DataObject, this constant is OBJECT_NAME.

Example 

This service can be used for accessing information about deleted instances of any dependent object (IDependentObject) such as relations, collection attributes, complex attributes and entity services.

      Use the following constant to access the time difference (in hours) between the J2EE server of CAF and SAP BW system:

com.sap.caf.rt.bol.context.CAFContext.CAF_BW_SYSTEMS_TIMEZONE_DIFFERENCE

      Use the following RECORDTYPE field values to indicate the records status:

       0 – record was deleted

       1 – record was created or updated

End of Content Area