Entering content frame

Interface Work Areas Locate the document in its SAP Library structure

CautionThe following statements are practically obsolete and are only available to ensure compatibility with earlier Releases. To find out when you can still use these statements, see the keyword documentation.

 

Interface work areas are special named data objects that are used to pass data between

        Screens and ABAP programs

        Logical databases and ABAP programs

        ABAP programs and external subroutines.

Interface work areas are created in a shared data area of the programs between which the data is to be exchanged. All of the programs and procedures involved access this work area. To find out how to protect shared work areas against changes in procedures, refer to Global Data of the Main Program.

Screen Interfaces

One common kind of interface work area are table work areas, which you declare using the

TABLES dbtab.

This statement creates a structure with the same data type and the same name as a database table, a view, or a structure from the ABAP Dictionary.

Before Release 4.0, it was necessary to declare a database table dbtab to an ABAP program using the statement TABLES dbtab before you could access the table using Open SQL statements. This restriction no longer applies to Open SQL statements.

However, you still need to use the TABLESstatement if you want to define input/output fields on a screen with reference to database tables, views, or ABAP Dictionary structures (Get from Dict. function in the layout editor of the Structure linkScreen Painter). In the PBO event, the ABAP program sends the contents of the fields to the screen fields. In the PAI event, it receives the contents of the screen fields back into the corresponding components of the table work area.

This graphic is explained in the accompanying text

Logical Database Interfaces

Logical databases are special ABAP programs that read data for application programs. When a logical database is linked with an executable program, it passes data to the interface work area declared with the statement

NODES node.

This statement creates a variable node with reference to an ABAP Dictionary data type of the same name. If a node of the logical database refers to the same data type, the variable serves as an interface between the logical database and the executable program. If a node of a logical database refers to a database table, a view, or a flat structure from the ABAP Dictionary, you can use the TABLES statement instead of NODES.

For further information refer to Logical Databases.

External Subroutine Interfaces

If you have similar variables in different programs, you can store them in a shared data area. To do this, use the COMMON PARTaddition of the DATA statement. Common data areas of this kind can serve as interfaces to external subroutines. You can also use interface work areas defined with the TABLES and NODES statement as a common data area for external subroutines.

 

Leaving content frame