Fonction SAP BAPI_OIW_GET_DATA - BAPI: Read OIW Data

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
DATA_SOURCE BAPIMETLST-DATASOURCE C 30 X Data source for reading data

Paramètre Reférence Type Long. Description
NUMBER_OF_BLOCKS_IN_DATA BAPIOIW-NO_BLOCKS I 4 Number of data blocks read
NUMBER_OF_RECORDS_PER_BLOCK BAPIOIW-NO_RECORDS I 4 Number of data records in a block
RETURN BAPIRETURN u 452 Return parameter
SELECTION_DATE_OF_DATA BAPIOIW-SELECTDATE D 8 Selection date of data read
TEXT_OF_USED_DATA_SOURCE BAPIMETLST-TEXT C 60 Decsription for data source
USED_DATA_SOURCE BAPIMETLST-DATASOURCE C 30 Data source used to read the data

Paramètre Reférence Long. Facultatif Description
COLUMNS_TO_READ BAPIVIEW 24 Columns to be read
DATA BAPIDATA 256 Data that was read
SELECTION BAPISELECT 115 Selection criteria
STRUCTURE_OF_DATA BAPIFIELDS 97 Structure of the data read

Functionality
This method allows data to be read from the data sources of the OpenInformation Warehouse (OIW). You can restrict the scope of the dataread by defining selection criteria and by specifying the number ofcolumns (that is, information objects of the OIW metadata) you require.

Notes
Before reading the data, the system performs all authorization checksthat are also checked when the data sources are accessed from R/3.
The information objects and data sources that are used in this methodfor the parameters DATA_SOURCE, SELECTION and COLUMNS_TO_READ can beread beforehand using the method BAPI_OIW_GET_CATALOG.
Messages are returned in the parameter RETURN. You can find the returncodes and their meaning in this parameter documentation.

Description
It is sometimes necessary to transfer the data in blocks because thelength of the DATA-LINE field (255 characters) is insufficient for theresult. This means that a result line is longer than 255 characters.This parameter is relevant in a situation like this, and it specifiesthe number of blocks in the DATA parameter.

Description
It is sometimes necessary to transfer the data in blocks because thelength of the DATA-LINE field (255 characters) is insufficient for theresult. This means that a result line is longer than 255 characters.This parameter is relevant in a situation like this and it specifiesthe number of data records per block.

Description
Return parameter of the function module. The return parameters informyou whether the data query aimed at the function module has beensuccessful or not.

Value range
The fields for the return parameters are as follows:

  • Return type (message type: S Success, E Error)

  • Return code (message code)

  • Return message (message text)

  • Return Log No (log number of the application log)

  • Return LOG_MSG_NO (Application log: sequence number of the message)

  • The most important messages for the return parameters are as follows:
    Type Code Message text
    S M2870 Data was read
    E M2871 The imported data source for the OIW is not available
    E M2872 Info object & from table & is not available
    (Tab. SELECTION or COLUMNS_TO_READ)
    E M2873 A common data source is not available for the info objects
    E M2874 Please transfer the info objects in the table
    COLUMNS_TO_READ
    E M2875 Info object & cannot be determined by data source imported
    I M2876 No data could be found for the selection requirements
    E M2877 Value & is not available for the field SELECTION-SIGN
    (=Indicator: I/E (Include/exclude values))
    E M2878 Value & is not available for the field SELECTION-OPTION
    (Selection option (EQ/BT/CP/...))
    E M2879 Info object/data source &/& cannot be selected
    E M2880 Only 1 parameter is available for info object/data source
    /

    Description
    Date on which the data was read in R/3.
    This date can deviate from the system date, for instance in cases whena selection version is the data source.

    Description
    Description of the data sources that were used to read the data.

    Description
    Data source that was used to read the data.

    Description
    Data source of the OIW (Open Information Warehouse) that is to be usedfor reading the data.
    If this parameter is not transferred, the method tries to determine adata source for the transferred information objects that can be used toread the data.

    Description
    This parameter describes the columns (information objects) that are tobe read. If you set the field SELECTION-FLG_UNIT or SELECTION-FLG_DESC,an additional line will be transferred in the result paramater DATA.This line will contain the unit/currency and/or description and will beplaced under the column you require.

    Description
    The data that has been read is returned in this parameter. If the datahas lines longer than 255 characters, the data is transferred inblocks. This means that the result lines are broken up into severallines that are 255 characters long. You can find out the number ofblocks / number of records per block from the parametersNUMBER_OF_BLOCKS_IN_DATA / NUMBER_OF_RECORDS_PER_BLOCK respectively.
    If the data is returned in blocks, then you need to put the separatelines (records) back together again for each block in order to acquirea result that can be processed further.

    Description
    Selection criteria used when the data is read.The selection optionsmust be specified in the format for ABAP selection options. The fieldshave the following meaning:
    INFOOBJECT: InfoObject to which the selection criteria apply
    SIGN : 'I': the specified values are to be selected
    'E': the specified values are not to be selected
    ('I' is supported for all OIW data sources)
    OPTION : 'EQ' Equal: individual value
    'NE' Not Equal: everything except the specified individual
    value
    'BT' Between: everything between interval [LOW,HIGH]
    'NB' Not Between: everything outside the interval
    'LE' Less or Equal: everything <= value in the LOW field
    'GT' Greater Than: everything > value in the LOW field
    'GE' Greater or Equal: everything >= value in LOW field
    'LT' Less Than: everything < value in the LOW field
    'CP' Contains Pattern: generic entry: find pattern

    Description
    This parameter describes the structure of the data read. Due to thefact that only one line is transferred in the DATA table, you can usethis parameter to divide up this line into individual columns again.