
Part 5 - Using System Data
Use
You can run tests in remote systems. This is done through system data containers containing the required information about the RFC connections to the other systems. The test script itself is always on the local system.
Using a system data container in a test configuration is similar to using one in a test script. The system data specified in the test configuration overrides the system data in the test script. Test configurations will be covered later in this tutorial.
Prerequisites
You have completed the earlier parts of this tutorial.
You have the appropriate authorizations for the RFC destinations that you will use. These RFC destinations must contain transaction FK01, and table LFA1. If this is not the case, you can still do this tutorial by using the system that you are currently in as an RFC destination.
Procedure
Creating RFC Destinations
|
Field |
Comment |
|
RFC destination |
Enter a name for the RFC destination. For example, XYZ_RFC1 (where XYZ are your initials). |
|
Connection type |
For a connection to an R/3 System, enter 3. |
|
Description |
Enter a short description. |
|
Load distrib. |
Load balancing. Select Yes. |
|
Target system |
Enter the name of the target system. For example, Q1C. |
|
Msg. server |
Enter the host. You can find this by logging on to the target system and choosing System ® Status.... |
|
Group |
Enter the group. For example PUBLIC. |
|
Language |
Enter the logon language. For example EN. |
|
Client |
Enter the client. For example, 000. |
|
User |
Enter a user name that exists for the target system. |
|
Password |
You need to enter the password for the user so that tests in remote systems can be run automatically. |

Creating System Data Containers
.You are now in the system data editor.
A default target system is already defined. It is called NONE. This target system is the current system.
.The Instance Description field is automatically filled.

Using a System Data Container in a Test Script
There is an entry in the log that states the system in which the test script was executed.

LFA1_1-LIFNR = &MS1.
CHETAB ( LFA1 , LFA1_1 ).
CHETAB ( LFA1 , LFA1_1 , NONE ).
CHETAB ( LFA1 , LFA1_1 , TARGET_2 ).
The first line assigns the message variable to the field LIFNR of the command interface LFA1_1. You are using the same command interface for all the commands.
The first CHETAB checks the table in the maintenance system. You assigned TARGET_1 to the maintenance system. Second CHETAB checks the table in the current system – that is, the system where eCATT and the test script are. The third CHETAB checks the table in the system specified by TARGET_2 in the system data container. If a CHETAB finds a matching record, the check is marked with a
in the log. If there is no matching record, the check is marked by a
in the log.


The point to remember is that the names of the target systems remain the same in the test script. It is the RFC destinations that are assigned to those names that are changed in the system data containers.
Summary
A system data container contains one or more target systems.
A target system specifies an RFC destination.
To execute a test script in another system you enter a system data container and a target system.
You can change the target systems of eCATT commands by swapping in different system data containers.