Skip to Content
0
Former Member
Aug 09, 2010 at 11:17 AM

How to enable a disbale field in standard tcode MM01

11 Views

HI,

In MM01 i made changes like if the user chooses old material grp it should prompt error.

I have used BADI and the method CHECK_DATA.

here is my code -

CHECK NOT LS_MARA-MATKL IS INITIAL.

SELECT SINGLE * FROM T023T INTO LS_T023T

WHERE SPRAS = SY-LANGU

AND MATKL = LS_MARA-MATKL.

IF LS_T023T-WGBEZ CA '~'.

MESSAGE e002(Z00__2_3_1_1___0001) WITH LS_MARA-MATKL .

ELSEIF LS_T023T-WGBEZ60 CA '~'.

MESSAGE e002(Z00__2_3_1_1___0001) WITH LS_MARA-MATKL .

ENDIF.

When i test run this while creating material thru MM01, im getting the error and its working fine, but the field MAterial Group is getting greyed out and its not allowing user to select new material grp.

Anyone pls help me out .

Thanks