cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict Sales office and Sales Group.

Former Member
0 Kudos

Hi All,

I want to restrict the users from changing the sales office and sales group in the sales order.

Is there any standard way to achieve this or do we need to do with User exit??

Please help.

Thanks,

Pavan.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Siva,

Thanks for your reply.Is there any SAP standard to do this or we need to use user exit only??

Thanks,

Pavan.

bsivasankarreddy_reddy
Active Contributor
0 Kudos

hi

there is no standard settings for estrict the users from changing the sales office and sales group in the sales order

so you have to write the logic in userexit

DATA: lt_user_list   TYPE STANDARD TABLE OF tvarvc,

       lw_user_list   TYPE tvarvc,

       lr_user        TYPE RANGE OF syuname,

       lw_user        LIKE LINE OF lr_user.

IF screen-name EQ ' VBAK-VKBUR' and   VBAK-VKGRP.

* IF sy-tcode EQ 'VA02'.

**Get list of users who are allowed to change SO - only they can change payment terms

     SELECT *

       FROM tvarvc

       INTO TABLE lt_user_list

      WHERE name = 'ZSD_VA02_ALLOWED'

        AND type = 'S'.

     IF sy-subrc = 0.

       LOOP AT lt_user_list INTO lw_user_list.

         lw_user-sign = lw_user_list-sign.

         lw_user-option = lw_user_list-opti.

         lw_user-low    = lw_user_list-low.

         lw_user-high   = lw_user_list-high.

         APPEND lw_user TO lr_user.

         CLEAR lw_user.

       ENDLOOP.

**    If user is not in the users listed for change allowed

       IF sy-uname NOT IN lr_user.

         screen-input = 0.

       ELSE.

         screen-input = 1.

       ENDIF.

     ENDIF.

   ENDIF.

ENDIF.

go to STVARV t code here you check the NAME and give the user ids who need to change

Former Member
0 Kudos

hi,

Thanks for your prompt reply.

Thanks,

Pavan.

bsivasankarreddy_reddy
Active Contributor
0 Kudos

hi

use this user exit

USEREXIT_FIELD_MODIFICATION in MV45AFZZ