Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ME21N-deactivate hold button (BADI)

former_member225134
Participant
0 Kudos

Hi all,

     Hold button in me21n screen is deactivated by using (me_hold_po),but my requirement is to hide or deactivate the hold button based on plant.

   alread i gave code as ch_allowed = space.How to hide the hold for certain plants.???????

1 ACCEPTED SOLUTION

former_member202818
Active Contributor
0 Kudos

HI Anitha,

Inside IS_ALLOWED method use internal table IM_BEKPO, from this you will get WERKS(plant).

Based on plant value set value for CH_ALLOWED.

read IM_BEKPO into WA_BEKPO index 1.

if sy-subrc = 0.

  if WA_BEKPO-WERKS = '0001'.

      CH_ALLOWED = ''.

  endif.

endif.

8 REPLIES 8

0 Kudos

check the attribute of the that method

IM_EKKO    Importing    Type    EKKO

IM_BEKPO    Importing    Type    MMPUR_BEKPO

plant you will find at item level then you can give the condition for plant by checking at item level.

0 Kudos

Thanks for ur repli yogesh,

          I can find bekpo-werks at item level.In interface is_allowed  method IF_EX_ME_HOLD_PO~IS_ALLOWED under that may i give that condition or what way.

Former Member
0 Kudos

Hi anitha,

For that what BADI you found.

former_member202818
Active Contributor
0 Kudos

HI Anitha,

Inside IS_ALLOWED method use internal table IM_BEKPO, from this you will get WERKS(plant).

Based on plant value set value for CH_ALLOWED.

read IM_BEKPO into WA_BEKPO index 1.

if sy-subrc = 0.

  if WA_BEKPO-WERKS = '0001'.

      CH_ALLOWED = ''.

  endif.

endif.

0 Kudos

THANX FOR UR REPLI SREE,

in data declaration.

   DATA: WA_EKPO LIKE IM_BEKPO.

am getting following error.


wa_ekpo cannot  be converted to the like type of im_bekpo.

0 Kudos

use LIKE LINE OF

0 Kudos

Thank you sree,

    Issue solved.......

0 Kudos

Happy to help u