0% found this document useful (0 votes)
178 views

SAP Client Copy - Client Delete

The document discusses client copy in SAP systems. Client copy allows copying components from an existing client to another client, which can be in the same or different R/3 system. Copying clients requires significant system resources and can take several hours. When copying, the user can select what components to transfer, such as user masters, customizing, or transaction data. There are also considerations for number ranges, table selection and structures between systems.

Uploaded by

Yash Rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views

SAP Client Copy - Client Delete

The document discusses client copy in SAP systems. Client copy allows copying components from an existing client to another client, which can be in the same or different R/3 system. Copying clients requires significant system resources and can take several hours. When copying, the user can select what components to transfer, such as user masters, customizing, or transaction data. There are also considerations for number ranges, table selection and structures between systems.

Uploaded by

Yash Rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 15

Client copy/ client delete Praveen Bheemarapu

Client Copy

Use

The Client Copy tool allows you to copy selected components of an existing client to
another client. The target client can either be in the same R/3 system or in another R/3
system.

Resource Requirements:

Copying clients requires a large amount of system resources. To avoid premature


termination due to bottlenecks, you should ensure that enough resources are available by
considering the following points:
Database storage space
Perform a test run before copying a client. This test run determines which tables are to be
changed.

For ORACLE, INFORMIX, ADABAS and DB2/6000 databases, you can check the test
run log to see whether there is sufficient database space available.

 Note that only an estimate of storage requirements is possible, because space already
allocated, but not yet used, is not taken into account. A client without application data
needs approximately 150-200 MB of storage space in the database.

 For pooled tables, the estimate is very imprecise, because their extent size is very
large. Therefore, you have to assume that a new extent is required for each pooled
table, which must be added to the estimate.

Runtime :
Copying a client can take several hours, and even users working in clients other than the

source or target client can make the time longer. For example, locks resulting from work

being done in a third client in the same system can also obstruct the processing of

individual objects. From a technical point of view, you can work in the system while
Client copy/ client delete Praveen Bheemarapu

client copy is running. However, you are strongly advised not to do this or do it in

exceptional cases only.

Implementation Considerations:
You can use client copy to set up the following clients:

 New clients based on SAP's reference client 000 when the R/3 System is first
implemented
 Training clients
 Demonstration clients
 Test clients
 Production clients

When you create your first client by copying it, we strongly recommend that you use
profile SAP_CUST.

You are no longer required to transport clients before you can copy clients between
systems. Instead, you can make a remote copy. Nevertheless, SAP will provide continued
support for the transport function.

Starting with Release 4.6A, client copy is much quicker due to parallel processing. The
parallel processes are dynamically generated at runtime. The factor that influences copy
speed is now the underlying database.

Features:
When copying clients, you can select what you want to transfer from the source client to
the target client:

 User masters: You select this option, for example, if you want to give all users of
an existing client the same authorizations in the target client.
 Client-specific Customizing: You select this option, for example, if you want to
set up a new client in an existing system.
 Client-specific Customizing and master/transaction data: You select this
option, for example, if you want to set up a test client that is identical to the
production client (in the same system).
Client copy/ client delete Praveen Bheemarapu

 Client-specific and cross-client Customizing: You select this option, for


example, if you want to set up a quality assurance system based on the production
client of another system.
 Client-specific and cross-client Customizing and master/transaction data:
You select this option, for example, if you want to set up a test client based on the
production client of another system.

When the copy process is completed, the client copy tool automatically generates all
ABAP Dictionary objects that were created as a result of a generation process.

Normally, all client-specific data that has not been copied is deleted in the target client.

Restrictions:

Background Processing

You can copy clients either online or in the background, but SAP recommends that you
schedule client copies as background jobs for the following reasons:

 During client copy, you must ensure that no user logs on to the system. For
technical reasons, this cannot be ensured by means of automatic locks.

Since users already working in the target client cannot be locked automatically
before client copy starts, you must ensure that they leave the system.

 During client copies, users should also stop working in the source client. In some
cases, however, this is not possible, particularly, if the source client is the
production client. To avoid inconsistencies that may occur if users work while the
copy process is running, related tables are copied together.

 Since large volumes of data are involved in the copy process, copying or
transporting a client can take several hours. During this time, one or more dialog
processes are in use.

Note: The client copy tool generally uses one or more dialog processes even if you have
started it in the background.

Since client copy now works with parallel processes that are started by the system
as dialog processes, you must increase the default timeout value for these
processes. To do this, you set profile parameter MAX_WPRUN_TIME. You are
recommended to set a value of 30 minutes. On account of the R/3 structure, it is
not always possible to set the desired number of processes.
Client copy/ client delete Praveen Bheemarapu

 In distributed systems, the background process often runs on a database server.


This reduces the network load.

Cross-Client Data Involved in Cross-System Copies and in Transports:

When cross-client tables are transported, inconsistencies may occur in the target system:

 Scenario 1: You have just installed the target system. The first step in setting up the
clients involves importing a client from another system. Since there are no other
clients in the system yet, you can also copy the cross-client tables to ensure that all
Customizing settings remain consistent, including those pointing to cross-client
objects.

 Scenario 2: In the target system, you have set up clients whose data must not be
affected. The cross-client data must not be imported into the system from outside,
since the cross-client data overwrites existing data, so that the Customizing data of
the other clients in the target system is no longer consistent. Only the data in the new
client is consistent. This is why you should not transport the cross-client data. The
data in the other clients of the target system is then still usable, and only the new
client needs some post processing to reconcile the client-specific customizing data
copied with the cross-client Customizing data of the target system.

Technical Background

Number Ranges:

When copying a client, you have to take number ranges into account. The handling of
number ranges depends on how the data is processed:

Processing of data Handling of number ranges


Both Customizing data and Number ranges are copied with the data, because they
Client copy/ client delete Praveen Bheemarapu

application data are copied. are needed by the application data.


Only Customizing data is copied. Number ranges are reset, because the application data
that refers to them is deleted and then rebuilt.
Only Customizing data is copied, Number ranges of the source system and the
application data in the target system is application data of the target system are merged. We
not deleted. recommend that you do not use this option.

Table Selection and Table Classes

Depending on the copy option you have selected, the client copy tool determines the
purpose of the table in the system when the table is copied. For example, if you selected
the Customizing option, and the table belongs to Customizing, then the table is copied to
the target client. If the table contains application data, however, the table contents are not
copied, but deleted based on the Initialize & Recreate option.

To determine the purpose of a table, the client copy tool uses the delivery class assigned.
The client copy tool assumes that all tables belong to Customizing except those that have
classes L, A, and W:

L These tables should be empty in the new system.

A Application tables

W System tables that are filled internally; their contents are purely technical. W
tables are not taken into account by the client copy tool.

Identity of Table Structures


The following is only true for cross-system client copies.

So that you can set up a new client with the help of the client copy tool, the structures of
all tables to be copied must be identical in both the source and the target system.

 Client copy: Before the client copy process is started, the client copy tool
automatically performs a consistency check. If inconsistencies are detected, the
copy process is not started and an error message is displayed.

 Client transport: If an RFC connection can be established between the systems,


you can use the report RSCLICHK to determine whether the structures are the
same. If they are not, transport errors and inconsistencies may occur.
Client copy/ client delete Praveen Bheemarapu

Copy Profiles:

For copying clients, R/3 offers copy profiles that make it easier for you to select and
combine the components you want to copy. SAP delivers the following copy profiles:

SAP Copy Profiles


Copy profile Description
SAP_USR Copies user master records and profiles only.
SAP_CUST Copies all Customizing tables, including user profiles.
SAP_UCUS Copies all Customizing tables, including user data and user profiles.
SAP_ALL Copies all data belonging to a client.

Authorizations:

To be able to copy and transport clients, you need the appropriate authorizations. There
are two types of authorizations: general authorizations for client copy, and special
authorizations that depend on what you want to copy.

General authorizations for Client Copy


Authorization Allows you to
S_TABU_CLI Maintain cross-client tables.
S_TABU_DIS Maintain system tables.
S_CLIENT_IMP Import data when performing a client copy.
S_DATASET Access the file system.

The following authorizations are required to copy:


 User masters
 Client-specific Customizing and master/transaction data
 Client-specific and cross-client Customizing and master/transaction data

Copying User Profiles and User Master Records


Authorization Allows you to
S_USER_PRO Copy user profiles.
S_USER_GRP Copy user master records.
Client copy/ client delete Praveen Bheemarapu

The following authorizations are additionally required for client transports:

Transporting Clients
Authorization Allows you to
S_CTMS_ADMI Create object lists for client transport and copy object lists between
with two clients.
 TTYPE
'CLCP'
 ACTVT '01'

The user SAP* has all the required authorizations.

Maintaining Clients and Logical Systems:

Choose Administration >> System administration >>Administration >> Client admin >>
Client maintenance from the SAP main menu.

If you have maintained a logical system in each of the source and target clients and
assigned it to the client, the logical system names in the target client application data are
automatically converted after copying the application data (with copy profile SAP_ALL).

See under Basis >> Application Link Enabling (ALE) >> Prepare sender and receiver
systems >> Create logical systems in the implementation guide.

Copying Clients within the Same System:

 Choose Tools >> Administration >> Administration >> Client admin. >> Client
copy >> Local copy.
 Select a copy profile that matches your requirements.

 If you want to use the selected profile as a default setting, choose Profile >> Save
profile value.

 Enter the source client.


 Start the copy process.
Client copy/ client delete Praveen Bheemarapu

Normally, you should start this procedure as a background job. However, if you only

want to copy user data and profiles, you can run it online.

See also: Copy Profiles

Copying Clients Between Systems:

When you copy a client from one system to another, the data is transferred directly via

the RFC interface - there is no intermediate storage on hard disk:

 Choose Tools >> Administration >> Administration >> Client admin. >>
Client copy >> Remote copy.
 Select a copy profile that matches your requirements.
 Enter the RFC destination.
 Start the copy process.

Normally, you should start this procedure as a background job. However, if you only

want to copy user data and profiles, you can run it online.

Transporting Clients Between Systems:

You are no longer required to transport clients before you can copy clients between
systems. Instead, you can make a remote copy. Nevertheless, SAP will provide continued
support for the transport function.

During client transports, all languages of the source system are transported. They
overwrite the texts in the target system. Therefore, all texts are lost in the target system
whose language exists only in the target system but not in the source system.
Client copy/ client delete Praveen Bheemarapu

Procedure
 Choose Tools >> Administration >>Administration >> Client admin. >> Client
transport >> Client export.
 Select a copy profile that matches your requirements

Up to three transports are performed:

Transport Description
<SID>KO<no> Cross-client data.
<SID>KR<no> Client-specific data.
<SID>KX<no> Texts and forms.

The data export is performed automatically. The output of the export includes the name
of the transport requests that are to be imported.

To adapt the runtime environment to the current state of the data, you may need to
perform post processing activities.

Post processing After Client Import


Choose Tools >> Administration >>Administration >> Client admin. >> Client transport
>> Post-process import.

See also:
Copy Profiles

Copying Transport Requests Within the Same System:

You can use this function to transport Customizing changes to the target client that have
been made in the source client after the client copy.

Choose Tools >> Administration >> Administration >> Client admin. >> Special
functions >> Copy transport request.
Client copy/ client delete Praveen Bheemarapu

Displaying Copy Logs:

 Choose Tools >> Administration >> Administration >> Client admin. >> Copy
logs.

 The system displays a list of all client copies, where the logon client was
identical to the target client.

 To display the detailed log for a run, position your cursor on the appropriate run,
and choose Choose.

 The system displays a list that contains the following information:

o Copy type
o Profile
o Status
o User
o Tables where copy problems occurred
o Statistical info

 To view further details for the run, choose Details.

 The system displays a selection list. From this list, you can retrieve information
on the number of tables copied or the number of exit programs, for example.

 If copy problems occurred for a table during a local client copy, you can choose
Copy errors to copy these tables again.

Restarting Client Copy :

If a client copy terminates for technical reasons, for example, due to a database
shutdown, you can always restart the process from the point of termination:

 If you start a client copy or a client transport, and the previous process terminated
prematurely, the system automatically proposes restart mode with the same
parameter settings used for the copy that caused the termination.
 If the restarted process fails, the log displays a special note indicating possible
reasons for the error. Before you try to restart the program once again, eliminate
the error.
Client copy/ client delete Praveen Bheemarapu

Error Handling:

Client copies usually involve handling large volumes of data. This places a considerable
strain on the CPU and storage resources of the machine.

Depending on the data involved and the system configuration, the most likely errors are
listed below, together with the steps required to correct them.

Error Handling in Client Copy and Transport


Error Cause Solution Remarks
Write error in target client Usually a Check system log to
(1). tablespace determine name of
overflow. tablespace. Extend
tablespace and repeat
entire copy. You do not
have to delete it first.
System log messages None. These messages
"Syn. MC maintenance document special
deactivated fully" and functions that are
"Buffer TABL/TABLP used to improve
reset". performance and
guarantee
consistency.
Termination in exit Run log display to Client copy program
program after runtime of determine name of last has not terminated,
several hours (explanation exit program that has but an application
in ABAP runtime error caused termination. error has caused
log). termination.

Client Delete:

 The use of an R3trans script to delete a client "is incomplete"


and not advised by SAP to be used

 For more details and updates regarding client deletion see oss note 70643.
for additional details about client deletion with R3trans
See oss note 13391

Client Delete Pre-work


Client copy/ client delete Praveen Bheemarapu

There are certain steps that you must ensure are complete before starting the client delete;

1. Ensure there is no backup currently running for the system


a. Log on to the system at Unix.
b. cd /oracle/<SID>/sapbackup
Type tail back* this will display the last 10 lines of the backup log, the last line
will display the latest backup, if the return code listed is a 6 the backup is still
running and you will need to wait to start the client delete.
If a backup is running you must wait until it is finished in order to mitigate any
impact this may have on the performance of the copy.

2. Ensure any scheduled backups for the Target system are held whilst
archiving is turned off.

3. Turn archiving off (once no backups are running)


a. Firstly if there are any users currently logged on to the system (transaction
AL08), issue a system message that the system will be bounced in a few
moments.
i. Go to transaction SM02
ii. Select the create option and enter the message into the dialogue
box displayed
iii. Set the expiration date and select the Save button
b. To turn off archiving, firstly shutdown SAP;
i. sesu - <SID>adm
ii. Type stopsap R3
iii. When you receive the message Instance stopped, check that the
system is down by typing ps –ef | grep dw There should be no
entries visible for the SID you have just stopped.
iv. Exit from <SID>adm
v. sesu – ora<SID>
vi. Enter sapdba –u /
vii. Choose option f – Archive mode
viii. Select option a – Toggle database log mode

ix. Reply y to the message ‘instance will be bounced and shutdown


immediately
x. After a few moments, reply y to start-up the instance.
xi. The Archive mode menu should now show that Database Log
Mode is off.
xii. Exit sapdba
xiii. Exit from ora<SID> in order to restart SAP – ensure you are
<SID>adm
Client copy/ client delete Praveen Bheemarapu

xiv. Enter startsap R3, when the message Instance started is received,
check the instance is running by typing ps –ef | grep dw and
looking for the SID that you have just re-started.
c. Remove the system message if it is still valid

4. A consequence of shutting down SAP is the interrupt of the SMTP mail processes
within Unix, you must manually re-start the processes;
a. Within Unix sesu - <SID>adm
b. cd /sapmnt/<SID>/exe or cdexe
c. Check if the processes are still running by issuing a ps –ef | grep ml, if
there are any processes running, the Process Ids (pid) they are running
under will need to be stopped.
d. Enter a kill <pid> -9
e. Enter ll *mail* to display the mailstart<client> files
f. Enter ./mailstart<client> to restart the scripts

5. Another problem, which often occurs when an ES system is bounced is that you
can no longer logon to SAP. Instead of going to the login screen the following
error message is displayed – “Error in logon balancing routine (rc=82 err=7),
Logon group <xxxxx> not found”. To remove this error;
a. Create a new entry in your SAPGUI to logon directly to the server
<sid>.na.pg.com
b. Use the new entry to log on to SAP.
c. Enter transaction SMLG
d. Select Go to  Load Distribution from the menu, the CCMS: Load
Distribution menu should now be displayed
Client copy/ client delete Praveen Bheemarapu

e. Double-click on each of the entries in the Logon group; the standard


entries in SAPGUI will now work.

6. Since the ES client delete/copy process involves five processes, an important step
before starting any processes is to check that there are enough batch processes
available in order to carryout the work;
a. Enter transaction SM50 and check there are at least five batch processes
available (Note: If doing a local copy, but starting it remotely, you will
need to ensure there are five batch and dialog processes available)
b. If there are not enough batch processes available, the Operation Modes
will need to be switched.
c. Enter transaction RZ04, double click on the current Op Mode and it will
show you the options available and how many batch processes are
assigned to the Op Mode.
d. To manually switch Op modes, enter transaction RZ03
e. Select the Choose Op Mode button from the toolbar, select the option that
was the most appropriate when viewing the Op modes in RZ04, and press
the Choose button.
f. Once you have chosen an Op Mode, select the server you want to change
and then use Control  Switch Op Mode  Selected Servers from the
menu
g. To check the Op Modes have changed successfully, enter transaction
SM50 and count the number of batch/dialog work processes

7. The next step is to prepare the user the delete will be conducted under – SAP*;
a. Make sure you are on the target client for the delete/copy and go to
transaction SU01
b. Delete the user SAP*
c. Log off the Target client and log back on to the Target client in as SAP*
(password= pass)
Client copy/ client delete Praveen Bheemarapu

Pre Requisites:

 Check that last backup completed successfully before


starting a client deletion

 Tablespace overflowing will not occur. Saparch might fill if much information is
deleted. This is roughly the only thing to check when running client deletion.

Procedure:
 Log on to the client to be deleted.
 Choose Administration >> System administration >> Administration >> Client
admin. >> Special Functions >> Delete Client.
 Use transaction SCC5 to delete a client from an SAP system
 You can also specify whether you want to delete the client from the client
administration (T000) and press the Background button to run the client deletion
in background.
 Setup the parallel process parameters.
 Start the deletion

Use of Parallel Processes:

 You can use parallel processes for remote and local copies and to delete clients, to
exploit the capacity of your database better.

 The transactions contain a Parallel Processes Parameter pushbutton to select the


maximum number of processes to be used and their RFC server group.

Note: It is recommended to reorganize the database after deletion of a large client,


because after client deletion the number of rows in a table is decreased, but the total
number of extents of the tables will remain the same. Reorganization is necessary to
decrease the number of extents for the tables.

You might also like