Mentor SAP

Logical Database Structure

If you want to use a logical database in an executable program, you must enter the name of the logical database in the program attributes.

 

Use the NODES <nodes> statement to specify the nodes of the logical database that you want to use in the program. The NODES statement creates a structure corresponding to the node type.

 

Technically, you can use the TABLES keyword instead of the NODES keyword, but this is not recommended.

 

When the logical database reads the data records, it uses the PUT <node> keyword that triggers the GET <node> event in the report program.

 

 

Node Types

Logical databases consist of several components. The structure determines the hierarchy and the read sequence of the data records. Node names can contain up to 14 characters.

 

Nodes can be of the following types:

 

 

Logical Database Events

When an executable program is run, the system triggers the START-OF-SELECTION event before control is transferred to the read routine of the logical database. The END-OF-SELECTION event is triggered after all GET events are processed, which means after all data records are read and processed.

 

The GET <node> event is triggered when the logical database supplies data for this node. Each GET event block can be processed several times, depending on how many records are supplied by the logical database. The structure of the logical database determines the sequence in which the GET events are processed.

 

The GET <node> LATE event is triggered when all subordinate nodes of <node> have been processed, before the data is read for the next <node> (that is, when a hierarchy level is completed).

 

If you use the GET event to output a classic list, the system automatically creates a line feed at the beginning of an event.

 

 

Program Flow and Termination Alternatives

There are several termination keywords that can be used in a GET event block. Each one differs slightly in terms of its impact on the processing.

 

If the specified condition is false, the CHECK keyword terminates the current processing block.

 

The keyword STOP terminates the program processing. However, the END-OF-SELECTION processing block is executed first, if it exists.

 

If the STOP statement is in the END-OF-SELECTION processing block, program processing ends immediately and a list is displayed.

 

The EXIT statement exits the program immediately, without executing the END-OF-SELECTION event. The list that has been generated so far is displayed.

 

You can also use the REJECT statement. This data record is not processed further. When reading the next data record, processing continues at the same hierarchy level. You can also use the REJECT statement in a subroutine.

 

 

Logical Database Selection Screens