Fonction SAP BAPI_ODSO_READ_DATA_UC - Reads Data From A DataSource (Unicode)

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CODEPAGE BAPI6116XX-CODEPAGE N 4 X Code Page of Caller
MAXROWS BAPI6116XX-MAXROWS I 4 X Maximum Number of Lines of Hits
ODSOBJECT BAPI6116-ODSOBJECT C 30 Data Store
SELECTALLINFOOBJECTS BAPI6116XX-ALLINFOOBJECTS C 1 X Boolean
UNICODE BAPI6116XX-ALLINFOOBJECTS C 1 X Is Initiator Unicode-Enabled?

Paramètre Reférence Type Long. Description
NUMROWS BAPI6116XX-NUMROWS I 4 Maximum Number of Lines of Hits
RETURN BAPIRET2 u 548 Return Parameter

Paramètre Reférence Long. Facultatif Description
DATALAYOUT BAPI6116DALO 43 X Layout of the InfoObjects in the Data-Table Structure
INFOOBJECTLIST BAPI6116IOLS 30 X Info Object List
ORDERBY BAPI6116IOLS 30 X Info Object List
RESULTDATA BAPI6116DAUC 256 X Data - Data Record with Continuation Indicator
SELECTIONCRITERIA BAPI6116SLIO 123 X SELECT-OPTION Structure on Info Object

Functionality
The BAPI "BAPI_ODSO_READ_DATA_UC" reads the records of the activetable of a DataStore object.
ODSOBJECT
Name of the DataStore object to be read
SELECTALLINFOOBJECTS,,
'X' - all InfoObjects of the DataStore object are selected
' ' - only InfoObjects of the parameter INFOOBJECTLIST areselected
INFOOBJECTLIST,,
InfoObjects to be selected
ORDERBY
InfoObjects according to which the data selected is sorted
Note: If this parameter is filled, either the SELECTALLINFOOBJECTS
option must be selected or the corresponding InfoObjects must alsobe included in the INFOOBJECTLIST.
SELECTIONCRITERIA
Selection criteria for the data selection (see under NOTE section)
MAXROWS
Maximum number of data records to be transferred
CODEPAGE / UNICODE
If the BAPI is called via asynchronous RFC, the CODEPAGEparameter must contain the current codepage of the calling Systems. Youmust also specify whether the calling system is unicode-enabled or not(in the UNICODE parameter).
If the BAPI is called via synchronous or transactional RFC or if a localfunction call is used, these paramters may remain blank.
NUMROWS
Number of records in the output structure (see sections below)
RETURN
Information about possible errors
DATALAYOUT
The data layout describes the structure of the results tableRESULTDATA (see next point). You can use the offset and thelength to determine where exactly in the result string the values of theselected InfoObjects are located.
RESULTDATA
The table RESULTDATA contains the result data packed as a string.If the packed data exceeds a string length of 250 characters, it is
interrupted and a second result line is inserted with theCONTINUATION flag set. (For information about unpacking data,see under the NOTE section.)

Notes

  • You can either set the SELECTALLINFOOBJECTS flag or the
  • INFOOBJECTLIST flag, but not both simultaneously.
    • The tables SELECTIONCRITERIA and ORDERBY may only contain
    • InfoObjects of the type CHARACTER. No display attributes or keycharacteristics are allowed in these tables.
      • The following rules apply for selection criteria:

      • The conditions are based on the SELECTOPTIONS structure
        The following values are valid in the SIGN field:
        'E' = exclude
        'I' = include
        The following values are valid in the OPTION field:
        'EQ' = equal to
        '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' = lies between (upper and lower limits)
        • Table SELECTIONCRITERIA must contain the technical name of the
        • InfoObject in the IOBJNM field for each entry (not only onetime).
          • Conditions for the same InfoObject (regardless of the number and
          • sequence in the table) are treated as "OR" operations. Conditions fordifferent InfoObjects are treated as "AND" operations.
            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 or CUST-B
            and
            0MATERIAL = MAT-1
            Values are returned for the selected InfoObjects only.
            • The data is not aggregated, in other words, the RESULTDATA table
            • can return identical rows (one row for each row in the active table ofthe DataStore object).
              • To unpack the result data, you must perform the following steps:

              • Merge result rows of the RESULTDATA table that belong togetherinto one result row
                Each row may contain no more than the number of characters specified inthe USABLE field
                A result row belongs to the previous row if the CONTINUATION flagis set
                The values of the selected InfoObject can be read from the merged resultrow using the OFFSET and LENGTH values of the data layout

1689636BAPI_ODSO_READ_DATA_UC: Parameter MAXROWS has no effect
1642275Reading large amounts using BAPI_ODSO_READ_DATA_UC
1297004BI7.0(21) BAPI_ODSO_READ_DATA_UC and "Only Atribute" char.