You are on page 1of 42

HR eCATT guidelines

M.Vorwold

SAP AG 2002, Title of Presentation, Speaker Name 1

Contents

Guidlines writing professional eCATTs

eCATT Reuse Library Tips & Tricks

SAP AG 2002, Title of Presentation, Speaker Name 2

Guidelines writing professional eCATTs

Contents
Contents: 10 golden CATT/eCATT rules

How to create a module


Infotype modules Module for the infotypes 0000, 0002, 0001 (Ultra short hiring action) Which modules should I use? How to create an Infotype module How to create the Ultra short hiring action

SAP AG 2002, Title of Presentation, Speaker Name 4

Guidelines
10 golden CATT/eCATT rules:
1.

Create CATT/eCATT modules only for your own applications. Call transactions only by reference of a test module.

2.

3.

Every test module shall contain only 1 transaction.


Use only parameters to assign fixed values to a transaction. A test module should always be able to be used universal, therefore care of the choice of parameters and dynpros. Dont create new modules if you can also maintain existing ones. Always maintain your modules compatible. Write a documentation for each module and procedure. If you want to use transactions of other applications use the modules your colleagues created and ask the author for further extensions if necessary. Use variants to create more similar test cases.

4.

5.

6.

7.

8.

9.

10.

SAP AG 2002, Title of Presentation, Speaker Name 5

How to create a module


Every test module shall contain only 1 transaction

Nice to have:
A message check A database check

SAP AG 2002, Title of Presentation, Speaker Name 6

Ultrashort hiring action


eCATT module for Creating the basic Infotypes 0000, 0002, 0001

The naming convention of this eCATT is as follows:


HR_PA_3HIRE_ + country sign (e.g. HR_PA_3HIRE_DE)

What can I do with this module?


You can create a personnel number with the infotypes 0000, 0001 and 0002

SAP AG 2002, Title of Presentation, Speaker Name 7

Infotype modules
eCATT modules for Creation, Modifying, Copying, Deleting Infotypes The naming convention of these modules is as follows:
HR_IT + Infotype-No. + country sign (e.g. HR_IT0016XX)

What can I do with this modules?


Create a record (OKCODE = INS) Modify a record (OKCODE = MOD)

Copy a record (OKCODE = COP) Delete a record (OKCODE = DEL) Lock/Unlock a record (OKCODE = EDQ) (if supported by Infotype functionality)

SAP AG 2002, Title of Presentation, Speaker Name 8

Which modules should I use?


If your country uses the international Dynpro for a specific Infotype use the international Infotype modules and dont create a new one Create your own Infotype Catt module, if your country uses an own Dynpro for an international Infotype Also create your own Infotype Catt modules for your special country-specific Infotypes

SAP AG 2002, Title of Presentation, Speaker Name 9

How to create an infotype module


Recipe: Copy module HR_ITXXXXYY to a new name. naming convention: HR_IT + Infotypeno.(4digits) + country sign (ISO code) Change the following texts:
The Title The short description in the Functions-screen The long text (add some documentation specific for that Infotype)

SAP AG 2002, Title of Presentation, Speaker Name 10

How to create an Infotype module

If the Infotype has no subtype, change the attributes of the importparameter SUBTYPE and SUBTYPE_DY from Importparameter to Local parameter

SAP AG 2002, Title of Presentation, Speaker Name 11

How to create an Infotype module


Change the following functionality:
In the Functions screen in the first line after the comment lines replace the occurrences of the four ???? by the Infotype no (4 digits) Replace the line CHETAB PA0016 by CHETAB PAxxxx (xxxx: Infotype no (4 digits)) and parametrize the fields as follows: PERNR : &PERS_NO SUBTY : &SUBTYPE (or single quote, if the Infotype has no OBJPS SPRPS ENDDA

BEGDA SEQNR

Subtype) : &DB_LOCK_INDI : : &D02 : &D01 :

SAP AG 2002, Title of Presentation, Speaker Name 12

How to create an Infotype module


Change the first PA30 TCD-Call: Replace the second screen (MP001600 2000) by the screen MPxxxx00 2000 (xxxx: infotype no (4 digits))
Parametrize Fill

the fields of the Infotype dynpro (use BEGINDATE_DY, ENDDATE_DY for the dates and SUBTYPE_DY for the subtype) the OKCODE-field with V30

Replace the third screen (MP001600 2000) by the screen MPxxxx00 (xxxx: Infotype no (4 digits))
Fill

the OKCODE-field with V_OKCODE1

Replace the third screen (MP001600 2000) by the screen MPxxxx00 2000 (xxxx: Infotype no (4 digits))
Fill

the OKCODE-field with END

SAP AG 2002, Title of Presentation, Speaker Name 13

How to create an Infotype module


Change the second PA30 TCD-Call: Replace the second screen (MP001600 3000) by the screen MPxxxx00 3000 (xxxx: Infotype no (4 digits))
Fill

the OKCODE-field with &OKCODE

Fill

the CURSOR-field with &V01

Replace the third screen (MP001600 2000) by the screen MPxxxx00 2000 (xxxx: Infotype no (4 digits))
Parametrize

the fields of the Infotype Dynpro (use &BEGINDATE_DY, &ENDDATE_DY for the dates and &SUBTYPE_DY for the subtype)

Fill

the OKCODE-field with &V30

Dont change the fourth screen Replace the fifth screen (MP001600 3000) by the screen MPxxxx00 3000 (xxxx: Infotype no (4 digits))
Fill

the OKCODE-field with END

SAP AG 2002, Title of Presentation, Speaker Name 14

How to create an Infotype module


Change the order of the importparameter (The order of the importparameters should correspond to the order of the corresponding fields on the Dynpro)

Do a Syntax-Check! The module is ready to use

SAP AG 2002, Title of Presentation, Speaker Name 15

How to create the Ultra Short Hire Event


Creating the module for the Infotypes 0000, 0001, 0002: Copy the module HR_PA_3HIRE_XX Change the following texts:
Replace XX in the title (in the attributes) by your Country-Code (ISOCode) Replace the line TXT valid for an 'international' personnel number by TXT valid for a your country' personnel number

SAP AG 2002, Title of Presentation, Speaker Name 16

How to create the Ultra Short Hire Event


Replace the international Dynpro for Infotype 0002 by your country specific Dynpro for Infotype 0002.

SAP AG 2002, Title of Presentation, Speaker Name 17

How to create eCATT procedures


An eCATT for testing business scenarios should consist of different modules

It should not contain a TCD-Call

SAP AG 2002, Title of Presentation, Speaker Name 18

Reuse of eCATTs

Reuse of eCATTs

SAP AG 2002, Title of Presentation, Speaker Name 19

The HR Catt Reuse Library


What is the HR eCATT Reuse Library:
The HR eCATT Reuse Library is a Catalog, where you can find a lot of modules, which are of general interest

Who can write eCATTs for the Reuse Library?


Everybody can write eCATTs for the Reuse Library But: The CATTs should fulfil the following conditions
10

golden CATT/eCATT rules has to be a responsible person for the eCATT

There

SAP AG 2002, Title of Presentation, Speaker Name 20

The HR eCATT Reuse Library


How to find the HR eCATT Reuse Library:
In System ECA call transaction STWB_1 Choose testcatalog HR eCATT Reuse Library

SAP AG 2002, Title of Presentation, Speaker Name 21

The HR Catt Reuse Library


The structure of the Reuse Library
Customizing Infotypen Transaktionen Reports Werkzeuge Tips & Tricks

Remark: After the migration to eCATT not all modules in the Reuse Library have been reviewed yet. But if a module is not working, please contact the responsible person.

SAP AG 2002, Title of Presentation, Speaker Name 22

Tips & Tricks

Tips & Tricks

SAP AG 2002, Title of Presentation, Speaker Name 23

Events with PA30


For testing events use PA30 instead of PA40 (except you want to test explicitly PA40) Reasons:
The order in PA40 can change There is no search-functionality in the list in PA40 After the initial screen of PA40/PA30 it is technically the same

SAP AG 2002, Title of Presentation, Speaker Name 24

Sort order in lists


Sort order in lists To be independent of the sort order in a R3-list you should use the search-function of the list in your eCATT program

SAP AG 2002, Title of Presentation, Speaker Name 25

Technical tips and tricks


Tips & Tricks for finding an error or maintaining a Catt manually (not recording)

Contents:
Find out the dynpro or subscreen (System info) Find out the field (System info) Find out the OKCODE of a button or a menu (menu painter) Dynpro simulation in eCATT Maintain a subscreen

SAP AG 2002, Title of Presentation, Speaker Name 26

Technical details of a screen / field


Finding out technical details of a screen and field:
Example PA30:
Position Choose Result: The

cursor in the field personnel number menu path System -> Status (or F1 -> technical info)

SAPMP50A 1100

same for the date fields gives: SAPMP50A 0330

The same for the infotype field gives: SAPMP50A 0350 Reason: there are several subscreens on the dynpro

SAP AG 2002, Title of Presentation, Speaker Name 27

Technical details of a button


Finding out technical details of a button
Set the focus on the button:
Klick with the left Mouse button on the Button, hold the mouse button, drag the cursor away from the button, release the mouse button

Or klick on the button and hold the mouse button

Press F1 A Popup with the function code of that button appears You can use this function code in the OKCODE - field

SAP AG 2002, Title of Presentation, Speaker Name 28

Technical details of a menu item


Finding out technical details of a menu item
Choose the Menu path System -> Status You get a popup with the technical information Double click on the field GUI status You jump into the menu painter (SE41): Here you can see the OK-Codes for:
The The The

menu-items (navigation with double click) application toolbar

function keys

SAP AG 2002, Title of Presentation, Speaker Name 29

Dynpro simulation in eCATT (in TCD call)


To see the Dynpro simulation (like in the old CATT tool) proceed as follows:
Double click on the TCD call The XML editor will open in the right lower part of the eCATT editor (if not already open) In the tree open the hierarchy where the Dynpros are listed Position the cursor on a Dynpro

Press the button Simulate Screen The Dynpro simulation screen with the same functionality as in the old CATT tool will open

SAP AG 2002, Title of Presentation, Speaker Name 30

Subscreens
Maintaining a subscreen manually in a TCD call Recipe:
Go to the Dynpro simulation (see previous slide)

Press button Subscreens Double-click on the dot in the subscreen A popup appears, where you have to specify the Dynpro Go back Now you can maintain the fields

SAP AG 2002, Title of Presentation, Speaker Name 31

Checking a field
Check a value of a field or export a value from a field
Go to the Dynpro simulation (see some slides before) Position the cursor on the field you want to check
For For

checking the field press the button Check field reading the field press the button Check field

Enter a parameter name

SAP AG 2002, Title of Presentation, Speaker Name 32

Old and new CATT-Mode in eCATT


Up to release 31I CATT was technically the same as batch input (SY-BINPT was set always) But: there are some limitations with batch-input (no leave to transaction, ...) Release 40B and higher: There is a new Catt mode (called Catt mode w/o COMMIT WORK end) This should behave like online-execution You can decide for every transaction-call in an eCATT, in which mode it should run:
Double-click on the TCD call in the eCATT Double click in the XML editor on the root node (node Command Interface) There is a parameter called BINPT If this parameter is empty, it is the Catt mode w/o COMMIT WORK end If this parameter contains a X, it is the old CATT mode (like batch input)
SAP AG 2002, Title of Presentation, Speaker Name 33

When should I use what


For some transactions there are differences Default: New Catt-mode Cases where you could still use the old Catt mode:
In some cases it is more stable to use the old mode, because some popups dont appear etc. But there are limitations in Batch input-mode:
No

integration PA-PD

No

Dynamic Actions

See also the Document Use of Dynamic Actions in (e)CATT in the HCM (e)CATT Information folder in SAPNet !

SAP AG 2002, Title of Presentation, Speaker Name 34

Some Questions and Answers

FAQ

SAP AG 2002, Title of Presentation, Speaker Name 35

Remote test of lower releases


Question: Would it be possible to test also remotely from the ECA (Release 470) to lower G-systems? Answer: For starting also remotely into lower Releases a special Support Package has to be applied to the target system. Only G9C has that support package, so for testing remotely to lower releases, only Release 46C (= system G9C) is possible.

SAP AG 2002, Title of Presentation, Speaker Name 36

Testing with Test Catalogues


Question: Is it possible to create a Test Catalogue for my eCATTs?

Answer: Yes, but its only possible to input Test Configurations into a Test Catalogue. So you have to create a Test Configuration for your Test Script before putting it into a Test Catalogue

SAP AG 2002, Title of Presentation, Speaker Name 37

Checking the last message


Question: How to check the last message, which occurs in a TCD call Answer: Suppose there is a TCD call for PA30. Define a parameter (e.g. with name E_MESSAGES) with type ETTCD_MSG_TABTYPE and assign the message part of the PA30 interface to that parameter: TCD ( PA30 , PA30_1 ). E_MESSAGES = PA30_1-MSG.

Then check the message with the following statement in your eCATT:
CHEVAR E_MESSAGES[&MSX]-MSGNR = xxx'. (with xxx = the message number which you want to check) Remark: The special eCATT parameter &MSX contains the number of messages, which occurred during a TCD call.
SAP AG 2002, Title of Presentation, Speaker Name 38

Permitted messages in a transaction


Question: How can I use the old CATT functionality of permitted messages in in a transaction in eCATT Answer: Use the last dynpro SAPMSCEM 0001 of a transaction
at field or or
C

(9) LAST_MSG-NUM1 (11) LAST_MSG-NUM2 (13) LAST_MSG-NUM3 put in


to to MODE VALIN and nnn = permitted message number

nnn

See example Script: HR_PA_PU00 Permitted messages (for HR_PA_PU00):


001 Personnel number not yet assigned and 389 Personnel number nnnnnnnn was deleted completely

SAP AG 2002, Title of Presentation, Speaker Name 39

The old CHEERR * in eCATT


Question: Can I use the old CATT Command CHEERR * in the eCATT? Answer: Instead of the command CHEERR * use the new command:

ON_LAST_MESSAGE_CHECK(*).

Remark: This is an undocumented command in the eCATT tool and the syntax check will give an error, when finding this command, but it works anyway. If you migrate a CATT to eCATT CHEERR * will also be migrated to ON_LAST_MESSAGE_CHECK(*).

SAP AG 2002, Title of Presentation, Speaker Name 40

String operations in eCATT


Question: What should I do for concatenating 2 strings in eCATT?

Answer: With the &-sign you can concatenate strings. Examples: a1 = '12'. a2 = '34'. a3 = a1 & a2. a4 = 12 & 'ab'. a5 = '01.01.' & &JHR. -> Result: 1234 -> Result: 12ab -> Result: 01.01.2002

SAP AG 2002, Title of Presentation, Speaker Name 41

Additional information about the eCATT tool


Question: Where can I find some additional information about the eCATT tool?

Answer: There is a good Online Docu for the tool.


And there is a SAPNet page: http://abap.wdf.sapag.de:1080/GBU_Products/eCATT/index_framework.htm And also a newsgroup (where not only but among others also eCATT topics are discussed): news://news.sap.corp/sap.devel

SAP AG 2002, Title of Presentation, Speaker Name 42

You might also like