Get name of user

I wrote a concurrent process that updates a few tables. I wrote a concurrent process submitted through Oracle Fiancials Version 11i and runs in the Oracle 10g database. I tried the following command to retrieve the name of the user that submitted the concurrent process:
INSERT INTO nyc.zzsco_material_transactions
(TRANSACTION_DATE
, INVENTORY_ITEM_ID
, trx_source_line_id
, creation_date
, user_name
SELECT TRUNC(mmt.TRANSACTION_DATE)
, mmt.INVENTORY_ITEM_ID
, mmt.trx_source_line_id
, SYSDATE
, SYS_CONTEXT('USERENV','SESSION_USER')
FROM apps.mtl_material_transactions mmt
WHERE mmt.TRANSACTION_DATE BETWEEN vFrom_Date AND vTo_Date
AND mmt.transaction_type_id = 53;
The function SYS_CONTEXT('USERENV','SESSION_USER') returns the user 'APPS' but I want to know the name of the user that submitted to process like 'JOE' or 'SUSAN' or a user ID. What function do I use for this in my envirtonment?

Now I got it working. with the select statement:
SELECT sys_context('USERENV', 'OS_USER') INTO vCurrentUser FROM dual;
But the SELECT returns the value: 'appltecdev'
This is the name of the database instance but I need the name of the user which is for this test me. Or a user ID would be okay. I just need something to identify the person who submitted the concurrent process.
Thanks, Ned

Similar Messages

  • Get name of user depending on condition types by changing the sales order

    Hi,
    I need to display the name of the user who made the changes in the condition types
    i.e.. need to get the name of the user , by changing in the condition types through transaction VA02.
    I am having object id and tabkey (of table CDPOS) but in table CDHDR, i am getting only one entry for object Id and there i can not get the user name depending on the different conditions types.
    Please help me to solve this issue.
    Regards,
    Darshana

    Hi,
    Item details are stored under the TABNAME = 'VBAP'.
    For example if you execute the function module 'CHANGEDOCUMENT_READ' for order number 5000000000, item number 10,
    Function module will return an entry with TABNAME = 'VBAP', TABKEY = '5000000000000010', and other details.
    Execute the function module by passing object class = 'VERKBELEG' and object id = <order number>
    Regards
    Vinod

  • Unable to Retrieve Contact Info from synch server - Gator wrote to try renaming file but I can't manage to find the pathway on my Win 7 computer for that file! got as far as my name under user but can't get to application data.  Can someone help?

    Hi, going crazy.  Can't get this fixed.  Unable to retrieve contact info from synch server.  I did re-do synch using one time only replace I-phone info from "contacts" on computer and tried synching after that - no use same error!
    I saw someone by name of Gator wrote pathways to follow in windows but got only as far as user (yes, selected my name as user as opposed to public) then clicked it open but lost after that - can't get to appdata for the next step....  any help or ideas would be soooooo appreciated. I'm so tired of this issue. thanks!
    Pinina in Phoenix, Az

    Hi, going crazy.  Can't get this fixed.  Unable to retrieve contact info from synch server.  I did re-do synch using one time only replace I-phone info from "contacts" on computer and tried synching after that - no use same error!
    I saw someone by name of Gator wrote pathways to follow in windows but got only as far as user (yes, selected my name as user as opposed to public) then clicked it open but lost after that - can't get to appdata for the next step....  any help or ideas would be soooooo appreciated. I'm so tired of this issue. thanks!
    Pinina in Phoenix, Az

  • Hello, I have this problem on updating applications on my iPhone 4s 5.1.1 i dont know if you can help me with. when ever i want to update an application on apple store i get a different user name then mine(slamdance@cracked.by) this user name is not mine

    Hello,
    I have this problem on updating applications on my iPhone 4s 5.1.1 (jail broken) i dont know if you can help me with.
    when ever i want to update an application on apple store i get a different user name then mine([email protected]) this user name is not mine but its always there only on updating my app's.
    thanking you in advance for your kind help.

    Under the Terms of Use of this forum it is prohibited to discuss jail breaking. By jail breaking your iPhone you void any warranty you may have and forfeit any support from this forum.

  • How to get the name of User NT

    I need to get the name of user NT that access to my web site (intranet),
    I was used the class NTSystem but this return the name of user NT of the server, but I need the current user that access to the site.
    Thanks a lot!
    yaguip

    not sure if this is what you're after, but it returns the os user of the jvm..
    try this...
    System.getProperties().getProperty("user.name");
    Takis

  • How can i get value when the field name is user's defined

    Hi,
    I have a one java method:
    public ResultSet countUserDb(String id) {
    ResultSet rs = null;
    con = dbcon.connect();
    String queryString = ("select count as count from
    db_allocation where user_id='"+id+"'");
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    When i call it in a jsp file.
    ResultSet counter =db.countUserDb(request.getParameter("id"));
    if(counter.next())
    int x=rs.getInt("count");
    Tomcat said incorrect column name.How can i get the result set when the field name is user's defined.
    Best regards
    Ricky

    You should give the user defined name in the ResultSet.getXXX method to retrieve the column value.
    Example
    SQL:
    Select ename as employeename from emp;
    You should say :
    ResultSet.getString("employeename"); to get the value.
    Alternatively you can retrieve it using column number:
    ResultSet.getString(1);
    Chandar

  • How to get logged in user name from windows service c#

    i use the below code to get logged in user name.
    private string GetLoggedInUser()
    string userName = "";
    if (System.Security.Principal.WindowsIdentity.GetCurrent() != null)
    userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
    return userName;
    just do not understand why it is not giving a logged in user name rather it is return data in this format
    NT AUTHORITY\SYSTEM but i want to get user name.
    i try to run my service as Local Service and local system account but in every case i am getting this string
    NT AUTHORITY\SYSTEM instead of logged in user name.
    so please guide me what to change in code. thanks

    System is the account the service is running under.
    There can be none or many interactive users be logged in. What if none or multiple are logged in? Which one are you referring to then?
    Armin

  • How can i get the value when the field name is user defined

    Hi,
    I have a one java method:
    public ResultSet countUserDb(String id) {
    ResultSet rs = null;
    con = dbcon.connect();
    String queryString = ("select count(*) as count from
    db_allocation where user_id='"+id+"'");
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    When i call it in a jsp file.
    ResultSet counter =db.countUserDb(request.getParameter("id"));
    if(counter.next())
    int x=rs.getInt("count");
    Tomcat said incorrect column name.How can i get the result set when the field name is user's defined.
    Best regards
    Ricky

    Hi Ricky
    To access pseudo columns you can specify an alias or use the index on the column (e.g. getInt(1)).
    Chris
    NB: you should use bind variables instead of concatenating the id to the SQL statement.

  • Get last logon + user name

    Hi Everyone 
    first on all where is the powershell forum ?
    I need help with powershell,
    we have file ( Excel -CSV )  that contains names of 70  computers name ,
    I want to know which user did logon and  who is now is login.
    NOTE :
    I succeed to get the last login but I do not know which user did logon
    I will happy if someone help me , thank you and i appreciate you
    My Website:www.Pelegit.co.il Mcitp /Mcsa 2012

    Hi Meir,
    >>Get last logon + user name
    Regarding this question, the following thread can be referred to for more information.
    How to display last login user account in active directory ?
    https://social.technet.microsoft.com/Forums/en-US/8609ce4d-b15f-447b-bc37-142021b9e00c/how-to-display-last-login-user-account-in-active-directory-?forum=winserverDS
    >>first on all where is the powershell forum ?
    Windows PowerShell
    https://social.technet.microsoft.com/Forums/Windows/en-US/home?forum=winserverpowershell
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • I want to get all the user name form LOGIN table ... how help me ?

    hi all
    I have table in MS Access databse called Login with two coulmn (User, Password),
    I want to get all the User Name in a string[] called USER,
    (LIKE USER = {"AA","BB","CC",........"zz"};)
    can anybody send me the code to get the USERNAMES form Login Table, i tried lots of way but bad luck
    so plz someone send me a code.
    Thanx
    Regards
    Satinder

    I made something like this as He pasted the the code above and u know this works for me atleast thanx
    kind regards
    satinderjit
    String User[] = new String[1000];
    try
    //Load Driver
    Class.forName(driver);
    // Make Connection
    connection=DriverManager.getConnection(url,user,password);
    // Create Statement
    statement = connection.createStatement();
    sql = "SELECT User FROM Login" ;
    // Create Resultset
    rs = statement.executeQuery(sql);
    int j=0;
    while(rs.next())
    User[j]= rs.getString("User");
    j=j+1;
    for(int i=0 ;i<J;i++)
    Form.C_Manager.addItem(User);
    statement.close();
    //rs.close();
    connection.close();
    catch(ClassNotFoundException cnfex) {
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Failed to load driver..."+
    "\n"+cnfex.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);
    catch(SQLException sqlex){
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Unable to connect to Database..."+
    "\n"+sqlex.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);
    catch(ArrayIndexOutOfBoundsException e){
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Unable to Load User Name..."+
    "\n"+e.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);

  • I want to get all the User Name in a string[ ], but How..... don't know

    hi all
    I have table in MS Access databse called Login with two coulmn (User, Password),
    I want to get all the User Name in a string[] called USER,
    (LIKE USER = {"AA","BB","CC",........"zz"};)
    can anybody send me the code to get the USERNAMES form Login Table, i tried lots of way but bad luck
    so plz someone send me a code.
    Thanx
    Regards
    Satinder

    Well, the biggest problem is that you don't know (probably) a head of time how many names are in the table.
    So i'd first stuff them into a managed array such as ArrayList
    So you'd
    (1) Iterate over the resultset
    (1.1) for each row call getString() on the user field
    (1.1) call add on the ArrayList to add the string
    (2) Call toArray on the ArrayList to convert it to a plain array
    (NOTE: you will have to pass a String[] {""} arg as a parm to
    toArray() to get the right type of array.)

  • Keep getting error message "user name or password for aol is incorrect". I have reset both username and password and still can't get my mail.  This problem only seems to exist in the evening.

    Keep getting error message "user name or password for aol is incorrect
    ". Have reset both and problem still exists.  Problem appears to be in the evening hours only.

    reset the password to re confirm that that isn't the issue

  • Iphone 4 "cannot get mail" as user name or password incorrect.

    I have an iphone 4 and it has stopped updating mail.  Three days ago I incorrectly typed in my mobile me password and had to reset it.  I have updated my mac account details for my mobile me account on my phone but I keep getting "cannot get mail" as user name or password for.mac account is incorrect.  Im not sure what to do and this is very frustrating as Im sure it is something very simple!  Any help gratefully appreciated. 

    Did you try to delete the MobileMe account on the phone and set it up again after that?
    You can also try to replace the account info on the phone during the next sync, if you select this option in the info pane, Advanced Section, with your phone connected to iTunes.

  • TS1398 Cannot get mail the user name or password for xtra.co .nz is incorrect

    Cannot get mail
    The user name or password  xtra.co.nz is incorrect

    Hello dkmorgan,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    Log in to your email provider's website to ensure that the account is active and the password is correct.
    Restart your iOS device.
    Delete the affected email account from your device.
    Tap Settings > Mail, Contacts, Calendars.
    Choose the affected email account, then tap Delete Account.
    Add your account again.
    Have a nice day,
    Mario

  • TS3899 Cannot get mail  the user name or password for Suddenlink is incorrect

    I have not once had an issue with this. I have not changed my password or anything. I have the iPhone 4. All of a sudden, the message error pops up that says " Cannot get Mail"  The User name or Password for Suddenlink is incorrect. Please help!!!!!!

    All customers should now have the ability to send and receive email through Suddenlink’s email service, and the vast majority should have full service, including access to all mail, folders, contacts, and settings. We will continue working until the remainder of customers have full email service restored. I'm very sorry for the inconvenience and thank you for your patience as we continue to work to restore full email service for all customers.

Maybe you are looking for