SDS homepage Email SDS follow SDS link to SDS SDS on facebook
 Home arrow Knowledgebase arrow Data Tools arrow CATT  
  If your browser does not support the SDS Knowledge Base menu, click here for an alternative.

SAP HR CATT Procedures

 

 

The Computer Aided Test Tool (CATT), not to be confused with CATS (Cross Application Time Sheet) was originally designed for testing purposes. It is a really useful tool for uploading data as well as repetitive configuration activities.

User Setup

Before you can execute a CATT procedure, you need to ensure that 2 relevant settings are in place.

  1. You need to ensure that the CATT checkbox is ticked on your own user settings - bottom left hand side on the "default" tab.
  2. You need to ensure that the client in which you are working is enabled to allow the running of CATT procedures. Use transaction code SCC4 to check and change the attributes of the client. On the bottom left hand side, the CATT checkbox should be ticked.

Creating a CATT Procedure

To get to the CATT screen, use the transaction code = SCAT

You will be taken to the main CATT screen titled "Computer Aided Test Tool: Initial Screen"

Choose your file name - use the customer name range starting with Y or Z.

Click on the TCD icon

Enter the transaction code and hit the return key. Run through the entire transaction, making sure that you populate the minimum required data. If SAP defaults certain data, you need to overwrite it so that it is recorded on the CATT - assuming of course that you can enter data into this field. Each time you hit the return key, SAP records the screen - you will notice the clock on the bottom left hand side of the screen.

Once you have finished the transaction and saved the data, click on the green back arrow, until you get back to the same dialogue box where you entered the transaction code.

Click on the blue/red circle icon to stop recording.

You now have to specify the attributes of the CATT on the screen titled "Test Case Attributes: Display test case Zxxxx"

You will need to enter an application area. Choose the relevant area.

Hit the green back arrow icon. You will be prompted to enter a development class in the dialog box. If you do not wish to transport the CATT (i.e. you wish to use the CATT only in the development client) then click on the icon "local object". The development class will be indicated as "$tmp". If you wish to transport the CATT then choose a development class that has been set up to allow transports.

Remember that CATT procedures, like ABAP programs, are client independent - which means that you can create it in one client and run it on any other client on that instance.

Even if you save the CATT as a local object, you can still execute the CATT in another client on another SAP server. When executing the CATT, choose the "Remote Execution" icon. You will then be prompted to log on to the client you choose from the RFC destination drop-down. (RFC stands for Remote Function Call and is the technical name given when linking 2 SAP clients/systems - naturally the RFC connection needs to have been set up to allow you to use this method)

Note: you may be blocked from running the CATT in other system clients due to restrictions on the client or on your user ID.

Save the CATT and then click on the green back arrow - click on the save icon if prompted to save again.

Choose Variables

You will now be taken back to the initial screen. You now need to stipulate which fields you need as variables. These are called parameters in a CATT procedure. Make sure that the radio button is on the "function" field on the initial screen.

Click on the "Change" icon. This will take you to the screen titled "CATT: Maintain Functions Test case Zxxxx"

You should have at least 1 function, which should have the function TCD. The object should be the transaction code that you used.

Click on the "Choose" icon (magnifying icon).

You will be taken to the screen titled "CATT: Function Details TCD Test Case Zxxxx". The different screen numbers are coloured red, whilst the descriptions should be in blue.

Double-click on the first entry or place the cursor in the field and click on the "Choose" icon.

You should be taken to a screen titled "Simulation of screen "SAPMPxxxxx" (1/n)" - where 1 refers to the first screen and "n" is the number of screen shots saved in the CATT.

Click on the field that you need to act as a variable and click on the Insert Import Parameter icon (Yellow T-square with 2 red arrows).

NB: Ensure that you choose the actual field and screen where you entered the data in SAP. Sounds like simple advice - but something that catches many users

At the bottom left hand side of the screen you should see "&xxxxx created" and the field contents on the screen should change colour.

Use the right arrow to move to the next screen. Once you have done this for all the screens where you have variables - use the green arrow to go back and save the CATT.

Check Parameters

At the initial screen you can change the defaults used in the CATT. The defaults are held in the "parameters" attribute which you need to check. Click on the change icon to edit and view the entries which have been proposed as variables and the parameters and defaults that are to be used.

If you wish to return a blank value then use the value ' ' i.e. single apostrophe space single apostrophe.

Output - Default Data

At the initial screen for CATT procedures, use the menu path

Goto arrow External Variants arrow Export Defaults

Choose the required menu path and target folder, where the system will place the file. The easiest file type to use is a text file (.txt extension).

Importing into Excel

Open the file in Excel. You will be prompted with the import wizard. Ensure that the radio button is set to "delimited". You can click on the finish icon - as long as you do not have any fields which start with a leading zero. If you do then you need to ensure that these are marked as "text" fields during the import process.

You will see that the fields specified as variables are in different columns.

The 1st row holds the technical field name, the 2nd the actual field name and the 3rd row holds the default values that you entered. Line 4 lets you know that changing the default data will not have any effect on the CATT. If you need to change any data you need to do so on SAP and re-export the file.

Insert your data into the correct columns from row 5 onwards.

Save File

Save the file as a text file. When exiting out of Excel you will get a warning message along the lines of "... is not in MS Excel xx format", do you wish to save your changes... Remember to say no at this point.

You need to exit the file. The CATT will give you an error in loading the file if you still have it open in Excel while trying to run the CATT procedure.

Execute File

Go back to SAP to the main screen for CATT. Choose you CATT and click on the execute icon.

Click on the Choose icon at the "External from file" option.

It is best to run it in foreground to test it for a few dummy runs or a small sample of the first few lines of the actual file. Just click on the enter key each time. The finished result gives you a log to reflect the successful results.

Run it in background mode when you are doing it "for real". You will still be able to retrieve the log by using the menu path: Utilities > Logs

Tips and Tricks

  • Can't run a CATT procedure - check the settings on your user profile and on the client (table T000)
  • Remember to overtype the data when recording the CATT - even if the data is defaulted. This ensures that the data is recorded as part of the CATT procedure
  • Remember to choose the correct field to default (if in doubt make all occurrences of the same field a variable - SAP will generally only use the correct one) - simple advice - but you may well be caught out
  • If you are still learning how to use CATT procedures, save the first few entries in a file and save it as a different name. Run this in the foreground. This will give you a chance of working out what the CATT procedure is doing and if it is behaving as it should be.
  • Before you run your CATT procedure with 1000's of entries, cut and paste the first 100 into a file and run this in background. Ultimately, you need to get the CATT to work in the background. Sometimes CATT procedures can work in the foreground and fall over when you run it in background. If you really can't get the CATT to run in the background, just run it in the foreground and hold the return key down to fly through the transactions. If you really must then you can always get a pencil, some bluetack and a heavy object. With a bit of engineering and balancing you can automate this basic function.
  • Before you run a CATT procedure, let all the HR users know so that they don't go into maintaining an employee's record, otherwise the CATT procedure will not update that employee's record. This will just save you having to mop up afterwards. This is avoidable, especially if someone is using fast entry when you are running your CATT procedure.
  • Check that the control records for all your relevant possible payroll areas are set to "correction mode".
  • Whilst your CATT procedure is running, you can open another session and go and look at the logs for the CATT procedures that have been run. You can get to them by using the menu path Utilities > Logs when on the main CATT procedures screen. Keep on clicking on the refresh button to get the very latest stats. The one that you are currently running should be at the top of the list.
  • If you are wishing to write a CATT procedure for Org Mgt, it is very difficult to do, using the normal simple and detail menu options. There is an expert mode screen which is used for reporting purposes, which can be used quite effectively for CATT procedures. The transaction code to use is PP02. You need to enter the contents of the "data sample" field in the following format: Object Type_Object Number*

    The employee number 5322 would be entered as follows: P 5322*

    You can do this with any object type.

 

 
 
Search Query


Your Input

We are always updating our articles and adding new ones to the list. Please let us know if there is a particular article you would like to see.
 
Bookmark and Share
Copyright © 2009 Strategic Data Solutions Ltd. All rights reserved   W3C valid xhtml