on 05-25-2011 9:10 AM
Dear Gurus,
how can I grey out the G/L account field if i choose the correct material group in ME51N?
i don't want the user change the field when they choose the correct material group is the reason why i do this.
is there any help?
i really appreciate it.
Hi,
I have done same same for ML81n. see below:
*Enhancement for displaying GL Acc field Grey out on for this tcode
if sy-tcode = 'ML81N'.
LOOP AT SCREEN.
IF SCREEN-GROUP2 = '001'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
but i suggest you to find enhancement for (MEREQ001)
check for the method Modify screen and insert the logic using enhancement.
Hope this will help you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear shahin11,
Now I wanna achieve the goal with BAdI, but I really have no idea why it couldn't be greyed out in ME51N.
method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM.
INCLUDE MM_MESSAGES_MAC.
DATA: I_ACT_ITEMS TYPE MEREQ_ITEM.
FIELD-SYMBOLS :<fs_sakto> type ANY.
DATA: STR TYPE STRING.
if I_ACT_ITEMS-MATKL ne 6299 AND SY-TCODE = 'ME51N' AND i_act_items-KNTTP = 'K'.
STR = '(SAPLMEACCTVI)MEACCT1100-SAKTO'.
ASSIGN (STR) TO <fs_sakto>.
IF SY-SUBRC = 0.
LOOP AT SCREEN.
IF SCREEN-NAME = <fs_sakto>.
SCREEN-INPUT = 0. " grey out field - sakto
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
endif.
endmethod.
Can you give me a hand?
Thanks a lot.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.