Dynamic ACTION creation
Hi Everybody ,
I am working on dynamic creating ui ELEMENTS . iI want to create buttons dynamically in tab strip . And i dont know how many buttons i have to create also in design time .so i want to create actions also dynamically and assigneg actions to event handlers . And assignging event handlers to butoons. Pl help is there any way to achieve this . If code is there its help ful .
Thanks in advance ,
Vijay vorsu
Hi Vijay,
here is a sample code.
method WDDOMODIFYVIEW .
data : lr_textview type ref to cl_wd_text_view.
Data:lr_container type ref to cl_wd_uielement_container,
lr_row_head type ref to cl_wd_row_head_data,
lr_button type ref to cl_wd_button,
lr_input type ref to cl_wd_input_field,
lr_flow_data type ref to cl_wd_flow_data,
lv_child_id type string.
if first_time = 'X'.
lr_button = cl_wd_button=>new_button( view = view
text = 'Create Button'
on_action = 'CLICK' ).
lr_row_head = cl_wd_row_head_data=>new_row_head_data( element = lr_button ).
lr_button->set_layout_data( lr_row_head ).
lr_button->set_tooltip( value = 'Tooltip' ).
lr_flow_data = cl_wd_flow_data=>new_flow_data( element = lr_button ).
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_container->add_child( lr_button ).
lr_textview = cl_wd_text_view=>new_text_view( view = view
text = 'Welcome to Dynamic Layout Design' ).
lr_row_head = cl_wd_row_head_data=>new_row_head_data( element = lr_textview ).
lr_textview->set_layout_data( lr_row_head ).
lr_flow_data = cl_wd_flow_data=>new_flow_data( element = lr_textview ).
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_container->add_child( lr_textview ).
endif.
endmethod.
Kind Regards
Sajid
Similar Messages
-
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.... -
Dynamic actions in creation of infotype
HI,
i have a requirement wherein i need to create a custom infotype.
In the new infotype which i have created, i need to update the records dynammically upon the modification of data in the standard infotype.
Thanks in advance.Naveen,
Follow this link to make your dynamic action successfull.
http://help.sap.com/saphelp_40b/helpdata/es/51/5184ab7b35d111950d0060b03c6b76/content.htm
- Ashish -
IT0009: payment method "cheque" and dynamic actions
Hello,
I need your help on this issue.
I have looking for answers on the different posts but i didn't found any similar problems.
For a customer, i have to settle, in case of departure (leaving) action , the creation in background of an infotype 0009 from infotype 0000 with payment method 'C' - Cheque and the BEGDA equal to the first day of the month. It is a payroll need.
The dynamics action is easy to do but i have an error which makes appears the infotype. Actually, the information City is mandatory in SAP standard (?) in case of payment 'C' - Cheque.
I did the test and when i create infotype 0009, the name of the person, from infotype 0002 i guess, is put in the field but not the adress, city and postal code. If i select payment cheque, an errror alerts me that the city is mandatory for this payment method. If i put something, no problem, but i would like to automate it and retrieve data from IT0006. That is strange is when i delete the payee information (last and first name field) and validate the screen, no more error, even if i select payment cheque. And if i save and go back on the record, data from IT0006 (city, postal code and payee) have been automatically put in the infotype.
I would like to reproduce the same thing by the dynamic action but i can't access these fields because they are not part of the P0009 table but the Q0009 structure and i don't access it through dynamic action
Do you have some experiences to share on this topic ?
Thanks in advance.hi
To replace a check or to create a check instead of a bank transfer, the system must be able to access the
correct payment method. The standard system contains predefined payment methods. However, you can
also specify your own values.
The standard system contains the following methods of payment:
- C (Check)
- D (Transfer)
- M (Check with manual assignment of check number)
Reward points -
Explain me briefly about Dynamic Actions in PA
HI Experts kindly let me know about the Dynamics actions in Personnel Administration.Am just confusing about this concept.In real time scenario what will be the use of this concept.How it will work ?Why we have given the 0077 as target infotype.Kindly describe me in detail.Actually i heard like this concept will be an added advantage in interview point of view.
Hi, Dynamic actions in real time is merely a event triggered processing that can be configured to do a required job in the back ground automatically. For example when you hire an employee (IT0000 gets created -> can be considered as a trigger). Now this creation of IT0000 can be configured to automatically create date specfications in the background or say can be used to create IT2006 -> all quota types which zero hrs.
Have a look at the following link:
http://wiki.sdn.sap.com/wiki/display/Snippets/Dynamic+Action -
Reg: SAP HR ---how to apply Dynamic actions
Hi Gurs,
Whenever subgroup RH to RS or RS to RH change then only it will create the infotype 8.Otherwise it will create the COPY for the infotype 8.
We did the configartion but whnever RH is coming then only it was showing as create.it was not comparing..But we need whenever to change subgroup RH to RS or RS to RH then only it will create the infotype 8 otherthan these two it will copy for the infotype 8.
Ex: if we change RH to CB then it will Copy the infotype..If we change CB to RH then it will create the infotype..
Can you please advise me whether we need to do any dynamic actions..bcease recently moved to functional..I dont have much idea about the functional side...
Can you please suggest me if we need to dynamic actions please provide me the steps how to follow..
Waitng for your response...
Regardds,
Kiran.hello Kiran..
Is this requirement when you try to change any employee in PA30 ?
If yes, I think we can do this using BADI
BADI: HRPAD00INFTY
In this we have a method called AFTER_INPUT ...I think here we can read the current employee subgroup value from the
parameter I503 and read the old value of subgroup from the infotype 0002 and then compare from RS to RH or RH to RS..
then if it changes create infotype 8....for creation or copy use HR_INFOTYPE_OPERATION function module....
Hope this helps...please let me know -
Defaulting values in IT0006 - Dynamic Actions
Hi ,
Need some help again.
This is my <b>requirement</b>:
In IT0006, if some condition exists (<b>P0001-WERKS = 'Value1'</b>), then i need to default a particular value in field <b>ORT01(with value Value2</b>) ( for primary business address subtype). This is to be done while creation of an entry in PA30.
This is what I have <b>done so far</b>:
I used dynamic actions table view, <b>V_T588Z</b>, and for It0006, i wrote the following entries.
U1 04 08 P P0001-WERKS = 'Value1'
U1 04 09 W P0001-ORT01 = 'Value2'
Is this correct? I am not getting the expected result when I do an entry in PA30. I have ensured the condition to be true.
I would really appriciate some prompt answers.
Thanks,
VivekHi Sarika,
I tried the user exit. It is not giving me expected result. Here is what I did:
In include ZXPADU01, i wrote the following code:
<i>WHEN '0006'.
p0006-ort01 = 'Value1'.</i>
This did not default the value to any thing.
But while debugging, I saw that this user exit comes before MP000600, where in, this field gets over written, and becomes blank. As, while debugging, when I mannualy over wrote the value, it stayed.
So what do I do now?
Also, for the dynamic actions way, suppose I have a set of P statements and W statements for the same sub-type, if I then write another set of Ps and Is (what you said in one of your replies), does it become a nested If condition, or it becomes a fresh set of If conditions?
Hope I made my query clear.
Thanks,
Vivek -
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 -
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
Maybe you are looking for
-
When I connect my Ipod nano my automatic itunes account is using my old email address. This address does not exist anymore and even if it did I have forgotten the password. How am I able to update the idtunes account to be my current one and sync al
-
Has anyone else had Library incorrectly group photos in the wrong year?
Hi All I have just noticed, after installing iPhoto 06, that the app has sorted over 4,000 of my pics in to a '2006' folder. I like taking photos but not 4,000 in 34 days! Nearly all these photos were taken in 2005 (there are separate folders in my l
-
How to display image in top level navigation
Hi, how can i display an image in the top level navigation? (looks like the top level navigation of the SDN) Thanks, Norman
-
Problem with a Try/catch exception
Hello everyone here on the forums. I'm brand new to Java and have a bit of a problem with a try catch statement I'm making. In the following code if a user enters a non-integer number the program will display "Sorry, incompatible data." Problem is it
-
public interface InputReader String readLine(String prompt) throws IOException Define two classes, OptionPaneReader and ConsoleReader, that implements this interface. An OptionPaneReader reads input by displaying input dialogs. The ConsoleReader read