on 05-23-2013 6:59 AM
Hello experts.
I want to trigger action automatically only once at screen starts.
I found out there's Timed Trigger which triggers action every delay seconds.
So I set delay to 1 second. But this triggers action every second.
Is there any UI Element to trigger action only once?
And please let me know if there is proper setting of Timed Trigger that can execute action only once(at start of the screen).
thanks
Hi KT,
"I want to trigger action automatically only once at screen starts."
You could use the view's WDDOINIT method, which is executed upon initialization of the view or method WDDOMODIFYVIEW which is executed each time the view refreshes. Method WDDOMODIFYVIEW has a parameter, first_time, that you could check to ensure the logic is executed only once.
IF first_time = abap_true.
...
ENDIF.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
WHY DONT YOU WRITE THE CODE ON wDOMODIFY IN A CONDITION IF FIRST_TIME = TRUE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I guess you can achieve what you want with the help of Time triggered UI element itself. While creating the timed triggered UI element you can create an action method for it. Create a context attribute or view attribute as an indicator and set it to default 1.
At the starting of method check the count = 1 and proceed with the action you want to do and at the end increment the count or clear the count. so next when the event handler method for timed trigger executes the action will fail the condition and skip further processing.
Best Regards,
Arun Krishnamoorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Bind the delay of your TimedTrigger to context attribute that you set to 0 the first time the action is triggered.
Best regards,
Guillaume
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.