Dynamic Action It0021 - IT0019
Hi All,
I am able to create records in IT0019 whenever a child is maintained in IT0021.
But on deletion of child record in IT0021 the corresponding record in IT0019 should also be deleted.
Is this possible?
Regards,
Swati
The step determines what should be done. It can have 6 values:
P - check conditions under which something is done
I - maintain infotype record
W - set default values for new record
V - Reference to another step
F - call a routine
M - send mail
The variable function part
The variable function part must always be seen together with the action because the action determines what happens in the variable function part. We got 6 different actions: P, I, W, V, F and M.
P: Plausibility checks, which allow you to check certain conditions.
You can enter values for specific infotype fields. Field names must be entered in full. Literals and constants can serve as comparison values. These must be enclosed by inverted commas. Variables can also be used.
The old value of a field can be used for comparison; the field name must be preceded by PSAVE-.
If fields of other infotypes are used for comparison, these must be stored in the module pool of the current infotype.
The following comparison operators are supported:
= equals
< less than
<= less than or equal
> greater then
=> greater then or equal
<> not equal
Consecutive checks must be linked by a logical AND. Logical OR links must also be indicated by a /X.
The variable function part with action I Calls an infotype for processing
Enter the step, infotype, subtype, object ID, start and end dates of the record and an indicator which defines whether the step is to be run in the background. The possible actions are INS, COP, MOD, and DEL.
Use commas to separate selection criteria just like the separator in the matchcode. If an entry is missing, the system inserts a comma.
Separate the indicator for suppressing dialog from other entries by a slash D (/D). A slash S (/S) will also suppress dialog.
Constants, such as those for subtypes, are not enclosed in inverted commas. Variable entries are also permitted. Fields containing such values must be put in brackets.
Example:
Infotype Field .... Ind. Variable function part
.... I INS,19,01/D
Step: Create a Dates record, subtype 01, run in the background
.... I DEL,14,M559
Step: Delete Rec. Payments/Deds. record with subtype (wage type) M559.
0007 .... I INS,8,,,(P0007-BEGDA),(P0007-ENDDA)
Step: Create a Basic Pay record (0008) without subtype and object ID. The start and end dates are the same as those in the current Planned Working Time record (0007); specify these two fields only if they are filled because the dynamic action was triggered by this infotype.
The complete syntax can be :
Action - INS, MOD, COP, DEL
Infotype
Subtype
Object-ID
Start date
End date
/D Action in background
W
Default values for new record
Called after the I statement and used to assign values to screen fields while creating or copying another infotype record through the I statement Literals or variables are used as default values.
Set the defaults for the infotype, subtype, object ID, start and end dates using an I step and not a W step.
Do not set defaults for Q fields of an infotype because the values for these fields are derived from the corresponding P fields.
F: Call a routine
Calls a FORM routine (subroutines in ABAP) during your action. The routine may reside in or out the module pool MPNNNN00.
You can call internal (module pool) as well as external routines.If you call external routines, type the program name in brackets after the routine name. Do not specify 'using' parameters. When calling an external routine, all data must be declared in a common part. You can use the fields of structure RP50D to return values from the routine. These are not used in the standard system and can only be populated via the routine and then can be used for defaults (W-Commands). This allows customer-specific routines to be formulated with all the above steps.
Example
Infotype Field ..... Ind. Var.function part
0016 PRBZT F PROBATION
0016 PRBZT I INS,19,01
0016 PRBZT W P0019-VTRMN=PRBEND
Module pool MP001600 contains the PROBATION routine. This routine uses the entries in the fields P0016-PRBZT and P0016-PRBEH to determine the end of the probation period which it stores in the field PRBEND.
The system creates a new 'Dates' record with the reminder date = PRBEND.
V
Cross-reference to another step
Lets you treat collectively a number of fields for which you want to define a common dynamic action Here, you can combine fields to groups. The variable function part contains the value in the field which follows the "field" column. Steps which are specified only for the following field are also triggered for each of the other fields.
M
Sends SAP Office mail
Enter the name of the feature which defines the characteristics of the mail.
hope the information will help you in clearing your doubts
guds
Edited by: guds on Apr 29, 2009 1:06 AM
Similar Messages
-
Hi All,
I want to create a dynamic action to pouplate IT0019 with a reminder when the employee turns 60 and 62.
I need to call a function to do the age calculation. Do i have to create a new one? Or there are standard functions for this.
Regards,
SwatiHi All,
The date is getting task date is getting populated now. It was problem of - and _.
But now the issue is how to pass the birthdate of the employee to the function Get_Date_60.
So far I was using a hardcoded date to test the function. Now was the date to be the birthdate of the employee for whom IT0002 is being processed.
DYNAMIC ACTION :
0002 GBDAT 06 78 T001P-MOLGA='25'
0002 GBDAT 06 79 PSPAR-TCLAS<>'B'
0002 GBDAT 06 81 BDATE=P0002-GBDAT
0002 GBDAT 06 86 GET_DATE_60(ZHR_CALC_AGE)
0002 GBDAT 06 87 INS,0019,Z8
0002 GBDAT 06 89 P0019-TERMN=RP50D-DATE1
How to populate the birhtdate. BDATE is the variable to capture the brithdate.
Function code:
Report ZHR_CALC_AGE .
TABLES: rp50d.
DATA: BDATE Type D.
*********Perform*****************
PERFORM Get_Date_60.
**************Form Definition*************
Form Get_Date_60.
DATA: "BDATE Type D,
odate LIKE P0001-BEGDA.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = BDATE
days = 0
months = 0
SIGNUM = '+'
years = 60
IMPORTING
CALC_DATE = odate.
Move odate to RP50D-DATE1.
ENDFORM.
This is not working. Any inputs appreciated. Regards, Swati -
Dynamic actions required for IT0021 - child subtype 2.
Hello ,
Can someone help me with required dynamic actions to delimit the child subtype in infotype 21,
when any new subtype is created in IT0021?
Best Regards,The scenario actually is like :
After the Save of subtype XX, we could use table T588Z (Dynamic Action Table) and let the automatic calling of this table drive bringing up the IT0021 subtype 2 (Child) and even put the End date on the IT0021 child. The user would then click the Save button. The advantage here is we donu2019t do any direct update of the Child IT0021.
Regards. -
How to write dynamic actions for delimiting child subtype of IT0021
Hi ,
I need the dynamic actions for the below scenario:
In IT0021 , there is a child subtype '02'. This needs to be delimited to a new subtype 'XX' when the child reaches a certain age.
The above process needs to be automated..as in when the new subtype 'XX' is created, it should check the fields like date of birth , last name and on saving it , the corresponding child subtype screen should be called where the user can modify the end date and delimit the child subtype.
Please help me with the required dynamic actions..
Thanks.Hi,
Just try this.
INFTY SUBTY FIELDN FC NO. STEP VARIABLE FUNCTION
0021 02 Field Name P TabName-FldName>=age
0021 XX I INS, 0021,XX/I
Regards,
Srini. -
Dynamic Action-not trigerred in a particular scenario
Hi Experts,
We have a scenario where in a dynamic action(Creation of 'Monitoring of task' IT0019) is triggered while an employee is assigned a particular type of absence(UB04) in 2001.
One more thing I would like to mention is that this action is getting triggered in a scenario where the absence starts in a non working period.(where planned working days are 'FREE').For e.g: If absence type is created for 01.01.2009-01.01.2009(not a free day) then IT0019 dosen't appear.but when absence type is created for 04.01.2009-04.01.2009(Sunday-> free day) then IT0019 is triggered
However,the action configuration doesn't have any mention of above scenario.Plz see below the config setting of the dynamic action where UB04 is the absence subtype we maintain.
2001 UB04 0 * *DATE REMINDER FOR JURY SERVICE RECLAIM*
2001 UB04 02 5 P P2001-AWART='UB04'
2001 UB04 02 10 I DEL,0019,99,,,,/D
2001 UB04 02 15 I INS,0019,99,,,,/D
2001 UB04 02 20 W P0019-TMART='99'
2001 UB04 02 25 W P0019-VTRMN=P2001-BEGDA
2001 UB04 02 30 W P0019-VTROP='+'
2001 UB04 02 35 W P0019-VTRAN='5'
2001 UB04 02 40 W P0019-VTRZH='011'
2001 UB04 04 45 P P2001-AWART='UB04'
2001 UB04 04 50 I INS,0019,99,,,,/D
2001 UB04 04 55 W P0019-TMART='99'
2001 UB04 04 60 W P0019-VTRMN=P2001-BEGDA
2001 UB04 04 65 W P0019-VTROP='+'
2001 UB04 04 70 W P0019-VTRAN='5'
2001 UB04 04 75 W P0019-VTRZH='011'
2001 UB04 08 80 P P2001-AWART='UB04'
2001 UB04 08 85 I DEL,0019,99,,,,/D
Can anybody let me know the possible cause of the problem.
Points assured for help....Hi Experts,
We have a scenario where in a dynamic action(Creation of 'Monitoring of task' IT0019) is triggered while an employee is assigned a particular type of absence(UB04) in 2001.
One more thing I would like to mention is that this action is getting triggered in a scenario where the absence starts in a non working period.(where planned working days are 'FREE').For e.g: If absence type is created for 01.01.2009-01.01.2009(not a free day) then IT0019 dosen't appear.but when absence type is created for 04.01.2009-04.01.2009(Sunday-> free day) then IT0019 is triggered
However,the action configuration doesn't have any mention of above scenario.Plz see below the config setting of the dynamic action where UB04 is the absence subtype we maintain.
2001 UB04 0 * *DATE REMINDER FOR JURY SERVICE RECLAIM*
2001 UB04 02 5 P P2001-AWART='UB04'
2001 UB04 02 10 I DEL,0019,99,,,,/D
2001 UB04 02 15 I INS,0019,99,,,,/D
2001 UB04 02 20 W P0019-TMART='99'
2001 UB04 02 25 W P0019-VTRMN=P2001-BEGDA
2001 UB04 02 30 W P0019-VTROP='+'
2001 UB04 02 35 W P0019-VTRAN='5'
2001 UB04 02 40 W P0019-VTRZH='011'
2001 UB04 04 45 P P2001-AWART='UB04'
2001 UB04 04 50 I INS,0019,99,,,,/D
2001 UB04 04 55 W P0019-TMART='99'
2001 UB04 04 60 W P0019-VTRMN=P2001-BEGDA
2001 UB04 04 65 W P0019-VTROP='+'
2001 UB04 04 70 W P0019-VTRAN='5'
2001 UB04 04 75 W P0019-VTRZH='011'
2001 UB04 08 80 P P2001-AWART='UB04'
2001 UB04 08 85 I DEL,0019,99,,,,/D
Can anybody let me know the possible cause of the problem.
Points assured for help.... -
Hi Experts,
Is it technically possible to know if an Infotype was updated through the Dynamic Actions or manually by an end user.
We have a case where an Infotype is updated in the background based on certain conditions through a dynamic action.
The same Infotype could be in certain circumstances updated manually through PA30.
Is it possible to know how the last change was done???
Thanks for your help.Thank you for your reply.
In fact we have a custom Infotype (IT9xxx: Eligibility for certain benefit) that we are automatically creating/updating in the background based on changes in IT0021; if a new dependant is added in IT0021, we automatically create for him a new instance in this custom Infotype etc...
Sometimes and for some special cases, the end user should update this IT9xxx manually.
Now, if I want to know each records in this IT9xxx were created manually and each ones were created automatically, is it possible or not ??? in other terms from a system point of view, do we have a flag or an indicator to tell us if the record was created/updated through dynamic action or manually.
I hope that it more clear now.
Thanks again. -
Hello everyone,
I have got two dynamic actions triggered by the same field (marital status in IT0002), one is calling IT0101 (Fiscal Status Belgium) and the other calling IT0021.
What determines which order they come? I want IT0021 to come first, and later IT0101.
Is it the sequence no? If so, how can I change it? I tried to change it but it is not modifyable.
Thank you very much.
NihanU cannot change Seq number.U have to delete and recreate.
U just copy the line and make 3rd row.
Example.
Seqnr DAta
1 A
2 B
U want B to come first.
Copy row having A then make Seqnr 3.
So U'll get
Seqnr DAta
1 A
2 B
3 A
Now delete the first row and U'll get
Seqnr DAta
2 B
3 A
Hope this will solve Ur problem.
Award POints if helpful. -
Dynamic Actions with multiple infotypes.
Hi,
I have the following business requirements where I am supposed to trigger a function call when the users creates an action via PA40 and the Action Type = 'X1' and subsequently saves IT0001 and IT0019.
Both IT0001 and IT0019 are configured as part of the infogroup in Personnel Actions. The function call is supposed to be triggered if the above 3 conditions are met.
Please advise how it can be done via Dyanmic Actions or how it can be done.
Points will be rewards.
Thanks in Advance.Hi,
You can use programs within a dynamic action like in standard T588Z (example):
0005 00 3 FHIRE_P0311(HNZCHIR0)
There you can more flexibly check if the conditions are met by accesing database.
hope it helps!,
Carlos. -
Issue in execution of Dynamic action on change event
Hi,
Greetings.
I have scenario, where I have one select list (P_CATEGORY) and one shuttle control (P_ROOMS) on page.
The values of the shuttle list is being populated based on the selected value in select list.
The left pane of shuttle control's value based on LOV and source of the shuttle item is a plsql function, which returning colon separated value list.
So that returned values shown in the right pane of shuttle.
The LOV values are getting being populated using cascading LOV i.e based on the of Select List item. But the Shuttle source values not getting auto refresh and for achieving that I've created a dynamic true action on change event of Select list.
The dynamic action is with :
Action : Set Value
Set Type : PL SQL funciton body
Page items to submit : P_CATEGORY (this is select list)
Escape Special Character : Yes
Suppress Change event : Yes
Affected Elements -
Selection type : Item(s)
Item(s) : P_ROOMS
This is perfectly working on Firefox but not working on IE9 & Google Chrome.
I've debugged in both IE9 & Google chrome and found the dynamic action get executes ajax call and the values get back but not rendering on the screen. i.e not assigning to the item.
So can you please advice me what will be a workaround for this issue?
I am using Application Express 4.1.0.00.32 .
I'll appreciate your prompt response.
Thanks & Regards,
Jaydipsinh RauljiI don't understand why this is not working withouth seeing an example, there might be multiple processes working on the item.
Anyway if the value is returned check if the value is in the session aswell. If it is in the session but not on the page that means you will need to find a way to bring it from the DB to the page. You can do this by adding an action to your DA:
Action: Execute PL/SQL code
PL/SQL code: NULL;
Page Items to Return: your shuttle item -
Re: Dynamic Action is not triggering in LSMW Recording
Hello All,
In SAP HRMS personnel actions if i do using LSMW Recording it is not triggering the dynamic actions.
Is there any mechanism to Trigger dynamic action in LSMW Recording ?
How to find the differences in process with and with out recording ?
Small help is also highly appreciated.
With Regards,
Sunil,
+91-9903695384.Yes. Do one thing. First study the dynamic action. Try to understand what the dynamic action is doing. Is it creating data in other infotype or is it updating some other table. Once it is clear what the dynamic action is doing then you can try to implement the same logic in LSMW. In LSMW there is a provision to add more than one recording and this recording can be called based on some logic..
Thanks & Regards,
Sandip -
Refresh report title with dynamic action
Hi all,
I have a report that is refreshed with an dynamic action. When the refresh is performed, first the value of two hidden variables are set (P2_ID and P2_NAME) and are submitted (using a dynamic action type 'pl/sql', with code 'null;' and page items to submit: P2_ID,P2_NAME).
In the query of the report, i use :P2_ID in the where-clause. That's all working like a charm! The one thing that doen't work, is the title of the region: that's defined as 'Properties of &P2_NAME.', but the title isn't refreshed when the report gets refreshed.
Is there a solution for this? I hope I'm clear enough.See Re: Dynamic action - Refresh
So you are right; the native Refresh action just refreshes the report content, it does not perform &ITEM. substitutions everywhere in the region.
What you could do is use a named SPAN as the title like <span id="my_title">&P2_NAME.</span> and add a TRUE action to your Dynamic Action to set the title using Execute Javascript code $s('my_title',$v('P2_NAME'));Hope this helps. -
HR PA Dynamic Actions: Generate mail to the admin when 0002 & 0021 changed
Hi gurus!
My client wants us to generate a mail to the Admin when an employee changes his 0002 or 0021 infotype
through ESS. I believe we could do this is Dynamic Actions. Can you please tell me how we do it?
Thanks and Regards,
SoniyaHi,
Some good write-ups :
http://wiki.ittoolbox.com/index.php/Dynamic_Action
http://www.sapconfig.com/index-3.html (look for "Dynamic Action Mail for Infotype". This will require registration but free.
Thanks.
Regards
Kir Chern -
Dynamic action on text box change does not working
i have a page with following components.
a report that has and edit link.
a text box to catch the primary key from report link when it is clicked
a number of elements (text boxes, check boxes and LOVs) which are used as data entry form.
Now my design is that user enter values save them and no sooner did they save, the report depicts new
values. if user want to edit any record, they click on edit link and the data entry form elements
should now bring all those values from DB on page. i m successful to pick primary key and bring
it in a hidden text box and wrote a dynamic action on its change event that will bring values from
DB and set all page elements. but but but.........the change event doesnt work. it only work
when focus is lost from the text box...!! offcourse user wont want to click in that "hiddent" text
box and then click some where else to bring values in page data entry form......
help is humbly requested from forum or if any other solution approach is to be used easier than
one i m using, would be appreciated.
thanks in advance for reading my bore question :)bundles of thanks for reply. i m going to elaborate.
1. My page no is 3.
2. Hidden Item name is P3_EDIT_ACTIVITY_ID
3. Data entry form, hidden item and the report are on the same page.
4. on the edit link of report, i have used following settings.
Target: Page in this application
Page: 3
and i set hidden item as follows......
Item 1 P3_EDIT_ACTIVITY_ID Value #ACTIVITY_ID#
well, when i click the link on report it does bring Activity_Id in the hidden box (which is not yet hidden for debugging purpose)
Next i wrote Dynamic action which fires on the change event of P3_EDIT_ACTIVITY_ID and run PL/SQL code with in it which is as follows
declare
Dept varchar(50);
begin
select my_dept into Dept from activity_main ACTIVITY_ID = :P3_EDIT_ACTIVITY_ID;
:P3_Dept := :Dept; (i did use :P3_Dept := Dept also but this wont work)
insert into testdynamic (stamp) values (Dept); (I did this to check whether correct value is brought from DB, yes it works correctly, correct Dept is being inserted in stamp column)
end;
i have created another true action to check when the dynamic action is fired. its very simple alert. and the problem is, it only fires when focus is lost from the P3_EDIT_ACTIVITY_ID. i mean, when u keep changing value inside the text box, nothing happens, when u go outside, the alert is fired and so the pl/sql procedure. but the line
:P3_Dept := :Dept; OR :P3_Dept := Dept; arent working which is the actual requirement.
I m not using set value here as i have to set a lot of values on page not one. further. plz let me get rid of this lost focus thing as i want the form to be populated with correct values related to P3_EDIT_ACTIVITY_ID as the user click on any edit_link in the report.
Thanks for persistence. i hope i have provided all the details.
looking forward. -
Leaving a Page fires "Page Unload" dynamic action?
Hi,
Which Dynamic Action fires when I am leaving a page.
I have a page with lot of items, I want to fire alert based on some condition when user leaving that page (suppose user clicks to say some TAB), I used *"Page Unload"* dynamic action, but somehow it's not working.
Is there any other Event I have to use?
Thanks,
DeepakThanks.. VC
but I cannot use that plugin as I have a Page which call other pages using iFrame and I am facing some issue..
I have created a separate Post for this but not able to resolve it till now.. Here is the Link.
Re: "IFrame Region" Plugin / Save Before Exit (3.0.2) - Dialog box - Question
Thanks,
Deepak -
Dynamic Action with KeyCode check for ENTER button pressed
Hi,
I want to create a dynamic action which executes if the ENTER button of field P1_NAME is pressed.
I thought about this type of DA:
Event: Key Press
Selection Type: Item(s)
Item(s): P1_NAME
Condition: Javascript expression
Value: this.triggeringElement.keyCode == 13
That unfortunately doesn't work! Dynamic action doesn't get executed...
Hope for help! :)
TobiasI found the solution in my own blog: :)
Event: Key Press
Selection Type: Item(s)
Item(s): P1_NAME
Condition: Javascript expression
Value: this.browserEvent.keyCode == 13
Maybe you are looking for
-
I have a Toshiba Satellite A665 Laptop with Windows 7 Home Premium OS. Initially I installed the Printer software and Drivers from the product disc, connect via USB during setup as requested and the printer would work fine, until I shut it down at t
-
Lost datafile on Standby Oracle 10g
Hi all. i have lost one datafile on my standby ,how to recover it ,this file is created when primary database is in noarchive mode (before i set up the data guard) ,so i can't use alter database create datafile statement bocz i dont have all the arch
-
Who's got a -beyond kernel?
.... well, apart from me - and iphitus, of course. It will hit the repos tomorrow, for those who want a package. Me, I like doing my custom thing.
-
How do I inport an individual track from a CD to itunes 12?
The latest version of iTunes (12) *****! Apart from the missing sidebar which has annoyed many, my new gripe is that I have not found a way of importing individual tracks from a CD into iTunes (& hence my I-pod). The only way I've found to do it so
-
Adobe Indesign local.storage html
Hi all I'm developing a new extension with Extension Builder 3 for Indesign CC 2014 Does anyone knows were phisically is placed the html5 "local storage" file for Indesign CC 2014 extension, and wich can be it's name? Is there someting that can delet