Fonction SAP BAPI_ODSO_READ_DATA - Reads Data from a Data Store (obsolete)

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
MAXROWS BAPI6116XX-MAXROWS I 4 X Maximum Number of Returned Rows
ODSOBJECT BAPI6116-ODSOBJECT C 30 Data Store
SELECTALLINFOOBJECTS BAPI6116XX-ALLINFOOBJECTS C 1 X Flag: Select All InfoObjects

Paramètre Reférence Type Long. Description
LINESPERRECORD BAPI6116XX-NUMROWS I 4 Number of Lines in Result Data for Each Record in ODS Object
NUMROWS BAPI6116XX-NUMROWS I 4 Number of Returned Hits
RETURN BAPIRET2 u 548 BAPI Return Parameter

Paramètre Reférence Long. Facultatif Description
DATALAYOUT BAPI6116DALO 43 X Data Layout in the Results Table
INFOOBJECTLIST BAPI6116IOLS 30 X InfoObject List
ORDERBY BAPI6116IOLS 30 X Sort-By List
RESULTDATA BAPI6116DA 251 X Results Data of the Query
SELECTIONCRITERIA BAPI6116SLIO 123 X Selection Criteria


Note: This module is obsolete! (see under "Restrictions" section)

Functionality
This function module reads table entries of a DataStore object. Data iseither read for all InfoObjects or only for selected objects.
The selection is executed according to selection criteria up to amaximum number of lines.
The result is sorted in a specific 'sort by InfoObject list. Afterwards,the table entries are converted from the DataStore table format into aflat 250 bytes structure and written to the table ResultData. The layoutof the InfoObjects is determined by the DataLayout table.
If errors arise, an extensive log is returned in the Return parameter.

Restrictions
If the BAPI is used in unicodef-enables systemes, there may be errors inthe data that is read or runtime problems may occur. For this reason,you should use the BAPI "BAPI_ODSO_READ_DATA_UC " instead.

Notes
In ODSOBJECT, the technical name must be specified and not thedescription.
You can either set the SelectAllInfoObjects indicator or theInfoObjectList indicator but not both at the same time.
Only InfoObjects with type Character are allowed in theSelectionCriteria and Orderby tables. Display attributes and key figuresare not allowed.
In general, navigation attributes must be specified. For example:Navigation attribute 0COUNTRY of 0CUSTOMER: 0CUSTOMER__0COUNTRY.
The InfoObjects specified in the table OrderBy must also be contained inthe table InfoObjectList unless the indicator SelectAllInfoObjects isset.
The following rules apply for selection criteria:
The conditions are formatted according to the usual ABAP select optionstyle.
The SIGN field has the following valid values:

  • 'E' = Exclude

  • 'I' = Include

  • The OPTION field has the following valid values:
    • 'EQ' = equals

    • 'GE' = greater than or equal to

    • 'LE' = less than or equal to

    • 'GT' = greater than

    • 'LT' = less than

    • 'NE' = not equal to

    • 'CP' = contains

    • 'BT' = between (upper and lower limit)

      • The technical name of the InfoObject must be entered in the IobjNm field
      • in the SelectionCriteria table for each entry and not just once.
        • Conditions for the same InfoObject (irrespective of the quantity and
        • order in the table) are treated as an OR operation. Conditions fordifferent InfoObjects are treated as AND-bound. This means that there isonly one record of conditions for each InfoObject.
          Example:
          0CUSTOMER,,I,,EQ,,CUST-A
          0CUSTOMER,,I,,EQ,,CUST-B
          0MATERIAL,,,,I,,EQ,,MAT-1
          The above conditions generate entries with
          0CUSTOMER = CUST-A oder CUST-B
          and
          0MATERIAL = MAT-1
          The same applies for navigation attributes.
          The results table has a flat structure of 250 bytes. Data is written tothe field DATA. The system inserts additional rows if the structure ofthe DataStore table is larger than 250 bytes. The first row of theContinuation field is empty and each additional row is marked with an X.
          The system only returns values for the selected InfoObjects.
          The data is not aggregated, meaning that the ResultData table can returnidentical rows, one for each DataStore table entry.
          Since the data fields of the ResultData table have a flat structure of250 bytes, the DataLayout table must be read to detect the type, offsetand length for each InfoObject value.

          Description
          Number of rows returned in the result data table.

          Description
          Standard BAPI return parameters.

          Description
          Maximum number of hits to be selected.
          This prevents queries that are too long.

          Default
          By default MaxRows is 0, which means without limit.

          Description
          Technical name of the DataStore object.
          For example: 0CUSTOMER

          Description
          Indicator instructing the method to select all the InfoObjectsbelonging to the ODS object.
          If marked, all the InfoObjects are selected. If unmarked, theInfoObjects in the InfoObjectList table are extracted.

          Description
          Layout of the InfoObjects in the result table.
          It includes:

          • InfoObject name

          • Data type

          • Offset in the DataStore structure

          • Length of the field
          • Description
            List of InfoObjects to read.
            If you wish to read all the InfoObjects in the DataStore object, you canjust mark the parameter SELECTALLINFOOBJECTS instead.

            Description
            Table for characteristics. The sequence of the characteristicsdetermines the priority of the results data.
            The first characteristic in the table has the highest priority, thesubsequent characteristics have a lower priority.

            Default
            The table is empty by default. This means that the results data issorted according to the data fields in the DataStore table.

            Description
            Result of the query.
            It is an internal table which contains the list of values of the chosenInfoObjects.
            The table is made up of two fields: CONTINUATION and DATA.
            The DATA field contains the actual data in a flat, 250-bytes-longstructure. Because this length may not be enough, several lines may becreated against a single DataStore table entry. When this occurs, thelines following the first are marked with an "X" in the CONTINUATIONfield.

            Description
            Selection criteria to be applied in the read process.
            You can specify for each characteristic InfoObject a range of values.
            Only DataStore entries matching all the defined criteria will beselected.

            Default
            By default the selection criteria table is empty, so that all theDataStore object entries are selected.

1642275Reading large amounts using BAPI_ODSO_READ_DATA_UC