Search This Blog

Showing posts with label memory id. Show all posts
Showing posts with label memory id. Show all posts

Thursday, December 03, 2015

Import and Export to Cluster Databases

http://wiki.scn.sap.com/wiki/display/Snippets/Import+and+Export+to+Cluster+Databases 

Export some data:
1:  REPORT zshukswe19               .  
2:  TABLES indx.  
3:  DATA: int_indx TYPE TABLE OF indx,  
4:     indxkey TYPE indx-srtfd,  
5:     wf_data(11) TYPE c VALUE 'EXPORTCHECK'.  
6:  BREAK-POINT.  
7:  *In this example we will export wf_data to INDX cluster database  
8:  *In other case we can export internal table etc also  
9:  indx-aedat = sy-datum.  
10:  indx-usera = sy-uname.  
11:  indx-pgmid = sy-repid.  
12:  *Let us define a index key (It can be a unique key also)  
13:  indxkey = 'YCHECKID39'.  
14:  EXPORT wf_data FROM wf_data TO DATABASE indx(za)  
15:    ID indxkey.  
16:  BREAK-POINT.  
Import the data exported:
1:  REPORT zshukswe20               .  
2:  TABLES indx.  
3:  DATA: int_indx TYPE TABLE OF indx,  
4:     indxkey TYPE indx-srtfd,  
5:     wf_data(11) TYPE c.  
6:  BREAK-POINT.  
7:  indxkey = 'YCHECKID39'.  
8:  IMPORT wf_data TO wf_data FROM DATABASE indx(za) ID indxkey.  
Delete values from cluster table:
1:  REPORT zshukswe21               .  
2:  TABLES indx.  
3:  DATA: int_indx TYPE TABLE OF indx,  
4:     indxkey TYPE indx-srtfd,  
5:     wf_data(11) TYPE c.  
6:  BREAK-POINT.  
7:     
8:  indxkey = 'YCHECKID39'.  
9:  DELETE FROM DATABASE indx(za) ID indxkey.  
10:  BREAK-POINT.