Skip to Content

How to Hide a button (FPM) in webdynpro

Hi Experts,

My req is regarding FPM. Actually in my view, I have some buttons like SUBMIT CHECK EDIT etc.

What I want is with some condition I have to hide SUBMIT button from the view when populating the view.

I wrote the below code in the WDINIT of the view, but it is giving an error, that is attached below.

Please help....

Error :-

00.JPG (35.5 kB)
1.JPG (51.9 kB)
22.JPG (29.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 18, 2013 at 04:41 AM

    Check in ST22 Short Texts, what exactly is the cause of error.

    Also, before calling define_button( ) , check if the instance you mentioned wd_this->go_fpm_oif is bound or not. for e.g.

    if wd_this->go_fpm_oif is bound.



    Try possibly with below code and do let us know.

    *----Get a handle to the CNR.DATA LO_CNR_OIF     TYPE REF TO IF_FPM_CNR_OIF.   lo_cnr_oif ?= cl_fpm_service_manager=>get_service( cl_fpm_service_manager=>gc_key_cnr_oif ).*---Hide FPM close-button
      DATA lt_buttons TYPE if_fpm_cnr_oif=>t_button.
          iv_variant_id = 'v1' "Variant is generally available at Comp Configuration Level
          et_buttons = lt_buttons ). "Hiding Close Button, Same in above internal table lt_buttons you will get your Submit Button FUNCTION & ELEMENT_ID so as to "control visibility.lo_cnr_oif->define_button(
          iv_function   = if_fpm_constants=>gc_button-close
          iv_visibility = cl_wd_uielement=>e_visible-none ).

    Thanks & Regards

    Tushar S.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Thushar,

      My issue is solved...

      Thank you .....

      Actually the code which you have given is for EDIT button. But my requirement was SUBMIT button. As SUBMIT button was not standard button I made a small change in the code and it is working fine now.

      In the method define_button,



            iv_function   = if_fpm_constants=>gc_button-alternate_function

              iv_element_id  = 'SUBMIT' " Event id of my Button

            iv_visibility = cl_wd_uielement=>e_visible-none ).

      Thanks to all for valuable suggestions ........

      Anoop Satheesan

  • avatar image
    Former Member
    Sep 17, 2013 at 04:10 PM

    You can hide the button in the FPM configuration itself. Why you need to write the code?

    Also post your question in FPM or Webdynpro forum to get maximum response

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 18, 2013 at 01:25 AM

    Shouldn't be difficult if you are using OVP pattern. You can probably get the parameters in



    methods of your FEEDER CLASS.

    Does that make sense ?

    Add comment
    10|10000 characters needed characters exceeded