Skip to Content
0

Need Help for this SPTN?

Nov 08, 2016 at 12:06 PM

37

avatar image

Hi Friends

if @transaction_type in ('A','U') and (@object_type='2') begin

if exists (SELECT t0.CardCode FROM [OCRD] T0 inner join OUSR T1 on T0.UserSign=t1.internal_k WHERE t0.GroupCode in ('108','114','115') and T0.CardType='C' and T0.UserSign not in ('1','45', '46','47','48','61','62','55','70','65') and T0.CardCode=@list_of_cols_val_tab_del) begin

select @Error = 186,@error_message = 'Customer Group of SEZ,Dealer,Branch not allowe to create,Branch-Ask Your Branch Manager"'

end

end

in this SPTN , i am not able updated that groups through manager user also,

what is wrong in his query plz let me know

Regards

Kurma

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

DIEGO LOTHER Nov 09, 2016 at 01:28 AM
0

Hi Reddy,

First of all in your case, you don't need to do a inner join with OUSR, because you don't use this table. Check if the UserSign of your user "manager" are in the list ('1','45', '46','47','48','61','62','55','70','65').

Hope it helps

Kind Regards,

Diego Lother

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi DIEGO

I am trying to add through manager user as per ur instructions,but it is again showing this error only

this would come for other than managers

Regards

REDDY K

0

Hi Reddy,

What is the UserSign of your "manager" user?. If the "manager" user that you mentioned is the default user of SAP B1, you shoudn't receive any error, because the UserSign is 1. If not, try run this query:

SELECT INTERNAL_K FROM OUSR WHERE USER_CODE = 'your user login here'

get the result and add the new value on your list ('1','45', '46','47','48','61','62','55','70','65', 'new value').

Hope it helps.

Kind Regards,

Diego Lother

0
avatar image
Former Member Nov 09, 2016 at 12:29 PM
0

Hi,

This worked

if exists (SELECT t0.CardCode FROM [OCRD] T0 WHERE t0.GroupCode in ('108','114','115')

and T0.CardType='C'

and T0.UserSign not in ('1','45', '46','47','48','61','62','55','70','65')

and T0.CardCode=@list_of_cols_val_tab_del)

Begin

set @Error = 186

set @error_message = 'Customer Group of SEZ,Dealer,Branch not allowed to create,Branch-Ask Your Branch Manager"'

End

Regards

Pradnya

Share
10 |10000 characters needed characters left characters exceeded