Professional Documents
Culture Documents
Code Gallery
Dynamic Action
Skip to end of metadata
Attachments:8
Added by Jayanthi Jayaraman, last edited by Jayanthi Jayaraman on Jan 08, 2015 (view change)
Go to start of metadata
Author: Jayanthi Jayaraman
Submitted: 02.01.2009
Related Links:
IMG Activity Documentation
http://it.toolbox.com/wiki/index.php/Dynamic_Action#Dynamic_Actions
Applies to:
SAP ECC 6.0 - ABAP
Summary
This tutorial will explain how to Configure Dynamic Action. This is being explained by illustrating the below two scenarios.
1) Default the Pay scale Type, Area and Group based on the Employee group and subgroup.
2) Default the Valid Until field in Contract Elements Infotype based on the hiring date.
Prerequisite
The action needs to be identified for which dynamic action is to be configured. Here for the action 'Test Hiring', we are going
to configure the dynamic action. Make sure that the Hiring Action is properly configured in infogroup. Ensure that Personnel
Action types are configured for the action (It should mention infogroup name).
Infogroup: Go to SPRO->Personnel Management->Personnel Administration->Customizing Procedures->Actions->Define
Infogroups for infogroup configuration.
Personnel Action Types: Go to SPRO->Personnel Management->Personnel Administration->Customizing Procedures>Actions->Set up Personnel Actions (choose Personnel Action Types)
actions.
The table structure itself explains about the field in dynamic action.
INFTY - First field which specifies the infotype should be responsible to trigger the action.
SUBTY - Respective subtype of the infotype. This is optional.
FNAME- Name of the field in the infotype. This is again not mandatory.
OPERA- Name of the operation performed in the infotype. That is entry in this field will execute the Dynamic action when
that operation is performed to the infotype in action.Ex: when a record is created in IT0001, do this action.
The possible values are:
02 for Change
04 for Create
08 for Delete
KENNZ: This field specifies about the nature of the action to be performed.
The value can be:
P - Plausibility Check - This is used for checking a condition. Operators <, >, <=, >=, = and <> can be used.
Consecutive checks must be linked by a logical AND. Logical OR links must also be indicated by a /X. Note that all checks
with OR links must have a /X.
I - 'I' is used to maintain Infotype. Maintenance includes actions INS, COP, MOD and DEL.
W- Using 'W', default values can be set for the infotype field. 'Q' values cannot be defaulted because values for
these fields are derived from the corresponding P fields.
V- Cross-reference to another step. Using 'V", we can combine fields to groups. The variable function part contains
the value in the field which follows the "field" column.
M- Sending mail
ITYPE
STY
FIELDN
FC
NO
0001
04
90
P0001-PERSG = '0'
0001
04
91
P0001-PERSK = 'AB'/X
0001
04
92
P0001-PERSK='11'/X
0001
04
95
INS,0008
0001
04
98
P0008-TRFGR='TEST1234'
0001
04
99
P0008-TRFAR='AB'
0001
04
100
P0008-TRFGB='AB'
Infotype is 0001.Here specifying the subtype and field name is not required.This will happen when the record is created in
0001.So we have used '04' for operation.We need to mention the sequential numbers without contrary to the existing
numbers.We have used the nature of action as 'P' for the first three lines to specify conditions.We have used /X to specify
the OR condition.First line specifies the employee group should be equal to '0'. Second line and Third line specifies the
employee subgroup should be either equal to 'AB' or '11'. We have used 'I' in fourth line to maintain infotype operation.
Insertion will be done for infotype 8.In the rest of the lines, we are specifying the default values to be set for the fields in the
infotype.
Scenario 2:
To default the Valid Until field in Contract Elements Infotype based on the begin date of Organizational assignment by using
a subroutine from a program.
RP50D is the structure which is meant for HR: Return Fields for Dynamic Actions.
In the program, we are going to add 365 days to the hiring date and populating it as default for Valid Until field in infotype
0016.
First line in Dynamic Action specifies that Subroutine getdate is called in program zzz_jay.
Second line is used to maintain(Insert a record) in infotype 0016.
Third line is defaulting the value for the field Valid Until from the program calculation.
Output