Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8122

Re: SAP Activity - Type and Subject

$
0
0

Good morning Friends,

I used the below codes to block users who are not super users to add new issues.

In my rule only the superuser could adicinar new issues, however you can tailor your business rule.

Hope this helps.

 

IF @object_type='84' AND (@transaction_type='A' or @transaction_type='U')

Begin

    DECLARE @usercode INT

    DECLARE @username varchar(10)

    SET @usercode = (SELECT UserSign FROM [OCLS] WHERE Code = @list_of_cols_val_tab_del)

    SET @username = (select U_name from [OUSR] where INTERNAL_K = @usercode)

    IF @usercode not in (Select USERID from OUSR where SUPERUSER = 'Y')

 

    BEGIN

    SELECT @error =84, @error_message = 'Usuário sem permissão para criar novo assunto!'+' '+'Usuário: '+@username

    END

END


Viewing all articles
Browse latest Browse all 8122

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>