You would like to make a system refresh from production to a quality assurance system. But after this refresh, you will have to reconfigure some things back. For example, the state of SLICENSE, SM59, WE20, WE21, BD64 transactions.
Here is an example of how to put SM59 data into a transport request and import it after the system refresh is finished.
Here is a catalog structure:
export_sm59.sh:R3trans -w /usr/sap/trans/EXPORT/SM59/LOG/EXPORT_SM59.log /usr/sap/trans/EXPORT/SM59/R3T/export_sm59.r3t
export_sm59.r3t:
Export
file '/usr/sap/trans/EXPORT/SM59/DUMP/SM59.DMP'
delete from rfcattrib
select * from rfcattrib
delete from rfcdes
select * from rfcdes
delete from rfcdoc
select * from rfcdoc
delete from rfccheck
select * from rfccheck
import_sm59.sh:
R3trans -w /usr/sap/trans/EXPORT/SM59/LOG/IMPORT_SM59.log /usr/sap/trans/EXPORT/SM59/R3T/import_sm59.r3t
import_sm59.r3t:
import file = '/usr/sap/trans/EXPORT/SM59/DUMP/SM59.DMP'
So you need to run :
- export_sm59.sh before system refresh begins. It triggers the script export_sm59.r3t to export SM59 data to a transport request
- import_sm59.sh after system refresh ends. It triggers the script import_sm59.r3t to import SM59 data from the transport request
Please note that in this case SM59 data will be rewritten, but not added.
In addition, this command doesn’t mean that it will remove any data from the tables, it’s related to the created transport request:delete from rfcattrib
select * from rfcattrib
It was tested with all mentioned transactions above, the main question is which tables should be used? =)