on 01-14-2011 6:38 AM
In My FPM Configuration I have added a custom button for which I have assigned the event and its working successfully.
Now My requirement is to hide the button Depending on certain condition by doing coding.
For example : if Condition does not satisfy
Hide the custom button designed in FPM configuration on tool bar
Else.
Display it .
Endif.
hi,
It is specific to FPM and i would appreciate if you post this in FPM forum.
There is a method define_button in IF_FPM_CNR_OIF. Define a attribute in your component controller like this
GO_FPM_OIF type ref to IF_FPM_CNR_OIF.
Initialize in WDDOINT
wd_this->go_fpm_oif ?= wd_this->go_fpm->get_service( iv_service_key = cl_fpm_service_manager=>gc_key_cnr_oif ).
I do it in PROCESS_BEFORE_OUTPUT but you can do this coding anywhere in your component controller.
call method wd_this->go_fpm_oif->define_button
exporting
* iv_variant_id =
iv_function = if_fpm_constants=>gc_button-other_function
iv_element_id = 'Your button id'
* iv_sequence_id =
* iv_design =
iv_enabled = abap_false
* iv_explanation =
* iv_on_action =
* iv_text =
iv_tooltip = 'Your tooltip'
* iv_visibility =
* iv_default_button =
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found a way to hide based on condition ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matteo Montalto
Go to your FPM component in that find the Page header view where tool bar will be present.
In that go to hook method modify view, you can always code to hide the Button depending upon certain condition .
For eg..
you will find this code by SAP present in wd_do_modifyview
IF lv_close_supported = abap_false. "This code is for hiding Close button
wd_assist->mv_hide_close_button = abap_true.
ENDIF.
like this you can Maintain your own condition and and your Button you can hide it .
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.