Internal Additions

These additions are for internal use only.
Do not use them in application programs.


Extras:

1. ... FROM LOGFILE ID key

2. ... USING subr

Addition 1

... FROM LOGFILE ID key

Effect

Data objects are imported from update data records. As key, you have to specify the update key that was assigned by the system (inclusive ongoing order number).

Addition 2

... USING subr

Effect

This addition can be specified at IMPORT FROM DATABASE if a table work area dbtab is declared with TABLES for the used database table. The addition TO wa is not allowed. The data are not imported by the database table. Instead, the sub-program subr is called. In the sub-program, the first row of a data cluster must be provided in the table work area dbtab as it would be read from the database. After that, the sub-program gets automatically as often called until a complete data cluster has been imported, whereby the table work area dbtab has to be filled accordingly at every call.

The sub-program has to be defined in the same program and its name must contain the name of the database table as prefix "dbtab_". The sub-program must have a USING-parameter of the type any, which is not populated at the moment.

Example

Export of a data cluster into an internal table instead of a database table. After that, import from the internal table

TABLES indx.

DATA indx_tab TYPE TABLE OF indx.

DATA sflight_tab TYPE TABLE OF sflight.

SELECT * FROM sflight INTO TABLE sflight_tab.

EXPORT sflight_tab TO DATABASE indx(hk) ID 'FLIGHTS'
       USING indx_export.

...

indx-srtf2 = 0.
IMPORT sflight_tab FROM DATABASE indx(hk) ID 'FLIGHTS'
       USING indx_import.

...

FORM indx_export USING foo.
  APPEND indx TO indx_tab.
ENDFORM.

FORM indx_import USING foo.
  READ TABLE indx_tab INTO indx WITH KEY srtf2 = indx-srtf2.
  indx-srtf2 = indx-srtf2 + 1.
ENDFORM.