on 05-28-2014 9:10 AM
Hi Everyone,
I am trying to trigger the onEnter event from a field after the user selected something on the F4 functionality.
This F4 functionality has been implemented using FREE_HELP.
The Sales Org. ID field has also an onEnter action wich has it's own existing logic. This is the logic I want to trigger also after user selects a sales id from the F4 screen.
This FREE_HELP functionality relates somehow with a new component.
I tried adding this syntax to the WDDOINIT method, but I had no results.
wd_this->wd_get_api( )->register_on_enter_for_f4( register_on_enter = abap_true ).
Your help is much appreciated.
Best regards,
Elena
Hi Elena,
Please check the below document
Note: this helps you if your system is NW 7.4
Otherwise,
in modifyview method you can trigger the event onEnter and pass the event parameters
You need to collect the required event parameters like CONTEXT_ELEMENT, etc
Please refer the below link
Hope this helps you.
Regards,
Rama
Message was edited by: Ramakrishnappa Gangappa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramakrishnappa,
Thank you for the reply.
My system is NW 7.4 and I already looked into the first document you provided.
I think it doesn't work for me cause that FREE_HELP thing refers to a different component.
In the example from the doc the only thing to do would be adding bellow syntax to the WDDOINIT method.
wd_this->wd_get_api( )->register_on_enter_for_f4( register_on_enter = abap_true ).
I tried adding it to the WDDOINIT method of the first component and also the one triggered for the F4 help. Still no result.
I also found this link:
Looks useful but requires a new event, event handler and also a event listener. I also wanna be sure I'm using the proper coding procedure.
Any further advice is appreciated.
Best regards,
Elena
Thank you all for the answers.
I ended up not using this onEnter event after the F4 action as it might effect other functionality of the component.
But both answers helped me get to that conclusion.
What I did was creating a new static attribute LV_F4_SELECT in the main component.
I set this attribute also in the F4 component (whenever a sales org is selected).
IF l_sales_area-sales_org IS NOT INITIAL.
ZCL_COMP_NAME=>LV_F4_SELECT = ABAP_TRUE.
ENDIF.
Then in the WDDOMODIFYVIEW method I checked whether the attribute holds the set value and then I triggered my logic.
IF ZCL_TDM_ASSIST_BP_CREATE=>LV_F4_SELECT = ABAP_TRUE.
ZCL_TDM_ASSIST_BP_CREATE=>LV_F4_SELECT = ABAP_FALSE.
wd_comp_controller->MY_LOGIC_METHOD(
IM_VIEW_API = wd_this->wd_get_api( )
).
ENDIF.
Best regards,
Elena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Elena,
Can't you use the event ON_VH_CLOSED of the interface controller like in sample Web Dynpro DEMO_VALUE_HELP?
Kind regards,
Julien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
So the methods from the previous screenshot are from the ZNEWCOMPONENT.
I think the data is been selected here at the ONACTIONAPPLY .
Still if only the WDDOMODIFYVIEW is being triggered then I think there should be the place were I must right some syntax to relate it with the onEnter action.
Not sure though how the syntax should look like.
Best regards,
Elena
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.