cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling and disabling elements of FPM component dynamically

Former Member
0 Kudos

Hi Experts,

I am new to FPM Concepts. I added an element in an FPM component. The enabling and disabling of this element should takes place the way other standard elements enable and disable in the component. For example, in the display mode of the component all standard elements get disabled, and during the edit mode all the elements gets enabled. Whereas my element is always enabled. Can someone suggest me how to synchronize my element with other standard elements.

Thanks&Regards,

Santhosh.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Santosh,

Can you please explain what  do you mean by an element in FPM ?

If some FPM toolbar buttons/Links , then you can use the methods in oif reference ( IF_FPM_CNR_OIF, If you are using FPM OIF, same would be applicable for other floor plans )

For example if we want to hide the SAVE button on FPM tool bar based on certain condition we can use the below method.

* Ger reference of OIF Component configuration

    wd_this->mr_fpm_oif ?= wd_this->mr_fpm->get_service( iv_service_key = cl_fpm_service_manager=>gc_key_cnr_oif ).

    wd_this->mr_fpm_oif->define_button(

      EXPORTING

        iv_variant_id     = 'VARIANT_1'

        iv_function       = 'ACTIVATION_FUNCTIONS'   " see Interface IF_FPM_CONSTANTS and attribute GC_BUTTON

        iv_element_id     = 'SAVE'

        iv_visibility     =  cl_wd_button=>e_visible-none  " Web Dynpro: Visibility

The enable property can also be set similarly.

Hope this helps.

Reward points would be helpful.

Thanks,

Sonia

guillaume-hrc
Active Contributor
0 Kudos

Hi,

One way would be to configure 2 variants: one for edition and one for display and to swotch between the 2 at runtime.

http://scn.sap.com/thread/1974784

Best regards,

Guillaume