Creating a Copy of an R/3 Source System 
Procedure

Replace the source test system with a copy of the source production system.
Using Tools ® ABAP Workbench ® Development ® Function builder call up the function module RSA_BIW_DISCONNECT in single test.
Enter the name of the current system pairs by filling the parameter I_BIW_LOGSYS with RLOGSYS and the parameter I_OLTP_LOGSYS with SLOGSYS. Do not fill the parameter I_FORCE_DELETE. Repeat this process for all entries in the table RSBASIDOC.
The obsolete system connections are deleted.
To do this select Source system tree ® Your source system ® Context menu (right mouse button) ® Restore in the BW Administrator Workbench Modeling. You get to the Creating an R/3 Source system screen. Enter the required data. For user in the source system enter the user that you gave in step 6.
Result
The source system is recreated, the relevant communication parameters are matched and a Metadata upload is carried out in BW. By restoring the source system you can extract data from the copied system after the copy and transfer it into BW.