PUT Syntax Diagram

PUT

Short Reference

Syntax

PUT { node | <node> }.

Effect

This statement is only allowed in the database program of a logical database in the subprogram named PUT_node. In the runtime environment, it triggers the event GET node and in so doing, signals that data is available in the table work area of the node node. If there is an appropriate event block implemented in the executable program that is linked to the logical database, this is executed.

After the respective event block is processed, the system calls up the subprogram PUT_next_node of the node next_node that follows in the logical database structure, if this node is processed in the linked executable program. Once you leave this subprogram, the event GET node LATE is triggered and its event block, if implemented, is processed in the executable program.

The database program must contain one of the statements NODES or TABLES for the node node. The syntax of statement PUT is based on the node type.

Note

If the logical database is not directly linked with an executable program, rather is called via the function module LDB_PROCESS, the statement PUT does not trigger an event, but ensures that the appropriate callback routine is called in the calling program.

Example

The subprogram put_root_node is part of the database program of a logical database with a node root_node of type A, which is assigned the datatypes S_CARR_ID and S_CONN_ID from the ABAP Dictionary. Accordingly, a field symbol <root_node> is specified after PUT, and its value is fixed depending on the content of the corresponding row of the internal table dyn_node_types.

FORM put_root_node.

  DATA carr     TYPE s_carr_id.
  DATA conn     TYPE s_conn_id.
  DATA dyn_node LIKE LINE OF dyn_node_types.

  READ TABLE dyn_node_types INTO dyn_node
                            WITH KEY node = 'ROOT_NODE'.

  CASE dyn_node-type.
    WHEN 'S_CARR_ID'.
      carr = ...
      ASSIGN carr TO <root_node>.
    WHEN 'S_CONN_ID'.
      conn = ...
      ASSIGN conn TO <root_node>.
    WHEN OTHERS.
      EXIT.
  ENDCASE.

  PUT <root_node>.

ENDFORM.


The following rows can be part of an executable program that is linked to the logical database. The specification after TYPE in the statement NODES sets the type of the field symbol <root_node> and writes the type in the column type in the corresponding row in the internal table dyn_node_types in the database program of the logical database.

NODES root_node TYPE s_carr_id.
               "TYPE s_conn_id.

GET root_node.
  ...