Ansicht
Dokumentation

ABENOO_OBS_READ_DBTAB_1 - OO OBS READ DBTAB 1

ABENOO_OBS_READ_DBTAB_1 - OO OBS READ DBTAB 1

General Data in Customer Master   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

Cannot Use READ TABLE

You cannot use READ TABLE to read data from database tables in ABAP Objects.

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

t100 = space.
t100-sprsl = 'D'.
t100-arbgb = 'BC'.
t100-msgnr = '100'.

READ TABLE t100.

Correct syntax:

DATA wa TYPE t100.

SELECT SINGLE * FROM t100 INTO wa WHERE sprsl = 'D'  AND
                                        arbgb = 'BC' AND
                                        msgnr = '100'.

Cause:

The Open-SQL statement SELECT has replaced READ TABLE. The latter works only with database tables whose names correspond to the naming conventions for R/2-ATAB tables (maximum of 5 characters, starting with T) and with table work areas declared using TABLES, which are not supported in ABAP Objects. Generic key values are used for accesses, which are taken from the filled area of the table work area from left to right. Instead, declare the key explicitly in the WHERE clause of the SELECT statement.






Vendor Master (General Section)   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 1746 Date: 20240328 Time: 145708     sap01-206 ( 30 ms )