sapdev logo background
sapdev logo sapdev logo
Comments

SAP DATA OBJECTS USAGE documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

Operand Type
An operand position is typed using an operand type, which is complete or generic and can also be dependent on other operand positions, as is the case for statements, for example. When a statement is executed, an operand with a suitable data type is expected. If a data object specified at an operand position has a different data type than the operand type, the system generally tries to convert the content of the data object to the operand type on the basis of the conversion rules at writer positions , and in the other direction at read positions . Note that every conversion leads to a longer runtime. If no appropriate conversion rules have been defined, or the content cannot be converted, a syntax error occurs or an exception is raised. Deviations from this rule, for example that the data object must exactly match the operand type, or the data object is to be interpreted as an operand type, regardless of its actual type ( casting ), are described in the individual statements.

Operand positions for elementary data objects
For operand positions for
elementary data objects , the following must be specified when the statement is executed, depending on the operand type:
  • character-like data objects

  • numeric data objects

  • byte-like data objects

  • (area code) number. Generic, typed formal parameters or field symbols can also be specified statically if they are typed more generally than the expected type.

    Note
    In non-Unicode programs , flat structures can also be used at all operand positions where elementary fields are expected. In Unicode programs, this is only possible if the components of the structure are flat and character-like. In both cases, the structure is handled in the same way as a single data object of type c (implicit casting).

    Operand positions for structures
    Structures must be specified at operand positions for structures when the statement is executed. Formal parameters or field symbols of generic type data or
    any can also be specified statically.

    Operand positions for internal tables
    Internal tables must be specified at operand positions for internal tables , both statically and when the statement is executed. Generic formal parameters and field symbols can only be specified if they are typed with at least the generic type any table . Only index tables can be specified at operand positions that include index access, and generic formal parameters and field symbols must be typed with at least the generic type index table .

    Operand positions for reference variables
    Depending on the operand type, either data or object reference variables must be specified at operand positions for reference variables when the statement is executed. Formal parameters or field symbols of generic type data or any can also be specified statically.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    DATA_OBJECTS_STRUCTURE
    DATA_OBJECTS_USAGE_BYTELIKE




    comments powered by Disqus