Temp-Table Definitions

TEMP-TABLE definitions should be stored in include files to allow reuse unless it’s not used as a parameter.

It is considered very helpful to provide compile time parameters for the access mode to those temp-tables:

DEFINE {1} TEMP-TABLE ttXXX NO-UNDO ...

When temp-tables are used within Business Entities further options may be needed as compile time parameters:

DEFINE {&ACCESS} TEMP-TABLE eCustomer{&SUFFIX} NO-UNDO {&REFERENCE-ONLY} &IF DEFINED (NO-BEFORE) EQ 0 &THEN BEFORE-TABLE eCustomerBefore{&SUFFIX} &ENDIF

Include File Parameter

Description

Include File Parameter

Description

ACCESS

Class Member Access (PRIVATE/PROTECTED/STATIC)

SUFFIX

A name suffix if a routine needs to define the same temp-table twice in a single compile-unit

REFERENCE-ONLY

Allows to pass the "REFERENCE-ONLY" option when a temp-table is only needed with BIND or BY-REFERENCE

NO-BEFORE

When set, the temp-table definition omits the definition of the before-table

This allows to provide the PRIVATE/PROTECTED/STATIC option as a parameter to those include files if needed.