Virtual InfoCubes with Services 
Definition
A virtual InfoCube with services is an InfoCube that does not have its own physical data storage in BW. A user-defined function module is used as DataSource. The properties of the DataSource can be defined more precisely with a number of options. Depending on these properties, the Data Manager provides services for converting the parameters and data.
Use
A virtual InfoCube with services can be used if you want to display data from non-BW data sources in BW without having to copy the data to the BW structures. The data can be either local or remote. You can also change the data with your own calculations before passing it to the OLAP processor.
This function is used primarily in the SAP Strategic Enterprise Management (SEM) application.
In comparison to the RemoteCube, the virtual InfoCube with services is more generic, because it offers more freedom and is therefore more useful to implement.
Structure
You can specify the type of the InfoCube when you create it. If you choose Virtual InfoCube with Services as the type, another pushbutton Detail appears. With this pushbutton you can open a further dialog box in which you can define the services.
- Enter the name of a function module that should be used as the data source for the virtual InfoCube. There are different variants for the interface of this function module. One method for defining the correct variant together with the description of the interfaces is given at the end of this documentation.
- The next step is to select some options for converting/simplifying selection conditions. You can do this by selecting the option Convert restrictions. These conversions only change the transfer table in the user-defined function module. The result of the query is not changed since the restrictions that are not processed by the function module are checked at a later time in the OLAP Processor.
Options:
- No restrictions: If this option is selected, no restrictions are passed to the InfoCube.
- Only global restrictions: If this option is selected, only global restrictions (FEMS = 0) are passed to the function module. Other restrictions (FEMS > 0) which can be created for example by restrictions on columns in queries are deleted.
- Simplify selections: This option is not implemented at the moment.
- Expand hierarchy restrictions: If this option is selected, restrictions on hierarchy nodes are converted into the corresponding restrictions on the characteristic value.
- Pack RFC: This option packs the parameter tables in BAPI format before calling the function module and unpacks the data table that is returned from the function module after the call. Since this option only makes sense in connection with a Remote Function Call, you must define a logical system that is used to determine the target system for the Remote Function Call when you select this option.
- SID support: If the DataSource of the function module can handle SIDs, you should select this option.
If this is not possible, the characteristic values are read from the DataSource and the Data Manager determines the SIDs dynamically. In this case, restrictions on SID values are automatically converted into the corresponding restrictions on the characteristic values if this is possible.
- With navigation attributes: If this option is selected, navigation attributes and restrictions on navigation attributes are passed to the function module.
If this option is not selected, the navigation attributes are read once the user-defined function module has been executed in the Data Manager. In this case the characteristics corresponding to these attributes must have been selected in the query. Restrictions on the navigation attributes are not passed to the function module in this case.
- Internal format (key figures): In SAP systems a separate format is often used to display currency key figures. The value in this internal format is different from the correct value in that the decimal places are shifted. You can determine the correct value in this internal representation with the currency tables.
If this option is selected, this conversion is used for conversion in the OLAP processor.
Dependencies
If you use a Remote Function Call, SID support must be switched off and the hierarchy restrictions must be expanded.
Description of the Interfaces for User-Defined Function Modules
Variant 1:

Variant 2:

Further parameters for variant 2 for passing hierarchy restrictions if they were not expanded:
If you restrict the hierarchy, an entry with field 'COMPOP' = 'HI' (for hierarchy) is created at the corresponding location in table I_T_RANGE (for FEMS 0) or I_TX_RANGETAB (for FEMS > 0) and field 'LOW' contains a number with which you can read the corresponding hierarchy restriction from table I_TSX_HIER using field 'POSIT'. Table i_tsx_hier has the following type:

Variant 3:

Method for determining the correct variant for the interface
The following list describes the procedure for determining the correct interface for the user-defined function module. Go through the list from the top to the bottom. The first appropriate case contains the variant to be used:
If Pack RFC is activated: Variant 1
If SID Support is deactivated: Variant 2
Otherwise: Variant 3