on 04-22-2011 8:21 AM
hello guys i want to trigger the change badi when a user clicks on a button. Any help would be create?
I am using the set change by client setting it to true and then firing the refresh but it is not working? Any clues? Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, maybe you guys are not understanding the question. But let me elaborate. This is going to be a standard dynpro component for Purchase Orders. So i have added a button to the screen. When the user clicks on the button, I want the logic to hit the change badi so that i can do my custom logic based on the values from the other views associated with the PO. Thank you.
As I told you in that linked thread, I'd suggest trying to use SET_CHANGED_BY_CLIENT method on the context of your webdynpro. This is sufficient to make the system aware of a change and trigger the CHANGE badi.
As far as I've observed doing my tests, the CHANGE badi is then triggered after an event that will follow the SET_CHANGED_BY_CLIENT execution.
So I'd suggest two test:
- pre-exit of the method you trigger when the user press your custom buttom: set_changed_by_client and then execute your code. See if the badi is then triggered;
- if not: you could "force" a subsequent action after the button press, for example, a simple REFRESH of the view. Then I'm sure that, after the set_changed_by_client method, the badi will surely be triggered.
Please be aware that I'm absolutely NOT a guru on these arguments, so I'm trying to give you some workarounds I implemented on an SRM 7 system. Probably some guru will have better and cleaner solution for your task, but as far as I've seen, these ones should meet your needs.
hey.. actually i got the element that was selected which is the button and set the set change by client to X. Then i called the refresh /sapsrm/if_cll_xo_mapper~fire_event_refresh but it is still not working.
when i debug i can see the changed by client attribute as X as well. Am i doing something wrong? Thanks!
so this is what i did for my custom button.
element = wd_context->get_lead_selection( ).
CALL METHOD element->set_changed_by_client
EXPORTING
flag = ABAP_TRUE.
call the method wd_comp_controller /sapsrm/if_cll_xo_mapper~fire_event_refresh
and it is not triggering my changed badi. Let me know what is wrong? Thanks!
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.