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
Similar Messages
-
Difference between dynamic actions and user exit
Hi,
Please help me in when to use table T588z and user exit to write code for dynamic actions.
Thanks,
VenkatHi Prasad,
Find the difference between Dynamic action and user exits.
Dynamic Action User Exits
1. Here only initialization of an infotype 1. Along with initialization of an infotype, depending upon other infotype validation also can be done like in
can be done. IT 16 the contract end date can not be
entered more than 6 months.
2. Less time consuming to write. 2. Require programming approch so more
time consuming.
3. Table T588Z 3. PBAS0001
Br/Manas -
Dynamic actions and tabular forms
I'm trying to attach a dynamic action to a tabular form item, and it's not working the way I'm expecting it to. Since you can't attach dynamic actions to parts of a tabular form in the "normal" way that you can for page items, I'm using JQuery selectors to pick the parts to link to. For links (such as opening a pop-up window with more information about a row), this is working fine. But I'm really struggling to attach to a simple checkbox.
On my tabular form, I've got a simple checkbox. I've tried putting text in the Element Attributes, Element Option Attributes, CSS Class, CSS Style, and HTML Expression fields, but none of them appear to be making it through to the source code of the generated page. Which means, I think, that I'm limited to using a jQuery Selector along the lines of "input[name=f07]", but creating a dynamic action on click or on change with that selector doesn't seem to ever fire.
What am I missing?
-DavidOk, this is interesting. When I tried to mock this up on apex.oracle.com, I was able to make it work (though I had to change the selector to "input[name=f07_NOSUBMIT]", which means I'm going to have to walk the DOM to get the actual value...but I'm pretty sure I can handle that). After a bit of scratching my head, I eventually found that my pop-up dynamic action was somehow or other blocking the checkbox dynamic action from firing. Changing the sequence so that the checkbox DA happens first allows them both to fire.
Here's the javascript from the pop-up DA (it's based on this post by Havard Kristiansen):
/* prevent default behavior on click */
var trgt = this.triggeringElement.href;
var e = this.browserEvent;
e.preventDefault();
/* Trigger JQuery UI dialog */
var horizontalPadding = 30;
var verticalPadding = 30;
$('<iframe id="modalDialog" src="' + trgt + '" />').dialog({
title: "Item Details",
autoOpen: true,
width: 570,
height: 400,
modal: true,
close: function(event, ui) {$(this).remove();},
overlay: {
opacity: 0.5,
background: "black"}
}).width(570 - horizontalPadding).height(400 - verticalPadding);
return false;At this point, the checkbox DA's action is simply an alert box. Like I said, I'm not sure what's going on, but I'm at least able to move forward...
-David -
Session Timeout and Dynamic Actions
Did anybody ever use the Session Timeout feature in APEX successfully?
I have set an idle session timeout and provided an url to redirect to once the session is expired: Home > Application Builder > Application nnn > Shared Components > Edit Security Attributes > Session Timeout
It works so far during the page rendering and page processing phase. But I have major problems with dynamic actions and custom ajax requests.
Dynamic actions will just hang and simply don't return. Even worse, when I execute the dynamic action once the session is expired, the session seems to be physically deleted and thus the next click on a tab will not redirect to the expiration page but go straight to the login page.
Did anybody make it work or is the best way to implement a custom session timeout?
Thanks,
Dietmar.Hi All,
Check out the Session Timeout plug-in available here:
http://skillbuilders.com/plugins
Let me know if that helps.
Regards,
Dan
blog: http://DanielMcghan.us/
work: http://SkillBuilders.com/APEX/ -
Dynamic Actions & Cascading List of Values (Exception thrown and not caught
I am having a really strange issue within my Apex 4.0 environment where I am trying to build dynamic actions and cascading list of values.
I am trying to develop new functionality in an existing application, (original application developed using HTMLdb 1.6 and gradually updated to Apex 4.0.1), to add a dynamic action that sets a value of another field, using SQL. The dynamic action is failing with 'Exception thrown and not caught - jquery-1.4.2.min.js Line: 28 Char: 162'. However, when I create a new application within the same workspace and develop the same functionality is works without a problem.
I have ensured the templates for each page/region are an exact copy of each other.
<b>When I run the application in Firebug I get the following information:</b>
Date Fri, 31 Dec 2010 14:20:03 GMT
Server Oracle-Application-Server-11g
X-DB-Content-length 87
Set-Cookie HTMLDB_IDLE_SESSION=31-DEC-2010 23:20:03;path=/
Content-Length 87
Keep-Alive timeout=5, max=99
Connection Keep-Alive
Content-Type text/html; charset=UTF-8
Content-Language en
<b>For the application that is working I get slightly different response headers.</b>
Date Fri, 31 Dec 2010 14:20:37 GMT
Server Oracle-Application-Server-11g
Cache-Control no-cache
Pragma no-cache
X-DB-Content-length 14
Content-Length 14
Keep-Alive timeout=5, max=94
Connection Keep-Alive
Content-Type application/json
Content-Language en
<b>Notice the Content-Type for the version that doesn't work is using "text/html", while the working version uses "application/json"
Firebug also provides the following error:</b>
uncaught exception: Invalid JSON: Content-type: application/json Cache-Control: no-cache Pragma: no-cache {"value":"1"}
<b>Does anyone have any idea what is going on??
Thanks.
Jon</b>Patrick,
Thanks my session verify function was causing the problem and I have removed it temporarily from my authentication scheme.
I am using the "check_timeout" function that was developed a number of years ago as part of a "How To" section in the old HTMLdb days. I knew there was an issue with this routine as the newer versions of the browsers handle cookies differently and I was going to redevelop it at some point. Do you know which part of the function causes the issue?
Many Thanks,
Jon
FUNCTION check_timeout
RETURN BOOLEAN
AS
l_session_expire VARCHAR2(256) := NULL;
l_cookie_exists BOOLEAN := TRUE;
BEGIN
IF htmldb_custom_auth.get_user IS NULL THEN
RETURN TRUE;
END IF;
BEGIN
l_session_expire := owa_cookie.get('HTMLDB_IDLE_SESSION').vals(1);
EXCEPTION WHEN NO_DATA_FOUND THEN
l_cookie_exists := FALSE; -- no cookie set, assume first page visit after login
END;
IF l_cookie_exists
AND TO_DATE(l_session_expire,'DD-MON-YYYY HH24:MI:SS') < SYSDATE
THEN
wwv_flow.g_unrecoverable_error := TRUE;
owa_util.redirect_url('f?p='||'500:101'); -- Note hard-coded login application and page ID 500:101
RETURN FALSE;
ELSIF NOT g_cookie_already_sent THEN
owa_util.mime_header('text/html', FALSE);
owa_cookie.send ( NAME => 'HTMLDB_IDLE_SESSION',
VALUE => TO_CHAR(SYSDATE+(c_max_idle_minutes/1440),'DD-MON-YYYY HH24:MI:SS'),
expires => NULL,
path => '/',
domain => NULL );
owa_util.http_header_close;
g_cookie_already_sent := TRUE;
END IF;
RETURN TRUE;
END check_timeout; -
Problem in copying wagetype into IT0008 using Dynamic Action for IT0015
Hi All,
My requirement is based on the Number/ Unit the user enters on the IT0015 screen in the PA30 transaction ,I have created a dynamicaction that will fetch the corresponding wage type from a table T511K and display the screen of IT0008 where the BEGDA would be the Date of Origin of IT0015 and a new record should be added to the already existing wagetypes of IT0008.
I have already created the dynamic action and the BEGDA is getting correctly fetched from the IT0015's Date of Origin. However, I am in doubt as to how to add the corresponding wage type from table T511K in the already existing wagetypes of IT0008. Please help me. Points would be rewarded.
If possible could you please provide the code for it.
Regards,
Rahul Agrawal.Rahul Technically speaking this can be achieved by any way but would like to share you the nature of wage types which comes in IT0015 and IT008 completely differs functionally along with Respective infotypes Ie The wage types in 15 will be a irregular wage type and in IT0008 Regular wage type and IT0015 have Time constraint 2 and IT0008 have TC 1
So would like you to check once with your functinal before going to the development -
Hi Everyone, I have posted this question in the past and made huge progress with Denes Kubicek's help: https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365::::: based on my earlier question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494
I am struggling with one item in my tabular form. It is a radio button. The choices all appear properly, but the value is not saved in the collection (and hence, not saved in the table). All other items in the tabular form save properly.
here is what I have for the query. It is item c024 (which maps to ;'f03'), which is defined as a radio LOV based on an existing LOV.
Currently I have:
2 page items:
P110_ID
P110_VALUE
Dynamic action called CHANGE COLUMN:
event: CHANGE
selection type: jQUERY Selector
jQuery:
jQuery Select = input[name='f03'],select[name'f08'],select[name='f09'],input[name='f10'],input[name='f11'],input[name='f12'],select[name='f40'],input[name='f21'],input[name='f22'],input[name='f23'],input[name='f50']
event scope: Dynamic
true action#1: set value P110_ID javascript expression this.triggeringElement.id
true action#2: set value P110_VALUE javascript expression this.triggeringElement.value
true action#3: execute pl/sql code
declare
v_member number;
v_seq number;
begin
v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
safis_collections.update_column(v_seq,
v_member,
:p110_value);
true ation#4 refresh region :LANDINGS_COLLECTION
the tabular form is based on the query:
SELECT
apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
seq_id,
seq_id display_seq_id,
apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0',' -- Select Favorite -- ','f08_'||seq_id,'') Disposition,
apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
c024 hms_flag,
decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
decode(c020,'Y',
apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
'N','N/A') HMS_AREA_CODE,
c020,c050,
decode(c020,'Y',
apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
'N','N/A') Sale_Price
from apex_collections
where collection_name = 'SPECIES_COLLECTION' order by seq_id
I have noticed the following:
when I change column C011 (price) the following values are set in the dynamic action:
P110_ID = f11_1
P110_VALUE = whatever I change the price to.
when I change the column C024 (hms_flag), the following values are set:
P110_ID = f03_0001
P110_VALUE = whatever I change hms_flag to.
the region is refreshed in my dynamic action, and the change for hms_flag does not hold. I have tested the SQL query that generates the value for v_SEQ in the dynamic action. In both a change to price and HMS_FLAG it appears valid
select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
if f11_1, v_seq:= 1
if f03_0001, v_seq := 1
thank you!solved. sort of.
field c024 references f03.
the Dynamic ACtion, step 4 calculates v_member by taking a substring of P110_ID...and in all other fields, the column and the field (fxx) are the same value....except for c024.
I am not certain exactly how to resolve, but see the problem. -
Dynamic Action in CKE Editor / rich text
Dear fellow developers,
I created some dynamic actions in Apex 4.1.1, which allow me to create function keys in my application.
For example on "key-down F10" a modal dialog opens or upon hitting "F11" the user is redirected.
While this works as long as my Selection Type is DOM object "document", the actions are not fired once I enter the rich text editor (CKE) and it has received focus.
Have you got an idea how to solve this problem?
Creating an identical dynamic action and setting the Selection Type to jQuery Selector #cke_2 is to no avail.
Many thanks,
SebastianNo one having a hint?
It is obviously due to the fact that the ckeditor is embedded in an iframe, which I don't have a selector for.
I was able to add an id "#ckeditor" to the body of the iframe content but the usage of it fails.
Maybe some code will illustrate it a little better:
<span id="cke_P8_STR_BEARBEITUNG" class="cke_skin_kama cke_2 cke_editor_P8_STR_BEARBEITUNG" lang="de" style="width: 748px;" aria-labelledby="cke_P8_STR_BEARBEITUNG_arialbl" role="application" title=" " dir="ltr">
<span id="cke_P8_STR_BEARBEITUNG_arialbl" class="cke_voice_label">WYSIWYG-Editor</span>
<span class="cke_browser_gecko" role="presentation">
<span class="cke_wrapper cke_ltr" role="presentation">
<table class="cke_editor" cellspacing="0" cellpadding="0" border="0" role="presentation">
<tbody>
<tr role="presentation" style="-moz-user-select: none;">
<tr role="presentation">
<td id="cke_contents_P8_STR_BEARBEITUNG" class="cke_contents" role="presentation" style="height:100px">
<iframe frameborder="0" allowtransparency="true" tabindex="0" src="" title="WYSIWYG-Editor, P8_STR_BEARBEITUNG, drücken Sie ALT 0 für Hilfe." style="width:100%;height:100%">
<html lang="de" dir="ltr">
<head>
<body id="ckeditor" class="ckeditor cke_show_borders" contenteditable="true" spellcheck="true">
</html>
</iframe>
</td>
</tr>
<tr role="presentation" style="-moz-user-select: none;">
</tbody>
</table>
</span>Edited by: skahlert on 13.04.2012 10:53 -
APEX 4.0.1: restriction on maximum number of dynamic actions on a page?
Hello,
I would like to know if there is a restriction on the number of dynamic actions on a page.
I have a page with 29 dynamic actions. All works fine on the page.
If I create another dynamic action that only display an alert or does anything else, I have the error message HTTP 404 when I try do display the page.
If I delete an old dynamic action and create a new one then the page works fine.
So after several tests, it seems that there is a maximum number of DA on a page but can someone confirm that?
Environment:
APEX 4.0.1
Embedded PL/SQL Gateway
Regards,
SddcI stand corrected in that some limits are acknowledged:
http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/limits.htm
Where are people getting these ideas that normal form or "Codd" said that there was a
limit on columns and if you had more columns than a database product found convenient to implement that it was a 'design defect'? I took database management as an undergrad and in grad school and there was NO rule about number of columns. Anyone who says there is is shoveling pure bs. Even if there were such a rule, and there isn't, it is very inadvisable for a vendor who allows 1000 columns in a table in their database product to impose a limit that is 1/10 of that in an interface to their database. (And btw you can create a table (A 'wide' table, in sqlserver with 30,000 columns according to this:
http://msdn.microsoft.com/en-us/library/ms143432.aspx )
Artificially dividing up data instruments that were administered/collected at one time into pieces in separate tables, just to make a vendor's developers' life easier and more convenient, or just to keep the product from competing with the extremely extremely expensive "enterprise" products the vendor sells, is not acceptable.
Splitting highly related data into separate tables for no reason other than the
interface is not capable of handling it, creates a load of problems that would not otherwise
exist. What if the user enters less than all the parts? Then someone has to figure out if the parts not entered had no data recorded in the source or if they were simply accidentally skipped. Basically someone or a program would have to enter those pages and denote they had no content if that were the case. Much more logic, much more opportunity for error vs keeping data that was highly associated together.
A software vendor can apply whatever limits they want and no one can stop them, that's for sure. But what would be better here is making these more clear up front. This is a "rad" development tool for very small and not hugely complex forms and reports. Be clear and there will not be people royally steamed over spending their time and money evaluating a product that is not designed to do much of what people need it to do. This stuff should be in an FAQ and the top of the forum. -
Is there a limit on the number of Dynamic Actions we can have on a page..
were at a point when we create another dynamic action and run the page we get 'page cannot be found'
if we delete a dynamic action, any of them then the page runs.
but if we create another, 'page cannot be found' again..
its like we have hit some sort of limit..
apex 4.0.0.00.46so, its fixed with upgrade the latest patchset.
i've the same problem with version 4.0.0.00.46.
tks.
NOTE: (if someone have this problem)
apparently no limit to the dynamic actions, only for the javascript code lines. possible solution, if it has a lot of javascript code in the dynamic actions, create javascript functions or procedures in section "Function and Global Variable Declaration" in "Edit page" area and call them by dynamic actions.
Edited by: atondo.luis on Jun 30, 2011 5:02 PM -
Hi,
I have a page with number of days, start date and end date.
If I change the number of days, I want to set the end date based on start date + num days.
I also want to go the other way so if they enter an end date, it will calculate the number of days.
I have dynamic actions for these and they both work fine. The problem is I get a Stack Overflow error after about a second. I assume it is stuck constantly running the 2 dynamic actions one after another, each triggering each other.
Has anyone else had this issue? And how did you solve it?
Thanks
RichardRichard,
Where you have Ajax based dynamic actions ('Set Value' and 'Execute PL/SQL Code') that attempt to save some item's value in session state (via the 'Page Items to Submit' attribute), you will definitely hit issues if SSP is enable for those particular items. This also effects other places where item values can be set via AJAX (Interactive report regions and cascading LOVs), not just in dynamic actions.
The reason this doesn't work is is because it is not possible to generate a valid checksum on the client, in order for the item to be submitted successfully. In fact, providing a mechanism to calculate a checksum on the client would obviously open up a whole new security vulnerability.
You can workaround this by evaluating each page item that you wish to set via dynamic actions and seeing if you can switch off SSP (setting to 'Unrestricted') for just that specific item. You can still have SSP enabled for the application and page, and for other page items, importantly including whichever item stores the primary key or where you have some other vulnerable value stored in some page item.
I have also filed a documentation bug to better explain this in the help text. Patrick also filed an enhancement request for the 'Advisor', so that it checks if SSP is enabled for any page item values that are set from one of these places and alerts the user accordingly.
Hope this helps.
Anthony. -
Urgent help on a dynamic action
Hi,
I am working on SAP 4.6C and have an issue with a dynamic action. I started having this problem since a month. We did not customize this new dynamic action. I dont understand how it entered in my SAP R/3 system.Support packs were added last month can they be responsible.I am entering the discription of the dynamic action.
0041 04 1 * --- BEI NEUANLAGE/EINTRITT IT2006 MIT 10 VORSCHLAGEN ---
0041 04 3 I INS,2006,10,,(P0041-BEGDA),
0041 04 4 W P2006-ENDDA=P0041-BEGDA
0041 04 5 W P2006-ENDDA+4(4)='1231'.
I did compare the table T588Z with the T-Code SCMP and can see that above dynamic action is newly added but need to know how.
ASAP help would be appreciated.
Thanks and Regards
Swati..
-
Dynamic action with interactive report region refresh
Hi!
I'm using APEX 4.02
I've got a page with 2 regions.
Region1 is a (input) form
Region2 is an interactive report on the same table as region 1
When entering values on the form I'm trying to dynmically lookup similar records in the table with the interactive report.
I've made a dynamic action on the change of the form fields which should refresh the interactive report region. I can see this one fires if I add a alert to debug if it fires.
The dynamic report is based on a query with bind variables pointing to the form fields, for example
where
field1 = :P2_FIELD1
This works great on the page load, so no dynamic action is fired but I can see the rows in the report region are the ones I am looking for.
But the refresh of the report region is not working, it is never refreshing and/or showing the correct data after a change of the form fields, so it looks like the dynamic action "refresh region" is not working on the interactive report.
Any ideas why this can go wrong ?
I would like to solve this using standard dynamic actions and preferrably not via PL/SQL or JS, shoudl be possible if I should believe the documentation... ;)
Cheers
Bas
Edited by: bklerk on 26-apr-2011 3:07Hi,
When you change value to item, I assume you do not set value to session state.
Use interactive report advanced attributes "Page Items to Submit" , set items session state before report is refreshed.
http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/app_comp.htm#sthref1235
Similar post/issue here
Hide and show region - hides on refresh
Regards,
Jari -
HR_INFOTYPE_OPERATION not working when called from Dynamic action
Hi ,
Senario : I would like to execute a form from dynamic action which
creates a record in 0015 (Additional payment IT) .
I have writen the code as shown below am using FM HR_INFOTYPE_OPERATION
. When i execute the program from se38 it is creating a record, however it is
not created when it is called from dynamic action..when i debugged the code in
inside the FM HR_INFOTYPE_OPERATION there is a FM HR_MAINTAIN_MASTERDATA where
they are using call dialog (statement) and
sy-oncom = 'N' when called from Dynamic action and
sy-oncom = 'S' when called executed directly.
I tried to change the sy-oncom to S while run from Dynamic action it created
the record.
So Can anyone explain me abt sy-oncom and how can i resolve the issue..
code..
REPORT ZHRPYENH01 .
perFORM TERMIATION_9000.
INCLUDE DBPNPMAC.
FORM Termiation_9000 *
FORM TERMIATION_9000.
INFOTYPES : 0015.
*data : i .
*i ='c'.
*break-point.
*message i000(000) with i.
TABLES : PRELP.
DATA : P9000 TYPE PA9000." with header line.
DATA : P0000 TYPE STANDARD TABLE OF P0000 WITH HEADER LINE.
DATA : P0015 TYPE STANDARD TABLE OF P0015 WITH HEADER LINE.
DATA : HIRE_DATE LIKE SY-DATUM,
TERM_DATE LIKE SY-DATUM.
DATA : MOLGA LIKE T500L-MOLGA VALUE '25',
SEQNR LIKE PC261-SEQNR.
DATA : RGDIR TYPE STANDARD TABLE OF PC261 WITH HEADER LINE.
DATA : ACTUAL_PERIOD LIKE PA9000-RETENTION.
DATA : PNP-SW-FOUND TYPE SY-SUBRC ,
PNP-SY-TABIX TYPE SY-TABIX.
DATA : TER_PERNR LIKE PA0001-PERNR.
DATA : REF_PERNR LIKE PA0001-PERNR.
data : key type BAPIPAKEY.
data : payed_amount type p0015-BETRG.
data : future_payment_amount type p0015-BETRG.
data : p0002 like pa0002.
types : begin of t_deduction ,
deducation_date like p0015-begda,
future_payment_amount type p0015-BETRG.
types : end of t_deduction.
data : future_deduction type standard table of t_deduction with
*header line.
data : future_deduction type t_deduction .
data : RETURN type BAPIRETURN1.
*data : deduction_p0015 like standard table of p0015 with header line.
data : deduction_p0015 like p0015 .
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
****Prepare 0015 data for deduction
*deduction for payed amount
clear deduction_p0015.
*refresh deduction_p0015.
deduction_p0015-pernr = REF_PERNR.
*deduction_p0015-pernr = TER_PERNR.
deduction_p0015-lgart = 'M120'.
deduction_p0015-begda = sy-datum + 1 .
deduction_p0015-endda = sy-datum + 1 .
deduction_p0015-BETRG = payed_amount.
deduction_p0015-WAERS = 'SGD'.
deduction_p0015-ZUORD = TER_PERNR.
*append deduction_p0015.
**deduction for future payment amount
*loop at future_deduction.
*clear deduction_p0015.
*deduction_p0015-pernr = REF_PERNR.
**deduction_p0015-pernr = TER_PERNR.
*deduction_p0015-lgart = 'M120'.
*deduction_p0015-begda = FUTURE_DEDUCTION-DEDUCATION_DATE.
*deduction_p0015-endda = FUTURE_DEDUCTION-DEDUCATION_DATE.
*deduction_p0015-BETRG = future_deduction-future_payment_amount.
*deduction_p0015-WAERS = 'SGD'.
*deduction_p0015-ZUORD = TER_PERNR.
*append deduction_p0015.
*endloop.
Create a deduction wage type in 0015 for the employee
break-point.
CLEAR RETURN.
CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
EXPORTING
NUMBER = REF_PERNR
VALIDITYBEGIN = '18000101'
IMPORTING
RETURN = return
if not return is initial.
message E000(000) with
'Referred Employee could not be locked for referal payment deducation,
please try after some time'.
endif.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = REF_PERNR
SUBTYPE = 'M120'
OBJECTID =
LOCKINDICATOR =
VALIDITYEND = SY-DATUM
VALIDITYBEGIN = SY-DATUM
RECORDNUMBER =
RECORD = deduction_p0015
OPERATION = 'COPY'
TCLAS = 'A'
DIALOG_MODE = '2'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN = return
KEY = key
break-point.
COMMIT WORK.
if not return is initial.
*return-TYPE
*ID
*NUMBER
*MESSAGE
message I000(000) with return-MESSAGE.
endif.
CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
EXPORTING
NUMBER = REF_PERNR
VALIDITYBEGIN = '18000101'
IMPORTING
RETURN = return
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
Thanks and regards
-Senthil Bala
Message was edited by: senthil balaHi Senthil
Why at all U want a subroutine to create a record in IT0015 through Dynamic action.There are some standard codes available to update infotypes.
Let me give U an example
14 9CON BETRG 4 2 I INS,0015 This will create a record in IT0015 when IT0014 is updated with Wagetype 9CON
14 9CON BETRG 4 3 W P0015-LGART='5400' Set wagetype for IT0015(Here U can use a subroutine call to set the wagetype)
14 9CON BETRG 4 4 W P0015-BETRG=P0014-BETRG set amount for IT0015(Here U can use a subroutine call to get the amount)
14 9CON BETRG 4 5 W P0015-BEGDA=P0014-ENDDA set the dates(Here U can use a subroutine call to set the dates)
Hope this will help U.
Please award points if helpful -
How to get the User input of Dynamic Action confirmation message ?
Hi Guys,
I'm using apex 4.1,
I have added a confirmation message box as page Dynamic Action. How can i get the user input of that confirmation pop up ?
ThanksHi,
you don't directly get the user input. But you should still be able to get what you want. Let's assume you have a dynamic action which fires for a "Change" (or any other) event and which has two or more actions
1) Confirm
2) Execute PL/SQL Code
If the user clicks Cancel/No in the confirm dialog, APEX will stop the execution of this dynamic action and not run "Execute PL/SQL Code".
Hope that helps
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf
Maybe you are looking for
-
Movie sound plays in background when I connect a Bluetooth Headset.
My early 2013 Macbook Pro Retina likes to play movies, and or music upon successfully pairing a Bluetooth headset. It's annoying to kill whichever application causes it every time I pair. Is there a way to prevent this from happening? Thanks!
-
Hi everyone, I am using a simple wait step in my work flow . It is a wait for Event step. It is a oo event . So i have added the class to my work flow container. And used it in my wait step . When i test the work flow it throws me the error "Error wh
-
Opening PDF's sent in English that are sent in English?
People send me PDF forms written in English. When I down load them they come out in some other language or are garbled. They use to open in English. How can I configuer my computer so thay they open in English? I use Windows 10 on my computer.
-
All of a sudden Soundtrack refuses to open. I launch the program and the white box that pops up stays up. The programs file menu can be accessed at the top, with most of the actions greyed out. I can open files but nothing happens after I select them
-
Hi, I have to translate a fla into DVD. The picture become soft and blurry when exported in AVI, but the export in .mov produce a very clean and crisp image. Re-exporting from QT Pro for import in a video editor program works perfectly well. The prob