ecatt hr guide

42
SAP AG 2002, Title of Presentation, Speaker Name 1 M.Vorwold HR eCATT guidelines

Upload: mohamed-ziavudeen

Post on 19-Apr-2015

164 views

Category:

Documents


14 download

DESCRIPTION

ECATT guide for automation of SAP HR

TRANSCRIPT

Page 1: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 1

M.Vorwold

HR eCATT guidelines

Page 2: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 2

Contents

Guidlines writing professional eCATTs

eCATT Reuse Library

Tips & Tricks

Page 3: Ecatt Hr Guide

Guidelines writing professional

eCATTs

Page 4: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 4

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‘

Page 5: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 5

Guidelines

10 golden CATT/eCATT rules:

1.Create CATT/eCATT modules only for your own applications.

2.Call transactions only by reference of a test module.

3.Every test module shall contain only 1 transaction.

4.Use only parameters to assign fixed values to a transaction.

5.A test module should always be able to be used universal, therefore care of the choice of parameters and dynpros.

6.Don’t create new modules if you can also maintain existing ones.

7.Always maintain your modules compatible.

8.Write a documentation for each module and procedure.

9.If you want to use transactions of other applications use the modules your colleagues created and ask the author for further extensions if necessary.

10.Use variants to create more similar test cases.

Page 6: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 6

How to create a module

Every test module shall contain only 1 transaction

Nice to have: A message check A database check

Page 7: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 7

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

Page 8: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 8

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)

Page 9: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 9

Which modules should I use?

If your country uses the international Dynpro for a specific Infotype use the international Infotype modules and don‘t 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

Page 10: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 10

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)

Page 11: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 11

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‘

Page 12: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 12

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

Subtype)

OBJPS : &DB_LOCK_INDI

SPRPS : ‘

ENDDA : &D02

BEGDA : &D01

SEQNR : ‘

Page 13: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 13

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 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

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

Page 14: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 14

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

Don‘t 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

Page 15: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 15

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

Page 16: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 16

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 (ISO-

Code) Replace the line

TXT valid for an 'international' personnel number

by

TXT valid for a ‚your country' personnel number

Page 17: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 17

How to create the Ultra Short Hire Event

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

Page 18: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 18

How to create eCATT procedures

An eCATT for testing business scenarios should consist of different modules

It should not contain a TCD-Call

Page 19: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 19

Reuse of eCATTs

Reuse of eCATTs

Page 20: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 20

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 There has to be a responsible person for the eCATT

Page 21: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 21

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‘

Page 22: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 22

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.

Page 23: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 23

Tips & Tricks

Tips & Tricks

Page 24: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 24

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

Page 25: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 25

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

Page 26: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 26

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

Page 27: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 27

Technical details of a screen / field

Finding out technical details of a screen and field: Example PA30:

Position cursor in the field ‚personnel number‘ Choose menu path ‚System -> Status‘ (or F1 -> technical info) Result: SAPMP50A 1100 The 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

Page 28: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 28

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

Page 29: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 29

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 menu-items (navigation with double click) The application toolbar The function keys

Page 30: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 30

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

Page 31: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 31

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

Page 32: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 32

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 checking the field press the button ‚Check field‘ For reading the field press the button ‚Check field‘

Enter a parameter name

Page 33: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 33

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)

Page 34: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 34

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 don‘t 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 !

Page 35: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 35

Some Questions and Answers

FAQ

Page 36: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 36

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.

Page 37: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 37

Testing with Test Catalogues

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

Answer: Yes, but it’s 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

Page 38: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 38

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.

Page 39: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 39

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 (9) LAST_MSG-NUM1 or (11) LAST_MSG-NUM2 or (13) LAST_MSG-NUM3 put in

‚C‘ to MODE and nnn to VALIN nnn = permitted message number

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‘

Page 40: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 40

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(*)‘.

Page 41: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 41

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. -> Result: 1234

a4 = 12 & 'ab'. -> Result: 12ab

a5 = '01.01.' & &JHR. -> Result: 01.01.2002

Page 42: Ecatt Hr Guide

SAP AG 2002, Title of Presentation, Speaker Name 42

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.sap-ag.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