cancel
Showing results for 
Search instead for 
Did you mean: 

Personnel Administration

former_member182377
Active Contributor
0 Kudos
87

Hi SAP Guru's

I would like to know about Dynamic action in SAP HR

Can any one explain me what is dyanmic action and how to be used please?

Thanks
Sriram

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member184702
Active Contributor
0 Kudos

Hello Sriram,

I am giving some more examples here..

Ex:1)The Personal Data(0002) infotype is newly created, and the Number of children field is filled. Once the record is saved, the system automatically displays the Family/Related Person (0021) infotype and the Child subtype (2) for processing to enter the details about the spouse and the children.

Ex:2)An employee is hired, and the probationary period is entered in infotype Contract Elements(0016). Once this information is saved, the system automatically displays a record from the Monitoring of Dates (0019) infotype and the subtype Expiry of probation (1) for processing.

IGM Path for configuring the Dynamic Action:IMG - Personnel management - Personnel administration - Customize procedures - Dynamic actions.

Pl check the below links.

http://www.sapfunctional.com/HCM/DynamicActions/Index.htm

http://www.sd-solutions.com/SAP-HR-Dynamic-Actions.html

http://it.toolbox.com/wiki/index.php/Dynamic_Action

Regards

Siva

former_member184702
Active Contributor
0 Kudos

Hello Sriram,

Dynamic Action feature is provided in SAP HR to call another Infotype while processing one Infotype.

Here, you control the initiation of actions when maintaining an Infotype record. For each action, you can determine whether it is always carried out when
you change an Infotype or a subtype or whether it is only carried out if you change certain fields.
You can state whether the action is to be carried out for "Change", "Create" and/or "Delete" record. You can store the conditions for executing the action, for example, the comparison of the old and new value of a field. Finally, you can also specify default values for a record that is to be created.

View V_T588Z is the maintenance table to maintain Dynamic Actions.  

Execute the T code SM31 and open V_T588Z for maintain.  

Regards

Siva

Former Member
0 Kudos

In very simple terms, dynamic actions are to be used when an infogroup doesn't give you enough flexibility.  For example, a dynamic action can be used when you want an infotype to be updated in the background during a particular action.  I have attached the IMG activity documentation for more specific details:

Dynamic Actions

Here, you control the initiation of actions when maintaining an infotype record.
This can be the maintenance of an additional infotype record or performing a routine.
For each action, you can determine whether it is always carried out when you change an infotype or a subtype or whether it is only carried out if you change certain fields.
You can state whether the action is to be carried out for "Change", "Create" and/or "Delete" record.
You can store the conditions for executing the action, for example, the comparison of the old and new value of a field.
Finaly, you can also specify default values for a record that is to be created.

Example

When you create the infotype Contract Elements (0016), you predefine a period for the probation period. The system creates a date/deadline record so that you can invite the employee to an employee inteview.

The social insurance number does not exist. The system creates a date/deadline record.

Standard settings

The standard SAP system contains some sample dynamic actions.

Activities

    1. Determine which infotype, subtype or field is to trigger a dynamic action.
    2. Determine the infotype operation (please refer to the field documentation).
    3. You can now set up different actions using a sequential number:
      a) P - plausibility checks, that is conditions.
      If you also use Recruitment, you must make sure that the dynamic action is started for the correct application. You do this, by first calling up the transaction class:
      PSPAR-TCLAS="A" for Personnel Administration.
      PSPAR-TCLAS="B" for Recruitment.
      b) I - infotype accesses
      c) W - infotype values
      d) F - access for internal or external routines
      Calling up an internal routine: just specify the name of the routine, this must be in the infotype's module pool "MPmmmm00". You cannot assign using-parameters.
      Calling up external routines: specify the name of the routine and, in parentheses, the name of the program in which the routine can be found. You cannot assign using-parameters.

Further notes

Creating a date/deadline record

Dynamic actions are normally used for creating date/deadline records. However, the date of the deadline does not have to match the initializing date, but can be varied by a certain time interval.
You can add or subtract a number of time units for an outgoing date. The time units "days" (internal 010), "weeks" (011), "months" (012) and "years" (0ß13) are supported.

Example: A year after an examination (infotype Internal Medical Service (0028)), the employee is to undergo a subsequent examination.
You must then call up infotype Monitoring of Date (0019) using the date/deadline type "follow-up examination" (30).

  I INS,0019,30
Assignment of default values:
  W P0019-TERMN=P0028-BEGDA
  W P0019-VTRAN='1'              number
  W P0019-VTRZH='013'            time unif from table T538T
  W P0019-VTROP='+'              operation '+' or '-'

Calling up an external routine

In an external routine, you can check additional conditions, even for other infotypes:
Data definition
Include a statement for the current infotype structure (for example: TABLES: P0006.)
In include MPPDAT00, the fields required for flow control of an infotype dialog are defined in the common part. If you have this include in your program, some fields are available immediately: The field string CSAVE refers in each case to the old record whose values can be compared with the new values in the plausibility checks. To do this, define a second work area for the infotype structure that is used to store the contents of CSAVE. This means that the individual names of the infotypes are given.
SAP recommends that you use the *-workarea for the infotype structure in each case (for example: *P0006).
Internal table DYNMEAS: contains the infotype accesses (see indicator 'I').
Internal table INITIAL_VALUES: contains the default values for an infotype that is created or copied. (see indicator 'W').

You want to call up a report - for example, the writing of a letter.
Include a submit statement for this report in your routine.

Note on creating a batch input session:

Dynamic actions are not processed in a batch input session.
In batch input, you must specify the exact sequence of the screens. To ensure this is the case, you must have already programmed the dynamic action checks before you create the batch input session.

To avoid errors only the static actions are processed when you program and process a session. Infotypes that usually only appear in the system as a result of a dynamic action should be updated by calling up the transaction separately.

Hope this helps!