cancel
Showing results for 
Search instead for 
Did you mean: 

Hide SAVE button during approval of a Shopping Cart

Former Member
0 Kudos

Hi Experts,

My requirement is to Hide SAVE button of the shopping Cart only when an approver opens it.

During all other sceanario, it should not be changed.

I have tried the below coding and it works fine if i give name of other buttons like 'EDIT' or 'ORDER'.

But it is not working for SAVE and CLOSE button.

"Hiding SAVE Button during Approval mode
     lo_cnr_oif->define_button(
         EXPORTING
           iv_variant_id  = 'VARIANT_SC_PROF'
           iv_function   if_fpm_constants=>gc_button-alternate_function
           iv_element_id  = 'SAVE'
            iv_enabled    = ''
           iv_visibility = cl_wd_uielement=>e_visible-none ).

Can anyone tell me the reason why it is not working? Also, tell me the correct way to hide SAVE button.

Thanks,

Parthi

Accepted Solutions (1)

Accepted Solutions (1)

former_member206441
Contributor
0 Kudos

Hi Parthee,

Please try with the code in component  - /SAPSRM/WDC_UI_SC_OIF_CA

view's do init or Modify view methods

    CALL METHOD l_o_cnr_oif->define_button

      EXPORTING

        iv_function   = 'OTHER_FUNCTIONS'

        iv_element_id = 'SAVE'

        iv_enabled    = abap_true

        iv_visibility = '01'.

  ENDIF. " IF l_flg_vi_save IS NOT INITIAL.

Thanks & Regards

Arun.K.P

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Arun,

It is working fine. Thanks a Lot