Logic for Dynamic Actions
Can any one tell me the logic for implementing Dynamic Actions.
Regards
vamsi.
What are dynamic actions and how to configure it?
Ans) Dynamic actions are performed automatically by the system, depending on certain conditions. If maintaining one infotype has an effect on another infotype, the system automatically displays the second infotype for processing.
Dynamic actions can run in the background i.e. the user does not see the run on the screen.
A change in one field of an infotype might require, that certain other infotype be updated at the same time. The details can be specified as a dynamic event. It is automatically triggered by the system.
*Examples: *
The Personal Data 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. An employee is hired, and the probationary period is entered in infotype Contract Elements. 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.
Similar Messages
-
Custom program for Dynamic Actions
Iam using BDCs for Actions and Org.Assignment infotypes. The dynamic actions are planned to be carried out by using separate function modules.
My query is, On the plausibility check conditions lots of structures are referred (eg: PSPAR,RP50D etc). How do i perform this condition check in the custom program (for dynamic actions) as these structures do not have any data?
Thanks
Message was edited by: SShenoy1. PSAVE-FIELDNAME will use the old values in the FIELD. It will be used in cases when we have to do plausibility checks on the basis of new as well as old value, eg, we want to use dynamic action for employees whose status changes from 'inactive' to 'active'
2. Sequence no represents sequence no. If for a particular Infotype and FCode, we have to specify which step has to be performed first. Sequence no tells the system exactly this thing.
Regards
Lincoln -
Latest Error Handling for Dynamic Actions
Is there any documentation on the Latest Error Handling for Dynamic Actions?
BillC,
Interesting that I was looking around for the same thing after seeing a Foreign Key violation in my application.
I found this article by Patrick Wolf:
APEX 4.1 – Error Handling Improvements – Part 1
http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
I believe you need to be on 4.1 or later though.
Thanks,
Joe -
Theme 11, live scope for dynamic action not working in IE
Hello all,
I use theme 11, and I have a dynamic action on page 0 that fixes a region width, because it is too long to match the page width. I set the Event Scope to "live" because the region is a report and it has many rows and pagination is needed. When I have to go to page 16-30 from 1-15 and if there is a record which is longer than the current 15, page is partially refreshed and the width is changed, but that works for Mozilla and Chrome. In IE the dynamic action from page 0 is not triggered, in spite of the live event scope and I don't know why. Is there a way I can fix that problem?
Thanks in advance!Hi Ivan,
Thanks for the information, this is indeed an interesting case. I'm assuming you have 'Enable Partial Page Refresh' in the report attributes set to 'Yes'. Please let me know if this is not the case.
I don't think an event of 'Page Load' with a scope of 'live' is correct. The 'live' event is a way of saying, attach some behaviour to something on a page (eg a delete icon in a report row is clicked), and keep that behaviour 'alive' even if that part of the page is updated (eg the report paginates with PPR to the next set or results, and clicking on the delete icon in the report still works). However here, when the event is page load, I don't think specifying 'live' will do what you want.
What I think you're really interested in is indeed when the page first loads, but then when the report is refreshed via PPR. Therefore, I would try the following:
1) Change the dynamic action event to 'After Refresh'.
2) Select the report region from the 'When > Selection' attributes (ensuring your report template contains a id="REGION_STATIC_ID" attribute, otherwise the DA won't work).
3) In your 'Actions', ensure the 'Fire on Page Load' checkbox is checked.
So this says do the action when the page loads, then always after the report is refreshed via PPR. This will fire after pagination, sorting or a dynamic action refresh.
Interestingly (at least in my mind!), you can actually set the event scope back to 'bind' here. This is because as part of the DA framework, we purposefully attach the event handlers for report handling to an element that is not updated during PPR for pagination or sorting, it's higher up in the DOM tree. This gives slightly better performance than having to use 'live', which is more expensive computationally and yet still keeps the registered behaviours.
Also something else which may help, you can check if the DA is firing when expected by using a JavaScript console (eg in Chrome native Developer tools, Firebug with Firefox), with application debugging enabled (Application Properties) and switched on (via developer toolbar). Load the JS console, and you'll be able to see when the DA fires.
As far as the actual IE specific logic goes, I haven't looked into that too much yet, because I felt it was more important to get the DA firing correctly first, then see where we're at.
Regards,
Anthony.
Edited by: Anthony Rayner on Nov 14, 2011 11:06 PM -
Using HR_INFOTYPE_OPERATION in external subroutine for Dynamic Actions
Hi,
I am calling an external subroutine in the Dynamic Actions of an Infotype. In this external subroutine, I am using HR_INFOTYPE_OPERATION to modify OTHER records of the same Infotype number.
However, when I tried to trigger the Dynamic Actions in PA30, the other infotypes get modified as intended. But when I refreshed the PA30 screen, the changes were reversed back as if the HR_INFOTYPE_OPERATION were not carried out at all. I have COMMIT WORK after the HR_INFOTYPE_OPERATION, refreshed the buffer. But it doesn't seem to work.
My question is: Can i use HR_INFOTYPE_OPERATION in an external subroutine which is called during dynamic actions? As I have some complicated logic, I do not want to embed the coding in the Dynamic Actions. Is there a way for HR_INFOTYPE_OPERATION to work in the external subroutine with the changes being committed to the database?
Thank you.Hi,
I remember the same problem being faced by some of the forum members.
Suresh Datti had replied that "Call the subroutine in a nother program using a SUBMIT statement. This will create two sessions and will update the DB". This was working fine for the users.
Hope you can try this.
Just call a program using SUBMIT statement and code your form routine inside that.
Hope this helps you.
Regards,
Subbu. -
Custom program for dynamic actions in BDC
Hi all,
Did anyone work on dynamic actions in BDC. I got a method of doing, but looking out for a simpler one.
Thanks..Hi,
Any updates that happen via dynamic actions in online mode must be explicitly included in the BDC session since dynamic actions are turned off during the execution of batch input sessions.this is a standard behavior.
Regards,
Manoj. -
Hi experts,
I have a requirement in that I have to create one sturcture with i/p & o/p fields.
Whenever enduser call this sturcture by FM, they will i/p values of KUNNR.
i have to o/p data related to VBELN at item level & further. also its not limited to VBELN but down same for 5 levels query.
Now my problem is for one KUNNR there will be many VBELNs, any many other item level fields ( like LFSTK, KWMENG, MATNR, POSNR, /AFS/AGNUM, FMENG, RMENG)
so I have to fill back that in to same structure dynamically.
Can anyone give me same example?What are dynamic actions and how to configure it?
Ans) Dynamic actions are performed automatically by the system, depending on certain conditions. If maintaining one infotype has an effect on another infotype, the system automatically displays the second infotype for processing.
Dynamic actions can run in the background i.e. the user does not see the run on the screen.
A change in one field of an infotype might require, that certain other infotype be updated at the same time. The details can be specified as a dynamic event. It is automatically triggered by the system.
*Examples: *
The Personal Data 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. An employee is hired, and the probationary period is entered in infotype Contract Elements. 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. -
Creating a Function logic for dynamically created XML buttons
Hi!
It's me...... again! Now I've dynamically created some buttons using XML. They're spread around the stage and I've modified a tooltip script to give each button a tooltip on Mouse_Over. But to se the logic and make it work using AS3 is hard (for me). I want a function that accept to parameters: Tooltip text and Object to tooltip.
In my code I get this error msg when initiating the function on dynamically created buttons:
1118: Implicit coercion of a value with static type flash.display:Sprite to a possibly unrelated type flash.display:MovieClip.
I beleive there are more than one thing here needing a fix.
Can someone have a look and give me a pointer?
Thanks
function contentTooltip(ttt:String, ttclip:MovieClip):void {
ttclip.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
function mouseOverHandler(e:MouseEvent):void {
ttip.descr.text=ttt;
ttip.x=stage.mouseX;
ttip.y=stage.mouseY-15;
ttclip.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
ttclip.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
ttip.visible = true;
function mouseOutHandler(e:MouseEvent):void {
ttip.visible = false;
ttclip.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
ttclip.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
function mouseMoveHandler(e:MouseEvent):void {
ttip.x=stage.mouseX;
ttip.y=stage.mouseY-15;
contentTooltip("Scale button",scale_btn);
contentTooltip("Hide button",hide_btn);I totally agree with what Ned says and suggests. Nevertheless, I would like to support your thinking process.
From the way you wrote the tooltip functionality it is apparent to me that you conceptualize as a programmer. Again, as Ned said, nested functions are evil. BUT, in a way, what classes accomplish is encapsulation/nesting of properties and functions under the same umbrella. It actually feels that what timeline does in general is nesting named functions within a single function we have no access to.
How you wrote the code is actually a blueprint for a class that could handle the functionality. You, perhaps, are very ready to start coding with classes - not on the timeline.
With that said, for the sake of theory, here is how your functionality can be rewritten on timeline:
scale_btn.toolTip = "Scale button";
test_btn.toolTip = "Test button";
hide_btn.toolTip = "Hide button";
scale_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
test_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
hide_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
var overTarget:MovieClip;
function mouseOverHandler(e:MouseEvent):void {
overTarget = e.currentTarget;
ttip.descr.text = overTarget.toolTip;
ttip.x = stage.mouseX;
ttip.y = stage.mouseY - 15;
overTarget.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
overTarget.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
setChildIndex(ttip, numChildren - 1);
ttip.visible = true;
function mouseOutHandler(e:MouseEvent):void {
ttip.visible = false;
overTarget.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
overTarget.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
function mouseMoveHandler(e:MouseEvent):void {
TweenMax.to(ttip, .5, { x:stage.mouseX, ease:Quart.easeOut } );
TweenMax.to(ttip, .5, { y:stage.mouseY - ttclip.height / 2, ease:Quart.easeOut } );
//ttip.x=stage.mouseX;
//ttip.y=stage.mouseY-ttclip.height/2; -
Error Handling for Dynamic Actions (4.1.1)
Hello
I'm trying to create a function to handle all possible errors but the errors generated by DA are not being caught.
Is it possible to caught them? How?
My function is based in:
http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_error.htm#autoId4
and I'm making my tests in apex.oracle.com
ThanksHi,
there is no APEX JS function which you could use to intercept the error display. But you might be able to overwrite the "window.alert" JS function which is used to show the error with your own implementation. This function could check the text for some patterns and then decide what to show to the user. I haven't tried this but
var originalAlert = window.alert;
window.alert = function( pMessage ) {
if ( pMessage ... some check comes here ... ) {
originalAlert( "My new message" );
} else {
originalAlert( pMessage );
};might work.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
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 -
Info group being not called while using Dynamic Actions
Hi,
I am facing a scenario that, while we execute some action from PA40 like termination, then it will call my subroutine for dynamic actions which will be calculating the last day worked and updating the same in Info Type 0041.
For updating the IT 0041, i am using the function module HR_MAINTAIN_MASTERDATA. and IT0041 is getting updated properly. But now the problem is coming that when the control comes out of subroutine, it is going back to the PA40 Screen and not to the next screen of the Info group.
What can be the cause for the same.
RND I have done on my part: I have commented/uncommented the return parametre RP50D-Date1, commented/uncomented the use of function modules to lock and Unlock the pernr.
Please give ur comments.
Thanks in Advance.Hi Nisha,
Not sure if I have understood correctly, but if you just wanted to calculate leaving date and write the same date in IT0041 then you don't need a function module:
1. Create a small program, as follows:
REPORT ZHR_PY_R0008 .
INCLUDE MPPDAT00.
TYPE-POOLS HRQTA.
TABLES: P0000,
RP50D,
T001P.
ROUTINE CALLED BY TABLE T588Z
FORM CHANGE_DATE.
RP50D-DATE1 = P0000-BEGDA - 1 .
ENDFORM. " CHANGE_DATE
This program will give you the last working day written to RP50D-DATE1
2. Simply enter the following lines into table T588Z:
0000 04 499*- LEAVING ACTION - Populate Infotypes with leave date -*
0000 04 500 P T001P-MOLGA='08'
0000 04 501 P PSPAR-TCLAS='A'
0000 04 502 P PSPAR-MASSN='*'/X (* equals your leaving action types)
0000 04 503 P PSPAR-MASSN='*'/X (* equals your leaving action types)
0000 04 504 F CHANGE_DATE(ZHR_PY_R0008)
0000 04 505 ******** INF.0041 ********
0000 04 506 I COP,0041,,,(P0000-BEGDA),(P0000-ENDDA)/D
0000 04 507 W P0041-DAR07='*' (* equals your date type)
0000 04 508 W P0041-DAT07=RP50D-DATE1
or if you are simply looking to delimit IT0041 with the leave date then replace lines 506-508 with:
0000 04 506 I MOD,0041,,,(RP50D-DATE1),(RP50D-DATE1)/D
0000 04 507W P0041-ENDDA=RP50D-DATE1
This will solve your problem : - ) -
Hi,
I am creating the following dynamic action configuration for my custom infotype 9902. My requirement is to Insert a new record of Additional payments (0015) infotype with wagetype (LGART) = 9GHS and Amount(BETRG) = 1000 when the value in field "ALL_ENROLL" is created/changed.
<u><b>INFTY|SUBTY|FIELD |FC|No|S | Variable function</b></u>
<b>9902 | |ALL_ENROLL |06 |20 |I | INS,0015,,,(P9902-BEGDA),(P9902-ENDDA)
9902 | |ALL_ENROLL | 06|30 |W| P0015-LGART='9GHS'
9902 | |ALL_ENROLL |06 |40 |W| Q0015-BETRG='100000'</b>
The dynamic action is getting triggered properly with Wagetype(LGART) being populated properly. But the value in Amount(LGART) is not getting populated. The technical details of the amount field shows the field as Q0015-BETRG.
Can someone help me in acheiving this?
Thanks,
Prasath NProblem solved. The documentation for dynamic action states that,
<b>Do not set defaults for Q fields of an infotype because the values for these fields are derived from the corresponding P fields.
Examples
Infotype Subtype ..... FC Ind. Variable function part
0021 2 04 I INS,0015,M430
0021 2 04 W P0015-BETRG='10000'
When a Family/Related Person record (0021) record with subtype 2 (child) is created, an Additional Payments record (0015) with a default amount of 100.00 is created.
</b>
Thanks,
Prasath N
Message was edited by:
prasath natesan -
Dynamic actions and PA-PD integration a problem
Are you aware of an update problem with MSS and PA-PD integration? This information was made available in a presentation to us last year. Was this issue resolved in mySAP ERP 2004?
Dynamic actions and PA-PD integration a problem
Dynamic actions and PA-PD integration are not
processed on updates made from the web (but in the
background through a batch or call transaction session)
Thats why most standard PCRs require HR to process
the transaction using the SAP GUI in the foreground
This normally affects changes to infotypes 0000 &
0001
Then the next slide states:
Workaround for dynamic actions
Review dynamic actions in table T588Z (use SE16 to
display) and document the infotypes and values that
trigger dynamic actions
Incorporate those infotypes into your background
processing and web forms (if necessary)
Workaround for PA-PD integration
Include the integration steps for these infotypes in your
background processing (just as in conversions)Hi John,
Not sure if it is fixed.. or can be fixed.. we are still in 47 & Use custom code to account for Dynamic Actions.. the PCR processes use the function module HR_MAINTAIN_MASTERDATA to update the infotypes. This function mimics a BDC & hence cannot handle Dynamic Actions... Basically, the issue is not with MSS but it is the way Dynamic Actions work.. to quote SAP "Dynamic actions are not correctly processed in batch input sessions since in batch input the sequence of the screens needs to be predefined correctly. To be able to process dynamic actions in batch input, the checks of the dynamic actions need to be programmed when creating the batch input session. To avoid errors when programming and running the session, the static actions only are processed in batch input. Calls of infotypes that are triggered by dynamic actions should be realized by separate Transaction calls.
Please take a look at OSS Note #386027 for additional info about Dynamic Actions.
Regards,
Suresh Datti -
How to use dynamic action to fill multi item on a page ?
Hi..
I want to fill multi items on a page so I build a dynamic action ( Execute PL/SQL Code ) to do it .The problem is that when the page loads I can't see any data and I tried to see the session values using debug and I found data. Moreover when I save the row I got these data saved.
So what is the magic there?
ThanksFirstly, to get the multi-select populated with "pre-selected" values the easiest approach is to use Computation or Process at a process point On Load Before Header or After Header or Before Regions.
All you need to do is populate your "Select List " page Item with : (colon) separated list of selected values. E.g is you want A,B and C out of A,B,C,D,E selected then get A:B:C into the Page Item.
If you have used Dynamic Actions, what is your event on which the action fires? For Dynamic-Actions the page (HTML DOM) needs to be existing , so it must fire after the page has loaded.
Regards, -
Dynamic Actions in Custom Development
I have a dynamic action running for an action.
But when the same action is called through BDC or in the program this doesnot work.
Can anyone suggest the reason as to why the dynamic actions are not getting called for the same process in the developments or BDC.
ThanksHi Manoj,
I have a seperate BDC for Dynamic action but I cannot attach this in the BDC created to run the PA40 Country assignment action as the new employee number that is created during Reassignment action cannot be called in the BDC which is created for Dynamic action.
In Dynamic action this is getting populated as it is present in the memory when the action is run in pa40.
The option that you have told i troed the same to explore but this was not working.
Some how I have to do this manually by getting the new employee number seperately and then collect the data of old number and pass it to the new number.
Santoshi
Maybe you are looking for
-
Replication of Custom Fields from CRM to ISU and Vice versa
Hi Experts, We are working on adding Z fields on BP level. For this how does the replication of the values takes place from CRM to ISU or vice versa. What are the middleware enhancement we need to do in CRM side or in the ISU side. We would add the f
-
Hasn't worked since the day I got it - the day it came out, but hasn't bothered me until now when I actually need to send one. I can receive but not send - I've turned it on and off, checked all the settings and called O2, but no luck. Any other idea
-
Need to send email with excel sheet as attachment: URGENT
Hi all....i have a requirement where i should extract data from SAP. These datas has to be sent to a mail id entered in the selection screen in excel sheet as an attachment.Can you suggest me any function module that meets the requirement... For kind
-
Wildcards and reg-ex use in XSLT
I am new to XML and XSLT technology. I am trying to convert one XML into other based on some rules. The input XML is <?xml version="1.0" encoding="ISO-8859-1"?> <root> <person> <id>1 </id> <Add_1_street1>happy street</Add_1_s
-
How to enforce row level security on MSAS Cube
We have to enforce row level security on MSAS Cube based on BOUSER. We are using a security table which contains BOUSER ID and Location ID We need help in joining the security table with MSAS Cube. Thanks