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: 

How can I disable the Reason for Rejection field in VA02 line items

Former Member
0 Kudos

Hi,

I dont want the users to be able to change the reason for rejection field in the sales order line items. Can someone please suggest a tried and tested way of doing this

Thanks for reading.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Set up an auth object for the field. In userexit field modification check the auth object and set the field to be grayed out if they don't have authority. Users can then not change the value of the field Sample code

IF screen-name = 'VBAP-ABGRU'.

AUTHORITY-CHECK OBJECT 'Z_BLK_REAS'

ID 'ABGRU' DUMMY.

IF sy-subrc EQ 0.

screen-input = 1.

ELSE.

screen-input = 0.

ENDIF.

ENDIF.

4 REPLIES 4

Former Member
0 Kudos

Set up an auth object for the field. In userexit field modification check the auth object and set the field to be grayed out if they don't have authority. Users can then not change the value of the field Sample code

IF screen-name = 'VBAP-ABGRU'.

AUTHORITY-CHECK OBJECT 'Z_BLK_REAS'

ID 'ABGRU' DUMMY.

IF sy-subrc EQ 0.

screen-input = 1.

ELSE.

screen-input = 0.

ENDIF.

ENDIF.

0 Kudos

Where exactly should I place the code you have given? Is it in some module or user exit?

0 Kudos

Sorry I just got what you said. I m awarding the points. Thanks

Former Member
0 Kudos

Don't forget to set up your auth object if you need anyone to have access. If you don't want anyone to have access you can just grey out the field. Then no one can change the field.