Entering content frameBackground documentation Part 5 - Using System Data Locate the document in its SAP Library structure

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

  1. Use transaction SM59 to create an RFC destination. Enter the following information:
  2. 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.

    This graphic is explained in the accompanying text

  3. Create a second RFC destination. Call it XYZ_RFC2 (where XYZ are your initials).
  4. Creating System Data Containers

  5. On Extended Computer Aided Test Tool: Initial Screen, select System Data.
  6. In the System Data field, enter a name for the system data container. Name it XYZ_SDC1, where XYZ are your initials.
  7. Choose This graphic is explained in the accompanying text.
  8. You are now in the system data editor.

  9. Choose the Attribs tab and enter a short description in the Title field.
  10. Choose the System Data tab.
  11. A default target system is already defined. It is called NONE. This target system is the current system.

  12. Choose This graphic is explained in the accompanying text.
  13. In the Target System field, enter a name for the target system. Call it TARGET_1.
  14. In the RFC Destination field, enter the name (XYZ_RFC1) of the RFC destination that you created earlier.
  15. Choose Enter.
  16. The Instance Description field is automatically filled.

  17. Create a second target system called TARGET_2 with the RFC destination XYZ_RFC2.
  18. This graphic is explained in the accompanying text

  19. Save the system data container.
  20. Using a System Data Container in a Test Script

  21. Open your first test script (XYZ_FK01) for editing in the test script editor.
  22. Choose the Attributes tab.
  23. In the System Data Container field, enter the name of the system data container that you created earlier (XYZ_SDC1).
  24. In the Target System field, enter TARGET_1.
  25. Save and execute the test script.
  26. Examine the log.
  27. There is an entry in the log that states the system in which the test script was executed.

    This graphic is explained in the accompanying text

  28. In the command editor, add the following lines:
  29. 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 This graphic is explained in the accompanying text in the log. If there is no matching record, the check is marked by a This graphic is explained in the accompanying text in the log.

    This graphic is explained in the accompanying text

  30. Create a second system data container by copying XYZ_SDC1. Name it XYZ_SDC2, where XYZ are your initials.
  31. Edit XYZ_SDC2 so that all the RFC Destination fields contain NONE.
  32. In the test script, choose the Attributes tab and enter XYZ_SDC2 in the System Data Container field.
  33. Execute the test script. From the log, you should see that the target systems have changed to the current system.

This graphic is explained in the accompanying text

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.

Leaving content frame