03-25-2013 4:50 AM
Hi all,
We have a group of users who should not have the authorization to change the "Terms of Payment Key" field in ME22N. What is the best way to achieve this please? Please note that another group of users should have the authorization to do this.
Thanks in advance, Tony.
05-10-2013 8:19 AM
Hi D E,
Best way is to create a new role for that particular user group and restrict on "Terms of Payment Key" field in ME22N and assign this role to that user group and remove the role in which Payment key is not restricted
Regards,
Kiran
05-10-2013 5:56 PM
Create a 2nd role restricting Payment term or try to create a screen variant using SHD0 and give to those users or implement BAdi ME_PROCESS_PO_CUST with help of ABAP.
05-10-2013 10:10 PM
Hi,
we just implemented this requirement. Unfortunately, BADI ME_PROCESS_PO_CUST does not let you control this field. Hence we used implicit enhancement end of FM MEPOBADI_FS_HEADER. It's right after the standard BADI gets called. The logic is simple. The field is closed unless you have authorization for new custom authorization object. Here is the code.
* Allow modification of field payment terms
* Note: this code does not get executed if there is no BADI implementation
AUTHORITY-CHECK OBJECT 'ZMM_PO_FIE'
ID 'FELDNAME' FIELD 'ZTERM'
ID 'ACTVT' FIELD '02'.
CHECK sy-subrc NE 0.
READ TABLE ch_fieldselection ASSIGNING <fs1>
WITH TABLE KEY metafield = mmmfd_pmnttrms.
CHECK sy-subrc EQ 0.
<fs1>-fieldstatus = '*'. " Display
Cheers
12-12-2013 11:22 AM
Hi
with a little change ..., it works perfect to us:
AUTHORITY-CHECK OBJECT 'YZTERM'
** ID 'FELDNAME' FIELD 'ZTERM'
ID 'ZTERM' DUMMY
ID 'ACTVT' FIELD '02'.
CHECK sy-subrc <> 0.
READ TABLE ch_fieldselection ASSIGNING <fs1>
WITH TABLE KEY metafield = mmmfd_pmnttrms.
CHECK sy-subrc EQ 0.
<fs1>-fieldstatus = '*'. " Display
All the Best,
SK
12-12-2013 11:28 AM
and forgot to mention, also SU20, SU21, SU24 for ME21N (& ME22N).
SU24 with check indicator and proposal 'Yes'.
KR,
SK