Determine logged in users in triggers

When ever a user updates certain fields on customer record, I need to create an update trigger to store the old data to history tables.
But i need to do this only if the logged in user is a sales person and i dont need to do it if the logged in person is a Finance user.
I can use the last_updated_by column to get the responsibility of the person . But the problem is technically sales and finance can have the same responsibilities and we do not want to code based on the responsibility.
Can I use some other approach to differentiate the users, I need this in triggers so the only column i have is the last_updated_by user id.
Any ideas , please help.

Hey Funky,
Oracle eBusiness Suite AuditTrail is a full blown row level trigger based database audit. As soon as you switch it on (specifying the tables/columns you want to audit) you get 1 record per each insert, update, delete with the before image changes only. This Audittrail history stays there forever (until you purge it). Note the reason I say only is that it only stores the **changes** in order to save space - to reconstruct what the whole record was at a given point in time you need to take the current values and walk backwards chronologically and track all the changes.
Am I missing something?
Gareth

Similar Messages

  • How do I determine logged-in user ID from syscall probe ?

    Hello All - I am trying to determine the actual logged in user ID for the process/thread that is making a syscall from within a dtrace syscall probe handler. If I use the dtrace variable curpsinfo->pr_uid or curpsinfo->pr_euid I can obtain the correct UID as long as that user is not SUed to another user or root. If the user is SUed to root, then both the pr_uid and pr_euid values are 0 (for root).
    Can someone please help me find another place in some dtrace or kernel data structure that there is access to that would contain the actual logged-in user ID? Maybe somewhere in an audit data structure or something?
    Any help is greatly appreciated !! Thanks!
    Edited by: AndyFanton on Oct 6, 2009 3:31 PM

    This will work but not the most slick....
    curthread->t_procp->p_parent->p_cred->cr_uid
    May have to go up multiple levels, eg
    curthread->t_procp->p_parent->p_parent->p_cred->cr_uid
    curthread->t_procp->p_parent->p_parent->p_parent->p_cred->cr_uid

  • How to determine logged in user and responsibility in pl/sql?

    I created a procedure that uses owa_util.redirect_url to lauch a web application. This function is lauched by a function on an EBS menu.
    Before calling the redirect I use owa_cookie.send to pass the name of the user and the responsibility using a cookie. When I refer to fnd_global.resp_id or fnd_global.user_id they are always null.
    Does anyone know how I can capture the logged in user/responsibility and pass it to the web application?
    Thanks,
    -- Johnnie

    Found a hit on metalink, not good news the Fnd_Global values are not set when calling sswa pl/sql function:
    Doc ID: 726560.992
    https://metalink.oracle.com/metalink/plsql/f?p=200:27:8705377808354107614::::p27_id,p27_show_header,p27_show_help:726560.992,1,1
    Message was edited by:
    johnniebillings

  • Need query to determine current logged in user

    Because I see no way in sccm 2012 to determine if someone is currently logged into a domain joined computer.  Does anyone have a query or know of a way to get the current logged in user of a computer? I am surprised that SCCM does not show that information
    when looking at the particular device.  I did find a powershell query that I use that tells me the last logged in user but it gives me no indication if the user is currently logged in or if it was a week ago.
    Thank you.

    This PowerShell script queries a remote machine to obtain the current logged on user.  It's available on the Repository (https://gallery.technet.microsoft.com/scriptcenter/d46b1f3b-36a4-4a56-951b-e37815a2df0c).
    function Get-LoggedOnUser {
    #Requires -Version 2.0
    [CmdletBinding()]
    Param
    [Parameter(Mandatory=$true,
    Position=0,
    ValueFromPipeline=$true,
    ValueFromPipelineByPropertyName=$true)]
    [String[]]$ComputerName
    )#End Param
    Begin
    Write-Host "`n Checking Users . . . "
    $i = 0
    }#Begin
    Process
    $ComputerName | Foreach-object {
    $Computer = $_
    try
    $processinfo = @(Get-WmiObject -class win32_process -ComputerName $Computer -EA "Stop")
    if ($processinfo)
    $processinfo | Foreach-Object {$_.GetOwner().User} |
    Where-Object {$_ -ne "NETWORK SERVICE" -and $_ -ne "LOCAL SERVICE" -and $_ -ne "SYSTEM"} |
    Sort-Object -Unique |
    ForEach-Object { New-Object psobject -Property @{Computer=$Computer;LoggedOn=$_} } |
    Select-Object Computer,LoggedOn
    }#If
    catch
    "Cannot find any processes running on $computer" | Out-Host
    }#Forech-object(Comptuters)
    }#Process
    End
    }#End
    }#Get-LoggedOnUser

  • Determine the role of the logged in User

    Dear experts,
    I am working on SRM 7.0 version, I want to determine wether the logged in user is an approver, buyer or a general user ( Role determination ). Can you please suggest a way for this.
    Thanks & Regards,
    Murthy

    Hello Murthy,
    What about simply use function module BBP_USER_GET_DETAIL with importing parameter USERNAME = SY-UNAME ?
    You will get all user's roles in table ACTIVITYGROUPS.
    Regards.
    Laurent.

  • Determin how many user log on the site using JSP/Servlet?

    Hi all,
    Is there a way to determine how many user log on the site using JSP/Sevlet? I'm running Apache 2.x & Tomcat 4.x
    I'm trying to get a list of user currently log in the site.
    Please help!
    Thanks,
    -JN-

    You could use the HttpSessionBindingListener interface. Every time a user logs into the session put a user object into the session. The user object will implement the HttpSessionBindingListener interface. When the user object is added to a sessiion it recieves an event and it increments a counter. When the session times out or you invalidate the session because the user has logged out the user object will recieve an event and it can then decrement the counter.
    This will at least tell how many active user sessions there are.

  • How to determine the logged in user - BI Publisher

    Hi,
    I am building a SQL based BI Publisher report. I am using BI Publisher integrated with the E-Business Suite so all ebiz users can log in to BI Publisher
    I have a requirement that my parameter LOV query is to be restricted based on the BI publisher logged in user. I have the necessary select statement which just requires the logged in user to be supplied. But I don't know if there is any standard BI variables which I can use in my SQL Query
    Thanks
    Shasik
    Edited by: Shasik on Sep 14, 2008 1:04 AM

    Hi Shashi,
    http://winrichman.blogspot.com/2008/09/how-to-get-logged-in-obiee.html
    Use the available XDO session variables like :xdo_user_name
    Select :xdo_user_name from dual wil fetch you , the Logged in USER :)

  • How to determine if a user has access to an item

    Without using the WWSEC_API, i need to find out if a user (not the logged in user) has the right privileges to view an item (url).
    Has anyone identified what tables are involved in determining if a user has access to view an item ?

    Create a vo with the following SQL passing userid as bind value:
    SELECT C.USER_NAME,
    B.RESPONSIBILITY_NAME,
    A.START_DATE,
    A.END_DATE
    FROM APPS.FND_USER_RESP_GROUPS_DIRECT A,
    APPS.FND_RESPONSIBILITY_TL B,
    APPS.FND_USER C
    WHERE C.USER_ID = A.USER_ID
    AND C.USER_NAME= :1
    AND B.RESPONSIBILITY_ID = A.RESPONSIBILITY_ID
    You will have the list of all the responsibilities of a user.
    Kristofer

  • Is there a way to find out the GUI version of a logged in user

    Hello all,
    SAP provides a method in CL_GUI_FRONT_END_SERVICES called GET_GUI_VERSION. This works fine for supplying the version information for the logged in user.
    Unfortunately, it doesn't have any input parameters to specify "ANY"  user name.
    I'm looking for a way to find out the gui version of all logged in users.
    Tables USR41 will give me a list of the logged in users
    I can then use USR21, ADR6 and ADRP to get more user info.
    But, I can't find a way to determine what GUI version each of the users is using.
    Does anyone have any ideas?
    Thanks
    Ed Baker

    We have done in a different way. ie we have used userexit SUSR0001 and coded using
    * Collect SAPGUI info of the user logging on
    call function 'RFC_SYSTEM_INFO' destination 'SAPGUI'
      importing
        rfcsi_export = i_rfcsi.
    Here i_rfcsi-rfcsaprl contains the version info of SAPGUI
    and updated this info in a custom table.

  • Remote control kicks you out when trying to change the logged in user by clicking on the red N

    I'm running Zen 6.5 with the latest updates and the latest agents... I can
    successfully remote control a workstation through ConsoleOne but I have 2
    issues:
    1. If I'm in the middle of a remote session and I right click on the red
    N icon and change the user, it kicks me out and says "operation is
    currently disabled for the logged in user".
    2. Whenever I log in it changes the desktop background to blank (it's
    actually a blue background) and it doesn't change it back after I close
    the remote session. If I physically go that workstation and logout and
    log back in, it still keeps that same blue background.

    Gilbert,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Template creation for logged in user

    Is there a variable or other means to auto check the 'Document and Settings\<current logged in users>\My Documents'
    I can not find how to auto check the box for the current logged in user. It's not in the template editor.
    Also searching returned dead end posts...
    http://forums.novell.com/novell-prod...shortcuts.html
    http://forums.novell.com/novell-prod...s-folders.html
    http://forums.novell.com/novell-prod...ing-admin.html
    Anyone have experience with this?

    myfirelight,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Current Logged On User

    What I am needing to do is create a file with a name based on the currently logged on user in order to store some logging data.  I am using the single sign on method with the connection context cookie.  Is there a way to determine who is currently logged on with this method?  I am not interested in passwords, just the current logged on user.
    Thank You,
    Greg Johnson

    The company object in both the UI and DI have a UserName property that will contain the name of the currently logged in user.
    sboApp.MessageBox sboCompany.UserName & ":" & sboApp.Company.UserName
    John.

  • Last logged on user only populated sporadically

    I am wanting my last logged on user information to be as current and accurate as possible, i have enabled auditing and changed the client policy thresholds to lower the user time on pc before it is logged as last logged on user but 50% of the machines have
    no last logon user or have wrong or stale information...
    what is the best practice for getting this more accurate and up to date, does the client send the last logged on user back to the server as part of its inventory? why is it blank for so many machines?
    ***Don't forget to mark helpful or answer***

    If you are talking about User Device Affinity (which is what you are editing when you click the "Edit Primary User" menu item or ribbon bar button, it is actually unrelated to last logon user in any way.
    UDA and primary user are determined by events in the security event log. Thus, if you've left the default values, users must be logged onto a system for 2880 minutes (48 total hours) over a span of 30 days to automatically be marked as primary. Thus, the
    security event log on the client system must also have (at least) 30 days worth of events in order to be able to calculate this. Additionally, by default, UDA is not configured to be determined automatically so if you've left your settings at default,
    nothing will happen.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • Current logged-in user in workflow-task

    Hi,
    I'm working on an approval task where I've got some problems in determining the items an aprovee may approve.
    The structure is as followed:
    A user requests something that his manager and the manager's manager have to approve sequentially. The manager and the manager's manager should only be able to approve requests of users that have a direct connection to them (regarding business units).
    What I am now searching for is a variable oder method to determine the current logged-in user (MSKEY or Unique ID) in the worklow system so that I can create a filter for approvees (SQL statement) to filter out all not direct linked users.
    I hope somebody can help me.
    Regards,
    Andreas Dietrich

    Andreas,
    Good question.  You need to have some sort of "Managed by" Attribute.  This attribute does exist in most LDAP directories and HCM packages, however there is NO guarantee that these attribues are populated.  The other possible thing to do is setup a relationship as follows:
    All members of the Sales Team are in the SALES
    The Sales Manager can be identified with a role of SALES MGR
    The Sales VP can be identified with the role SALES VP
    In the workflow, use an approval task and write a query that would reflect the fact that the SALES MGR can approve requests from SALES
    Use the Access control tab and set it up a filter sot that SALES MGR can execute on behlaf of SALES and so on.
    Hope this helps,
    Matt

  • Determining active wireless users with ACS

    Is there a way to determine how many active wireless users are on the network by checking ACS? Currently our users need to re-authenticate periodically (about every 15 minutes), however, ACS shows no logged in users. There should at least be one -- ME!

    We should be looking for something like this on the AP:
    aaa group server radius rad_acct
    server auth-port XXXX acct-port XXXX
    aaa accounting network acct_methods start-stop group rad_acct

Maybe you are looking for

  • GL is determined but no assingment in mov.161

    Hello friends, I am not able to understand how it's happening. Need you support to understand. PO - Return PO GR - Mov.Type - 161 T-code - MIGO_GR Movement type 161 assigned to trancation key  KBS only. OBYC - No account assignment to KBS Now When we

  • Prepayment Invoice Issue

    Hi, We have a Prepayment Invoice which is in 'Available' Status , the issue is when we create Standard invoice the message gets popped up Saying there is one Prepayment available for the Supplier but when we click on to Apply/Unapply option the Prepa

  • MS 694D Pro (MS-6321) XP crashes with L2 cache

    I have a single 800Mhz P3 CPU installed PC133 memory, and have OS/2 and Win 98 running without problems.  I have tried installing both Win XP and Win 2000 and both will frequently crash - usually I cannot get past the splash screen. I have tried diff

  • Saving returned form data?

    Hi, I'm wondering if when I have my returned form data back I can then export it including the answers as a downloadable PDF? I know you can on a paid account which is fine but I would like to know if it will be in the format and design of the origin

  • DVD Video Footage to Final Cut Pro

    Is it possible to convert DVD's into quicktime files so that you can edit them inside final cut, using final cut or imovie or something like that? These DVD's are simply High Scool football games so they're not protected. Thanks for any reply that yo