Professional Documents
Culture Documents
Dynamic actions
Version: 11 Validity:
Valid from 16.04.2007
Summary
Symptom
Dynamic actions are not processed (as expected). Dynamic actions are processed - although not expected.
More Terms
T588Z
Solution
The following information should help you to prevent undesired system behavior and errors or to find errors more easily.
Incorrect spelling
As there are no checks in table T588Z, correct spelling is especially important. When you specify the variable function part, note the following: o Do not use separating blank characters, for example, do not write: ... W P0019-VTRMN = RP50D-DATE1 but: ... W P0019-VTRMN=RP50D-DATE1 Specify the contents of literals as they exist in the database, for example date specifications in the form 'YYYYMMDD', make the specifications in table T588Z in upper case letters, enter leading zeros or spaces, and so on. Enter field names correctly. Enter fields in I actions in parentheses, in P and W actions without parentheses. In I actions, constants are specified without quotes, in P and W actions they are specified in quotes. For I actions, you must adhere to the sequence of the specifications or replace them by the correct number of commas. As relational operators, only the characters >, <, = <>, >=, <= are supported (EQ, NE and so on are not known). For F actions, enter the FORM routine correctly. If the FORM routine is contained in a customer-specific program, you must enter it in parentheses after the FORM routine name.
o o
Known fields
The fields of the infotype that triggers the dynamic action are known. Also, the table contents of the tables T001P (Personnel Area/Subarea) and
18.07.2007 Page 1 of 6
Note 386027 -
Dynamic actions
T503 (Employee Group/Subgroup) and the structures PSPAR and PSAVE are known . The structures PSPAR and PSAVE are also known. T001P, T503 and PSPAR contain the values that are valid at the start date of the current record. PSAVE contains the old values of the infotype record. If the start date is changed, PSAVE is initial because, from the technical point of view, this is not a change but a deletion and recreation. Therefore, old values of the infotype record cannot be defined. Sometimes, using Q fields is problematic: If they are mentioned in plausibility checks, they are known and can be used. If they are used in W actions, they are probably overwritten by the program of the infotype to be processed during further processing. As of Release 4.5, you can use the fields of structure RP50D, for example, by calculating or filling them in a FORM routine and then using them for checking or for the value specification when you maintain an infotype record. In addition, other fields may be known. However, we cannot guarantee this. We can only guarantee the information contained in this note for infotypes 0nnn.
Note 386027 -
Dynamic actions
during a new plausibility check. However, note that it is quite possible that a plausibility check refers to several dynamic actions which are defined for different function characters. Example: nnnn ... 02 P ... nnnn ... 02 I ... nnnn ... 06 I ... If you change the infotype nnnn and if the condition mentioned in the P statement is fulfilled, both I statements are executed. If infotype nnnn is inserted, the system always - without check - executes the second I statement. If you want that the second I statement is always executed in the change case, too, you require a P statement with a (Dummy-) condition that is always filled (for example, SY-DATUM=SY-DATUM) before the second I statement. Dynamic actions are not executed, in other words, they are deactivated, if the action indicator is not equal to P, I, W, V, F, M. ALL plausibility checks which are linked with OR must have the extension /X. Example 1: Condition 1/X Condition 2/X Condition 3 Meaning: (Condition 1 OR condition 2 ) AND condition 3 Example 2:
18.07.2007 Page 3 of 6
Note 386027 -
Dynamic actions
Condition 1/X Condition 2 Condition 3 Meaning: Condition 1 AND condition 2 AND condition 3, in other words, the extension /X for condition 1 has no effect. However, the author of this condition probably wanted to define the condition of example 1. Error messages that occur when dynamic actions are processed cause the screen of the relevant infotype to be sent - even if the dynamic action should be processed in the background. Example: Specification of a subtype that does not exist (for example, due to incorrect spelling of the subtype). Make sure that you only use W statements after I statements since, otherwise the reference is hardly comprehensible and statements may be executed at a time which is not intended. Dynamic actions are executed after you save the infotype which triggers them. If you want to use a dynamic action to process additional changes for the same infotype in the background, for example, if you want to set a lock indicator, note that a dynamic action may not be the appropriate method. The reason is that it is only processed after the maintenance action is saved. Also, it may terminate due to unexpected messages which can cause the relevant infotype to be sent. You should use a user exit instead. In contrast to I and W statements that are collected first and executed later, F and M statements are processed immediately. Example: 0028 ... 0028 ... 0028 ... 0028 ... 0028 ... 0028 ... 0028 ...
To make sure that the data (RP50D-DATE1) for the W statement (P0041-field=RP50D-DATE1) is available for later execution, the F statement must not only be marked but it must be processed immediately. However, as routine XYZFORM is executed (if the condition is met) before Infotype 19 is created, this Infotype and its data are not available in routine XYZFORM yet. You should only use a FORM routine in a dynamic action to get or check data for a following action within the dynamic action. The following should explain this: You want to change the entry date (transaction PA41). You select four infotypes for changes but only change the entry date for two infotypes and 'suddenly' you are on the initial screen of HR master data maintenance (transaction PA30). What is the cause? A dynamic action was defined for the second changed infotype when a FORM routine was called. It contained the statement LEAVE TO TRANSACTION 'PA30'.
18.07.2007
Page 4 of 6
Note 386027 -
Dynamic actions
The date specification in an I action is for selecting the infotype record to be maintained, not for setting a value for the respective infotype. Example: I COP,XXXX,,,(PYYYY-BEGDA),(PYYYY-ENDDA) W PXXXX-BEGDA=(PYYYY-BEGDA) W PXXXX-ENDDA=(PYYYY-ENDDA) If you want to set a default for the entry and the leaving date for the copied infotype record, you require the W statement. The I statement is for selecting the infotype record to be copied. For time constraint 3 more than one infotype record may be selected because of an I action. However, a following W action is only executed once.
Header Data
Release Status: Released on: Priority: Category: Main Component Released for Customer 17.04.2007 08:54:37 Recommendations/additional info Consulting PA-PA Personnel Administration
18.07.2007
Page 5 of 6
Note 386027 -
Dynamic actions
Related Notes
Number 547603 Short Text No mail sent for hiring action
Attributes
Attribute Transaction codes Transaction codes Transaction codes Value HIER PA30 PA41
18.07.2007
Page 6 of 6