Fonction SAP BAPI_INFOCUBE_READ_REMOTE_DATA - BAPI for Reading Data from a Remote InfoCube

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
INFOCUBE BAPI6200-INFOCUBE C 30 InfoCube Name
KEYDATE BAPI6200-KEYDATE D 8 X Query: Key Date

Paramètre Reférence Type Long. Description
RETURN BAPIRET2 u 548 Return Parameter

Paramètre Reférence Long. Facultatif Description
CHARACTERISTICS BAPI6200FD 56 Requested Characteristics/Key Figures from Remote InfoCubes
DATA BAPI6100DA 251 Data - Data Record with Continuation Indicator
KEYFIGURES BAPI6200FD 56 Requested Characteristics/Key Figures from Remote InfoCubes
SELECTION BAPI6200SL 127 Selection criteria for reading (remote)InfoCubes

Functionality
Comment: It is recommended to read this documentation inconjunction with the function module documentation for the functionmodule BAPI_INFOCUBE_READ_REMOTE_DATA.
The function module BAPI_INFOCUBE_READ_REMOTE_DATA implements either anInfoProvider with service that is called using RFC, or a general remoteInfoProvider. This documentation provides an overview of the parametersof the function module.

InfoCube,,,,
Name of the InfoProvider

Key Date,,,,
Key date for data dependent on key date

Return,,,,
Status information returned for the function module

Selection
This table contains the restrictions the OLAP processor uses to requestdata from the virtual InfoProvider. The restrictions are structured asfollows:
The table contains the field Expression. This expression is thehighest outline level of the restrictions. If the InfoProvider can onlyprocess global restrictions, the value of the Expression field isalways 0. Otherwise, the logical restrictions consist of
E0 AND ( E1 OR E2 OR E3 ... OR EN ),
where E0 corresponds to the global restrictions.
Within the same expression, the restrictions are structured in the sameway as an ABAP range table: restrictions for identical characteristicsare linked logically with OR; restrictions for different characteristicsare linked logically with AND.
Example:
Expression,,InfoObject,,Sign,,Option,,Low,,High,,
0,,MATERIAL,,I,,EQ,,'4711',, ,,
0,,MATERIAL,,I,,EQ,,'4712',, ,,
0,,CUSTOMER,,I,,EQ,,'CUST01',, ,,
0,,CUSTOMER,,I,,BT,,'CUST04',,'CUST06',,
1,,COLOR,,I,,EQ,,'RED',, ,,
2,,SIZE,,I,,EQ,,'XXL',, ,,
2,,SIZE,,I,,EQ,,'XL',, ,,
2,,SEX,,I,,EQ,,'MALE',, ,,
The selection looks as follows in an open SQL condition:
( ( Material = '4711' OR Material = '4712' ) AND
( Customer = 'CUST01' OR Customer between 'CUST04' AND 'CUST06' ))
AND
( ( COLOR = 'RED' ) OR
( (SIZE = 'XXL' OR SIZE = 'XL' ) AND
( SEX = 'MALE' ) ) )

Characteristics
This table contains a description of the requested characteristics alongwith their data types and decimal places. It also contains the offsetand the length of the field in the return table.

Key Figures
This table has the same structure as the characteristics table anddescribes the key figures requested.

Data
This table returns the data.
To fill this table, the individual characteristics and key figures of alogical data record are written to a character field without separatorsand with the specified length and offset. If the character field (totallength of all characteristics and key figures requested) is longer than250 characters, when the data row is copied to the Data table, abreak is made after each 250 characters, and the continuation field ofthe cut off row must be set to 'X'.
When the data is unpacked, the rows of the table are placed next to eachother until a row is reached for which the continuation field has notbeen set. The values of the characteristics and key figures are thenread from the logical data row with length and offset that was createdin this way.

Example
The following characteristics and key figures are requested:
INFOOBJECT,,DATATYPE,,DECIMALS,,SIGN,,LENGTH,,OFFSET,,LOWERCASE
RSDRV_C01,,CHAR,,000000,,,,6,,0
RSDRV_C02,,CHAR,,000000,,,,6,,6
RSDRV_C03,,NUMC,,000000,,,,3,,12
RSDRV_C03__RSDRV_N01,,CHAR,,000000,,,,6,,15,,
RSDRV_C03__RSDRV_N02,,CHAR,,000000,,,,6,,21,,
0CALDAY,,DATS,,000000,,,,8,,27
INFOOBJECT,,DATATYPE,,DECIMALS,,SIGN,,LENGTH,,OFFSET,,LOWERCASE
RSDRSKYF1,,INT4,,000000,,X,,11,,35,,
RSDRSKYF2,,DEC,,000003,,X,,23,,46
The Data result table looks as follows:
CONTINUATION,,DATA
,,C01_01C02_02102N01_02N02_1120010101 1 1.000
,,C01_01C02_02112N01_02N02_1220010101 1 1.000
,,C01_01C02_03102N01_02N02_1120020101 1 1.000
If the length of the data components was not 250 characters, but only 40characters, each logical row would have to be cut off:
CONTINUATION,,DATA
X,,C01_01C02_02102N01_02N02_1120010101
,, 1 1.000
X,,C01_01C02_02112N01_02N02_1220010101
,, 1 1.000
X,,C01_01C02_03102N01_02N02_1120020101
,, 1 1.000
For demonstration purposes, the spaces (Hex 20) are replaced with anasterisk (*').
CONTINUATION,,DATA
X,,C01_01C02_02102N01_02N02_1120010101******
,,*****1******************1.000
X,,C01_01C02_02112N01_02N02_1220010101******
,,*****1******************1.000
X,,C01_01C02_03102N01_02N02_1120020101******
,,*****1******************1.000

Further information
The class CL_RSDRV_REMOTE_IPROV_SRVcontains services for implementing a BAPI-based InfoProvider that isbased on a database table.

Description
Status information returned from the module.

Description
Name of the InfoProvider

Description
The key date of the query. This key date is important fortime-dependent attributes.

Description
SeeBAPI_INFOCUBE_READ_REMOTE_DATA

Description
SeeBAPI_INFOCUBE_READ_REMOTE_DATA

Description
SeeBAPI_INFOCUBE_READ_REMOTE_DATA

Description
SeeBAPI_INFOCUBE_READ_REMOTE_DATA