January 4, 2010

BB note 004 - SAP TABLE copy with R3trans

Summary:
You have a production system PRD-300.
You want to copy working PRD-300 to development system DEV-400.

System client copy is failing because system tables below in DEV-400 does not exist/corrupted/etc.

Table name: XXXX

Solution:
You can do a manual copy of system table to DEV-400

Given:
Target: DEV-400
Source: PRD-300 are not my systems.
Table: XXXX
Shared Transport directory: \\SAPtrans

* Note that above are pigment of explanation.

Requirements:
1. Disk space for transport directory
> To house the physical disk

2. Disk space for Target system
> When the copy is commited to target system

3. Be very careful in import. Avoid disconnection. Get a stable network connection and use mstsc CONSOLE to avoid getting kicked away from your work.

4. No users using the table. Lock the target system if you have to.

SAP tcode:
SE38 > RSTABLESIZE
This will let you view the actual physical SAP table size.

Procedure:


1.0 Create Export control file


1.1 Go to your SAP transport directory (\\SAPtrans).
1.2 Create a control file for R3trans with the following contents to create a data file:

1.2.1 Create a new file called export_control (no extension)

1.2.2 Place the details below

export
client = [source client]
file = ‘[the path for the data file and the file name]’
select * from XXXX

Example: (this will create a file in tmp directory from your data in working PRD-300 client.)

export
client = 300
file = '\\SAPtrans\tmp\XXXX_Table_copy_01042010.txt'
select * from XXXX


Step 2.0 Execute R3trans and Export data from working system


2.1 Logon as [sid]adm in the source system
2.2 Open command prompt.
2.3 Go to SAP bin directory and execute R3trans [control file]

R3trans [control file]

Example:

>R3trans export_control
>This is r3trans version 6.14 (release 700 - 12.06.09 - >15:20:00).
>unicode enabled version
>r3trans finished (0000).

***The process will create a data file as defined in the control file. In example, this will create a file XXXX_Table_copy_01042010.txt in tmp directory from your data in working PRD-300 client.

Step 3.0 Create Import control file

3.1 Go to your SAP transport directory (\\SAPtrans).
3.2 Create a control file for R3trans with the following contents to create a data file:

3.2.1 Create a new file called IMPORT_control (no extension)

3.2.2 Place the details below:

import
client = [source client]
file = ‘[the path for the data file and the file name]’
select * from XXXX

Example: (this will import table info from the physical data
in XXXX_Table_copy_01042010.txt to DEV client 400)

import
client = 400
file = '\\SAPtrans\tmp\XXXX_Table_copy_01042010.txt'

Step 4.0 Import the changes with R3trans

4.1 Logon as [sid]adm in the source system
4.2 Open command prompt.
4.3 Go to SAP bin directory and execute R3trans [control file]

R3trans [control file]

Example:

>R3trans IMPORT_control
>This is r3trans version 6.14 (release 700 - 12.06.09 - >15:20:00).
>unicode enabled version
>r3trans finished (0000).

When this is done. System table copy is completed.