cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Edit button for PO's with Inbound Delivery

Former Member
0 Kudos

Hi people,

I have an issue with standard enhancement for FPM_OIF_COMPONENT

Current View Component: WDC_WSPO_PO

Step1: I'm having a custom powl based application in portal and im getting an alv at PO level.with status(open/closd) and direction(inbound/outbound)

In the table i have hyperlink for purchase order when it is clicked, it opens another view i.e WDC_WSPO_PO(standard)

In the view, I'm getting Edit button on the top for changing the PO items that are being fetched.

The requirement is to hide/disable the Edit button for the iview where the PO direction is inbound.

Please provide your suggestions.

I understood and got an idea of implementation but i'm stuck to find the edit toolbar button in the component(Can someone tell me where can i see the edit button in the code?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Refer below code which will help you.


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.

lo_cnr_oif->get_buttons(

   EXPORTING

     iv_variant_id = 'v1' "Variant is generally available at Comp Configuration Level

    IMPORTING

      et_buttons = lt_buttons ).

"Hiding Edit 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(

    EXPORTING

       iv_function   = if_fpm_constants=>gc_button-edit

       iv_visibility = cl_wd_uielement=>e_visible-none ).

Thanks

KH

Former Member
0 Kudos

Thanks for the response Katrice.

I already tried the logic and the edit is not captured in get_buttons method.

I dont think it is exposed at configuration level and is rather inserted by FPM component itself.