SAP HR – Understanding Dynamic Actions


SAP HR – Understanding Dynamic Actions

Dynamic actions are really useful in SAP and allow you to automate certain activities between different infotypes. For example, when one infotype is created, another unrelated infotype can be automatically created at the same time and values can be pre-populated from another infotype.

SAP HR - Understanding Dynamic Actions

An example of this is that when a maternity absence is created in infotype 2001 the SMP master record in infotype 0088 can also be created without the user having to manually create the infotype 0088 record separately.

Access to the set-up of Dynamic actions is via the IMG in a number of different application areas – search for the text Dynamic Actions. In addition you can modify the table T588Z using the transaction code SM30 for table maintenance.
Each separate process of the dynamic action is held on a separate line number and has an operation specified for that line e.g. check conditions, maintain an infotype, set the value of field(s) within an infotype etc.


General Tips and Tricks

Always place a comment at the start of the dynamic action to identify it. A comment should have no value in the Indicator column and should start with an * in the Variable Function part. This makes it far easier to find a specific dynamic action in the table. This tip will make sense once you have configured many dynamic actions for the same infotype. It can be quite difficult to spot a particular dynamic action amongst the many similar ones. This also gives you an idea of what it is supposed to do when you come back to modify it in 6 months time.
If you want to edit the whole of the dynamic action table – use table T588Z in table maintenance. Use this when you start the configuration for the dynamic action and you need to view other examples of dynamic actions against other infotypes.
If you wish to edit a dynamic action for a specific infotype, you can use the view V_T588Z. Once you click on the “maintain” button, you are asked to enter the infotype you wish to use. This then restricts the number of entries to that infotype only.
You may need to find an example of a similar dynamic action and would like to search through the whole table. On certain versions of SAP, the “find” and “find next” buttons are greyed out. A simple work around is to click on the print icon and this then takes you to an overview screen of the dynamic actions table. You will now be able to make use of the “find” and “find next” buttons. Once you have found the relevant piece that you wish to copy, just make a note of it or copy it onto the clipboard and click on the green “back” arrow to be taken back to the maintain table screen.
If you wish to select a piece of text in SAP, it is often not possible if you are not in a particular field or table view. Use the Ctrl + Y buttons to highlight a piece of text which you can then copy onto the clip board.
When you first start configuring your dynamic action – you may find that it doesn’t work 100% – this is quite common. If the dynamic action is not being called at all, then simply comment out your plausibility checks. Once you have the dynamic action correctly bringing up the infotype screen, then you can take off the comments and turn the plausibility checks back on – one at a time. You will then get a better idea as to where it is failing.
In addition if your dynamic action is to work during an action, then don’t put on the TCODE = ‘PA40’ plausibility check until you are happy that it is working to your satisfaction – otherwise you could be creating a lot of new starters. Just have the dynamic action set to transaction code PA30 and once you have it working, change the transaction code to PA40. This will save you a lot of time.
It is important to provide gaps in the numbering between different dynamic actions. A gap of 10 lines is the minimum you should have between dynamic actions. Remember this is not MS Excel where you can just easily insert a row. All of the rows in a dynamic action table are numbered and it is a real pain to insert rows. It is good practice to leave bigger gaps if you can. Use even or odd numbers for your lines of configuration. Even better use every 3rd line. This allows you to insert the odd line or 2 without having to laboriously copy and move all the lines of the dynamic action, which can be a bit of a pain.
If you are wanting the dynamic action to look at multiple values for the same field on a plausibility check, make use of the “/X” at the end of each line for all of the values.
You may wish the dynamic action to take place in the background and not be visible to the user. It is good practice to only put the “/D” in at the very end once you have thoroughly tested your dynamic action and are happy that it works 100%.
Remember that if you find that your dynamic action is not meeting your requirements, you can always get your dynamic action to call a user program which will be far more flexible than the functionality offered by standard dynamic actions.
If you are writing away values for infotype 0000 Actions then you need to use P0000-xxxx. This is unlikely to happen often as infotype 0000 is always saved first and will in most cases be used to set off other dynamic actions.
If you are wanting to check a certain action type or action reason, then use the field PSPAR-MASSN (action type) and PSPAR-MASSG (action reason).




Please enter your comment!
Please enter your name here