0% found this document useful (0 votes)
218 views2 pages

Import and Export Keywords

This document discusses exporting and importing data between a database table and shared buffer using ABAP. It shows exporting a table of data to a database table and importing it back. It also shows exporting and importing data between fields and a table to a shared buffer using a key value.

Uploaded by

go2kaatt
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
218 views2 pages

Import and Export Keywords

This document discusses exporting and importing data between a database table and shared buffer using ABAP. It shows exporting a table of data to a database table and importing it back. It also shows exporting and importing data between fields and a table to a shared buffer using a key value.

Uploaded by

go2kaatt
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

EXPORT / IMPORT FROM DATABASE/SHARED BUFFER

Import / Export from Database TYPES: BEGIN OF tab_type, col1 TYPE i, col2 TYPE i, END OF tab_type. DATA: wa_indx TYPE demo_indx_table, wa_itab TYPE tab_type, itab TYPE STANDARD TABLE OF tab_type. WHILE sy-index < wa_itab-col1 = wa_itab-col2 = APPEND wa_itab ENDWHILE. 100. sy-index. sy-index ** 2. TO itab.

wa_indx-timestamp = sy-datum && sy-uzeit. wa_indx-userid = sy-uname. EXPORT tab = itab TO DATABASE demo_indx_table(SQ) FROM wa_indx ID 'TABLE'. TYPES: BEGIN OF tab, col1 TYPE i, col2 TYPE i, END OF tab. DATA: wa_indx TYPE demo_indx_table, wa_itab TYPE tab, itab TYPE STANDARD TABLE OF tab. IMPORT tab = itab FROM DATABASE demo_indx_table(SQ) TO wa_indx ID 'TABLE'. WRITE: wa_indx-timestamp, wa_indx-userid. ULINE. LOOP AT itab INTO wa_itab. WRITE: / wa_itab-col1, wa_itab-col2.

ENDLOOP. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Import / Export from Shared Buffer TABLES INDX. DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE', F1(4), F2 TYPE P, BEGIN OF ITAB3 OCCURS 2, CONT(4), END OF ITAB3. * Before export, fill the data fields * before CLUSTR. INDX-AEDAT = SY-DATUM. INDX-USERA = SY-UNAME. * Export data. EXPORT F1 F2 ITAB3 TO SHARED BUFFER INDX(ST) ID INDXKEY. TABLES INDX. DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE', F1(4), F2 TYPE P, BEGIN OF ITAB3 OCCURS 2, CONT(4), END OF ITAB3. * Import data. IMPORT F1 F2 ITAB3 FROM SHARED BUFFER INDX(ST) ID INDXKEY.

You might also like