cancel
Showing results for 
Search instead for 
Did you mean: 

How to Know User ID in SBO_SP_TransactionNotification?

Former Member
0 Kudos

It is too easy for users who should be able to close production orders to forget to report completion first. If these steps are done in the wrong order, you cannot simply re-open the production order to fix it.

I want to update SBO_SP_TransactionNotification to make it disallow non-superusers from closing incomplete production orders. But the logged-in user's ID isn't passed as a parameter.

Is there any way to learn the logged-in user's UserCode or UserID during execution of SBO_SP_TransactionNotification?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Through UserSign field you can create the validation.

You can use the below query

IF EXISTS (SELECT T1.DocEntry FROM OITM T0 JOIN PDN1 T1 On T0.ItemCode =T1.ItemCode JOIN OPDN T2 ON T1.DocEntry= T2.DocEntry WHERE T0.QryGroup7 ='Y' AND T2.usersign <>1  AND T1.DocEntry = @list_of_cols_val_tab_del)

Regards,

Tausif

Former Member
0 Kudos

I get it, Tausif.

You're saying that because SBO_SP_TransactionNotification gives me the opportunity to return an error code to roll back a transaction which has already been entered, the info I need is already in the database. I only have to use the key(s) given to me by @list_of_cols_val_tab_del to look up the new record and query it for whatever I want to know. In this case, UserSign tells me the UserID of the person attempting the change.

Thanks!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

if you got the answer, close the thread with helpful answer

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Run below FMS to get current logged userID. Create header level UDF at production order and add this FMS  and block closing of production order by non-super user.

Thanks & Regards,

Nagarajan