System copy – Affected Tables (Export) & Minimize Post Processing (Import)
SAP System copy – Affected tables
- The production SAP systems data is copied to other system(s) in one of the following use cases
- Testing SAP upgrades
- Refreshing test environments for better data quality which can avoid many incidents in Production.
- Replication for disaster recovery
- Other requirements from Customers/Projects,etc.,
- The post processing steps takes the major portion of the system copy process
- It becomes handy to export and import the system tables to minimize/avoid certain post processing steps , for example, to recreate the RFCs etc.,
- It is difficult to find the relevant tables to be exported ( before system copy) & Imported ( after system copy)
How to find the relevant tables ?
- Go to SE38 –> SCTC_LIST_TABLES –> select the component –> Execute ( F8)
You can select different components here and find out the relevant tables ( to be exported )
You can note down these list of table which can exported and imported to avoid post processing.
This feature is part of SAP LVM. Either you could use the full features of LVM ( Also refer transaction STC01 and different task lists available) or you could utilize this procedure to find the list of tables affected due to system copy.
SAP System copy – Minimize Post processing
You could use either DB independent method or DB dependent method( using DB tools) . Here we explain using DB independent method (R3trans) which is commonly used.
- Create the export.ctl file in the SAP application sever under a directory and fill with the list of table entries found in the above exercise
- run the following command ” R3trans -w export.log -u 1 export.ctl “
- It will create trans.dat ( data ) file and log file. Check the log for RC and table entries exported.
- After the System copy is completed, you can now (re)import the exported tables .
- You can truncate the tables ( which you were exported ) in the target system ( for example, QA system ) before the import . This may not be needed in latest R3trans versions. You can check the tables entries after import and check the against logs of the table export
- Create the import.ctl file with entries, for example,
- Run the command “R3trans -w import.log import.ctl “
- Check the log for the imported table entries and return code.