Export Database Tables Using R3trans Command in SAP
Export Database Tables Using R3trans Command in SAP
The R3trans tool is used in SAP for exporting and importing database tables at a low
level. It is often used for system copies, data migration, troubleshooting, and backup
purposes.
cd /usr/sap/trans
nano export_table.ctrl
export
file = export_table.dat
select * from <TABLE_NAME>
export
file = export_table.dat
select * from T001
select * from MARA
cat export_table.log
Look for:
🔹 If you see 0008 or 0012, there was an error—check the log for details.
If you need to import the exported data into another SAP system:
nano import_table.ctrl
3. Add the following:
import
file = export_table.dat
cat import_table.log
Action Command
Create export control file nano export_table.ctrl
Run export R3trans -w export_table.log export_table.ctrl
Verify export log cat export_table.log
Transfer exported file to another system scp export_table.dat user@target:/usr/sap/trans/
Create import control file nano import_table.ctrl
Run import R3trans -w import_table.log import_table.ctrl
Check import log cat import_table.log
🎯 Conclusion
• R3trans is a powerful SAP tool for exporting and importing database tables.
• The log file (.log) shows the success or failure of the process.