sapdev logo background
sapdev logo sapdev logo
Comments

SAP OO OBS SQL STAR 1 documentation, setup help and example usage



Return to SAP documentation index


INCLUDE
ARTICLE

Do Not Use *Work Area

The use of *work areas as an indicator for database tables or work areas in ABAP Objects is forbidden.

  • In ABAP Objects, the following statements cause an error message:


  • SELECT ... FROM *dbtab INTO ...

    INSERT *dbtab.

    UPDATE *dbtab.

    DELETE *dbtab.

    MODIFY *dbtab.
  • Correct syntax:


  • DATA wa TYPE dbtab.

    SELECT ... FROM dbtab INTO wa.

    INSERT dbtab FROM wa.
    or
    INSERT INTO dbtab VALUES wa.

    UPDATE dbtab FROM wa.
    or
    UPDATE dbtab SET ... .

    DELETE dbtab FROM wa.
    or
    DELETE FROM dbtab WHERE ...

    MODIFY dbtab FROM wa.
  • Reason:


  • The DATA statement, used to declare appropriately typed work areas, replaced the declaration of *work areas. You can only declare *work areas using the TABLES statement, which is not supported in ABAP Objects. You can only use *work areas in the short forms of
    Open-SQL statements, which are also not supported.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    OO_OBS_SORT_1
    OO_OBS_SQL_WA_1




    comments powered by Disqus