Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Sapnote Medidas Dinamicas PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Note 386027 - Dynamic actions

Note Language: English 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

Cause and Prerequisites


The knowledge, how dynamic actions are interpreted and processed is
inadequate.
The system does not check the entries in table 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

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

o Enter field names correctly.

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

o For I actions, you must adhere to the sequence of the


specifications or replace them by the correct number of commas.

o As relational operators, only the characters >, <, = <>, >=, <= are
supported (EQ, NE and so on are not known).

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

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.

The actions you can use for action indicator I

For the dynamic actions only the actions INS, COP, MOD and DEL are
supported. This differs from personnel actions. INSS is not carried out. In
general, you can use the action LIS9. However, under certain circumstances,
problems may occur. Therefore, you should try to display LIS9 with MOD or
DEL.

Send mails using action indicator M.

The documentation for characteristic M0001 contains all basic information


for sending mails using dynamic actions. Note that you can use the return
values for RECV1, RECV2, RECV3 to have R/3 mails sent to the clerks
responsible for personnel master data, payroll and time recording. However,
for this purpose, correct entries for the corresponding clerks must exist
in table T526.

Using a distribution list, you can have a mail sent to any Internet
address. The following specifications are required: In characteristic M0001
(or in a corresponding copy), characteristic RCIEV (or a corresponding
copy) is specified in the return value for NAME1. In characteristic RCIEV,
the eight-place name of a distribution list needs to be entered as return
value in the form V-xxxxxxxx. This distribution list must be defined in the
Business Workplace (transaction SBWP) and can also contain recipients of
the type 'Internet address'.
In SAPconnect (transaction SCOT), suitable nodes must be defined for the
relevant address types. If the system setting does not include the
automatic sending of the mails, you can trigger the transmission requests
using SAPconnect. In SAPconnect (transaction SOST), transmission requests
can also be analyzed.

18.07.2007 Page 2 of 6
Note 386027 - Dynamic actions

Dynamic actions and batch input

Dynamic actions are not correctly processed in batch input sessions as in


batch input, the sequence of the screens must be predefined exactly. To be
able to process dynamic actions in batch input, you must program the checks
of the dynamic actions when you create the batch input session.

To avoid errors when programming and running the session, only the static
actions are processed in batch input. Calls of infotypes that are triggered
by dynamic actions should be realized by separate transaction calls.

Additional and background information

A new dynamic action starts

- when a new infotype is specified

- when a new subtype is specified

- when a new field is specified

- when a new function character is specified

- 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 ... P ...
0028 ... I INS,0019
0028 ...
0028 ... P ...
0028 ... F XYZFORM(ZCUSTPROG)
0028 ... I INS,0041
0028 ... W P0041-field=RP50D-DATE1

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.

Special feature with infotype 'Monitoring of Dates' (0019)

For the 'Monitoring of Dates' infotype, you can add or subtract a number of
time units to/from an initial date. The system supports the time units Days
(010), Weeks (011), Months (012) and Years (013). The time units are
specified in table T538T (Units of Time/Measurement Texts). The number is
assigned to field P0019-VTRAN, the time unit to field P0019-VTRZH, and the
operation (+ or -) to field P0019-VTROP. Before, you must assign an initial
date for the calculation to field P0019-TERMN.

Example:
I INS,0019,30
W P0019-TERMN=P0028-BEGDA
W P0019-VTRAN='1'
W P0019-VTRZH='013'
W P0019-VTROP='+'

For the start date (P0028-BEGDA) of the infotype Internal Medical Service
(0028), the number (P0019-VTRAN) of a certain time unit (P0019-VTRZH) is
added in accordance with the table Units of Time/Measurement Texts using
operation '+' (P0019-VTROP). In this case, this means plus one year.

Header Data
Release Status: Released for Customer
Released on: 17.04.2007 08:54:37
Priority: Recommendations/additional info
Category: Consulting

Main Component PA-PA Personnel Administration

The note is not release-dependent.

18.07.2007 Page 5 of 6
Note 386027 - Dynamic actions

Related Notes
Number Short Text
547603 No mail sent for hiring action

Attributes
Attribute Value
Transaction codes HIER
Transaction codes PA30
Transaction codes PA41

18.07.2007 Page 6 of 6

You might also like