IMPORT - Internal Additions
These additions are for internal use only. Do not use them in application programs.
... FROM LOGFILE ID key
Imports data objects from update data records.
key expects the update key
that was assigned by the system (with sequential request number). If the update key specified does not exist in the database table VBDATA, the runtime error IMPORT_UNEXPECTED_END_OF_DATA occurs.
... USING subr[(prog)]
This addition can be specified for IMPORT
FROM DATABASE if a table work area
dbtab is declared for the relevant
database table using
TO wa is not permitted. The data is not imported from the database
table. Instead, the subroutine
subr is called. In the subroutine, the first
row of a data cluster must be provided in the table work area
dbtab as it
would be read from the database. The subroutine is then called automatically as often as required until
a complete data cluster has been imported. The table work area
to be filled accordingly in every call. If no correct data cluster is provided, the behavior is undefined
and exceptions may be raised. If the addition
USING subr is used, the return
sy-subrc is set to the value 0 or 4. It is set to the value 4 if it has a value other than 0 when the subroutine is exited.
The subroutine must either be defined in the same program or in a program,
prog, specified explicitly. Its name must be prefixed with the name of the database table
("dbtab"). The subroutine must have a
USING parameter of type
any, which is currently not supplied.
FROM DATABASE ... USINGis not intended for external use; instead,
TO INTERNAL TABLEis used.
Specifying an external program
progis the same as the obsolete variant of
Exports a data cluster into an internal table instead of a database table. After that, imports from the internal table
TABLES demo_indx_table. DATA demo_indx_tab TYPE TABLE OF demo_indx_table. SELECT * FROM sflight INTO TABLE @DATA(sflight_tab). EXPORT sflight_tab TO DATABASE demo_indx_table(fl) ID 'FLIGHTS' USING demo_indx_table_export. ... demo_indx_table-srtf2 = 0. IMPORT sflight_tab FROM DATABASE demo_indx_table(fl) ID 'FLIGHTS' USING demo_indx_table_import. ... FORM demo_indx_table_export USING foo. APPEND demo_indx_table TO demo_indx_tab. ENDFORM. FORM demo_indx_table_import USING foo. demo_indx_table = demo_indx_tab[ srtf2 = demo_indx_table-srtf2 ]. demo_indx_table-srtf2 += 1. ENDFORM.