Skip to Content
avatar image
Former Member

How to Know User ID in SBO_SP_TransactionNotification?

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 27, 2014 at 08:18 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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!

  • Dec 29, 2014 at 12:34 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 29, 2014 at 09:33 AM

    Hi,

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

    Add comment
    10|10000 characters needed characters exceeded