Skip to Content
0

Making Cost Center field gray-mode in ME21N\ME22N

Jun 07, 2017 at 09:00 AM

111

avatar image

Hi Experts, Good Day.

Can anyone let me know How to make Cost Center field disable (Gray mode) based on Plant in PO Items.

I have used Function module MEPOBADI_FS_ITEM and implemented the implicit Enhancement but still cost ceneter field is editable mode only.

CONSTANTS: lc_metafield TYPE mmpur_metafield VALUE '510'.

READ TABLE ch_fieldselection ASSIGNING <fs1> WITH KEY
metafield = lc_metafield.
IF sy-subrc IS INITIAL.
<fs1>-fieldstatus = '*'.
ENDIF.

Can anyone suggest me the Exits or BADIs to achieve above requirement

Thanks,

Selvam

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Jun 07, 2017 at 09:44 AM
0

AFAIK the only available BADI method is IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM and is only available for customer fields, with an enhancement in FM MEPOBADI_FS_ITEM you are already further. You should debug again to find where SAP overwrite your changes?

Share
10 |10000 characters needed characters left characters exceeded
Sijin Chandran Jun 08, 2017 at 11:34 AM
0

Hi Selvam,

Apart from what Raymond suggested.

You can try with Implicit Enhancement options.

Program : SAPLKACB

Screen : 1101 ( is the Screen which you see for Account Assignment tab , where Cost Center is available ).

In the Flow logic for this Screen you can see for PBO event there is a MODULE init. Inside that there is a routine PERFORM pbo_init.

Try to Implicitly Enhance the code of PERFORM pbo_init and try to place your code there.

Say something like ,

  1. loop at screen.
  2. if ( screen-field = 'COBL-KOSTL' ).
  3. "Put your conditions here say for e.g. COBL-WERKS EQ '6401'
  4. screen-input = 0. "disable textbox for input
  5. endif.
  6. modify screen.
  7. endloop.
Share
10 |10000 characters needed characters left characters exceeded