cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting access of a user based on Item/BP group

former_member327292
Participant
0 Kudos

I would like to know if I can limit access of a user wherein he/she can add/edit an Item based on item group and bp based on BP group. He/she can only add/Edit vendors that belongs to non-trade BP group and item master data that belongs to non-trade item group.

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi John,

You can achieve by stored procedure:

Try this:

If @object_type='4' and @transaction_type IN ('A','U')

BEGIN

If Exists (Select T0.ItemCode from OITM T0

Where T0.ItmsGrpCod='10' and T0.UserSign='1'

And T0.ItemCode = @list_of_cols_val_tab_del)

BEGIN

Select @error = -1,

@error_message = 'Not allowed to Create Item'

End

End

Note: Change item group code and user sign as per your requirement.

Hope helpful.

former_member327292
Participant
0 Kudos

I tried the script but it only block the creation not the editing. the user can still edit the records even if it meets the criteria

former_member204969
Active Contributor
0 Kudos

You should use Usersign2 instead of usersign in this code. The last updating user's identification is stored in this field:

If @object_type='4' and @transaction_type IN ('A','U')

BEGIN

If Exists (Select T0.ItemCode from OITM T0

Where T0.ItmsGrpCod='10' and T0.UserSign2='1'

    And T0.ItemCode = @list_of_cols_val_tab_del)

Select @error = -1,

           @error_message = 'Not allowed to Create Item'

END

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi John,

For Business partner,

Try this:

If @object_type='2' and @transaction_type IN ('A','U')

BEGIN

If Exists (Select T0.[CardCode] from OCRD T0

Where T0.[GroupCode]='10' and  T0.UserSign2='1'

And T0.[CardCode]= @list_of_cols_val_tab_del)

BEGIN

Select @error = -1,

@error_message = 'Not allowed to Create BP'

End

End

Hope helpful

KennedyT21
Active Contributor
0 Kudos

Hi John...

Yes, Possible it is Possible by using Transaction notification

Regards

Kennedy