Urgent : How to get current user id

Hello,
fnd_global.user_id returns -1
fnd_profile.get('user_id',x_user_id) return null
can anyone help how to get current logged in user to apps.
Regards,
Dinesh.

Hi Dinesh,
You must also make sure you have initialised the app.
If you run this from sqlplus then it will return -1.
If however you run this from within a concurrent program then the user id will be returned.
Try using this from sqlplus fnd_global.apps_initialize
Eg.
begin
dbms_output.put_line(fnd_global.user_id);
fnd_global.apps_initialize(user_id => 3551,
resp_id => 1,
resp_appl_id => 1);
dbms_output.put_line(fnd_global.user_id);
end;
/

Similar Messages

  • How to get Current User Group NAME

    I am using the com.sun.security.auth.module.NTSystem to obtain information on the current user logged into the NT System. This class gives me the user name, all the group SIDs associated with the current user and also the current user's primary group SID.
    But I am not able to retrieve the group Name based on these SIDs.
    Please tell me how to find out the Group Name such as "Workgroup" etc. instead of Group SID.
    This is very urgent. So please help me.
    Thanks in advance!!!

    I'm having the same problem.
    If you found a solution could you post it here.
    Thanks.

  • How to get current user in Exchange 2007 OWA customization page?

    Hi,all
    I customize an ASPX page(smsconfig.aspx) in Exchange 2007 OWA( this file in ..\Exchange\ClientAccess\OWA\smsconfig.aspx, I don't modify registry.xml & web.config).
    My Exchange 2007 OWA has been configurated with Forms-Based Auth.
    https://mail.myexchange.com/owa/smsconfig.aspx The page works fine, but it cannot get current logon user with HttpContext.Current.User.Identity or
    UserContext.MailboxIdentity or UserContext.LogonIdentity
    <%@ Page language="c#" AutoEventWireup="false" Inherits="Microsoft.Exchange.Clients.Owa.Core.OwaPage" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Import namespace="Microsoft.Exchange.Clients"%>
    <%@ Import namespace="Microsoft.Exchange.Clients.Owa.Core"%>
    <%@ Import namespace="Microsoft.Exchange.Clients.Owa.Premium"%>
    <%@ Import Namespace="System" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Data.SqlClient" %>
    <%@ Import Namespace="System.Xml" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    <%@ Import Namespace="System.Text" %>
    <script runat="server">
    。。。(my codes in here)
    </script>
    thanks for your help.
    Your Passion.My Potential.

    Microsoft.Exchange.Clients.Owa.Core.OwaContext.Current.UserContext.LogonIdentity.PrimarySmtpAddress
    Высказанное мною здесь - мои личные взгляды, а не позиции корпорации Microsoft. Вся информация предоставляется "как есть" без каких-либо гарантий.

  • How to get Current User from edir C#

    Hi
    1) Using C# Ldap Library, How can I get the current logged in User name
    2) If I have a user name in the following format : User.Ou.Ou.O
    How can I convert that format into a DN and then find the user in
    the tree ?
    Thanks
    KaranMahant
    KaranMahant's Profile: http://forums.novell.com/member.php?userid=64239
    View this thread: http://forums.novell.com/showthread.php?t=386653

    KaranMahant;1857953 Wrote:
    > Hi
    >
    > 1) Using C# Ldap Library, How can I get the current logged in User name
    > ?
    >
    > You can use the 'getbinddn' extension facility to do this (in case you
    > use eDirectory as the server). Check the following sample:
    > http://forgeftp.novell.com/ldapcshar...s/GetBindDN.cs
    >
    > 2) If I have a user name in the following format : User.Ou.Ou.O
    > How can I convert that format into a DN and then find the user in
    > the tree ?
    >
    > There is no helper APIs available in the C# LDAP SDK to convert the
    > dotted format to ',' separated ones. If you are astarter, LDAP expects
    > the data to be in ',' separated format as:
    >
    > cn=user,ou=test,o=org.
    >
    > Thanks
    -WITH REGARDS,-
    *-Palaniappan N-*
    palaniappan1's Profile: http://forums.novell.com/member.php?userid=12325
    View this thread: http://forums.novell.com/showthread.php?t=386653

  • How to get current user for WS

    Hello
    I've created Web Service from Stateless Session Bean with Basic Authentification & Support Logon Ticket features.
    I need to determine current logged user in bean methods.
    UMFactory.getAuthenticator().getLoggedInUser() method requires Request & Response.
    WDClientUser.getCurrentUser() throws NullPointerException when i try call it.

    Hi Aliaksandr,
    try this,
    WDClientUser.forceLoggedInClientUser().getSAPUser().
    getUniqueName();
    In order to the User ID, you have to run your WD application in the Portal.
    Hope it helps,
    - Teecheu

  • How to get Current Log in BO user name in data access driver

    In universe, to get the current log in user is via @Variable('BOUSER').
    Right now, I need to be able to get the user name in the data access driver. I am writing a customized data access driver because we need to patch some where clause on the the query generated by the universe based on the logged-in user info. I only think of using end_sql parameter or adding an universe level filter to patch the @Variable('BOUSER') to the query, which would not work if user want to use customized query.
    Can anyone tell me how to get currentBO user name from connection server ? or how @Variable('BOUSER') is translated into the logged-in user name in the universe?

    Shweta,
    The link you provided was the Auditor guide for BO 6.x, I'm not sure it that is going to help Karen or not.
    Karen,
    There is function called connection
    (usage:  =connection([Query Name]), where [Query Name]
    denotes the name of the tab for the query under Edit Query)
    Here is some of the output from connection:
    4;ODBC18;MS SQL Server 2000166; VERSION=7; USER=xxxxx;
    PASSWORD=; DBTYPE=Relational; DATABASE=xxx_xxxx;
    ODBC_USER=xxxxxx; ODBC_PASSWORD=; BO_DSN=xxxx_xxxx;
    BO_DRV_CONNECT_MODE=0; 224; VERSION=6; Name=xxxxx; Shared=4;
    LoginTimeout=600; Timeout=600; Pool Time=60; Array Fetch Size=10;
    Array Bind Size=5; RecommendedLenTransfert=1000; Password_Encryption=x;
    AliasTable=; MeasureDimension=; Hint=; ConnectInit=; ArrayFetch=1;
    I'm not sure if this info helps out either, being that connection provides info on a post-processing basis and it sounds like you need to get out ahead of the SQL generation.  The @variable('bouser') would seem like the place to be, however, in allowing custom SQL to take place you loose the bouser due to an individual could customize the SQL to the point that it gets unwantingly yanked out.  The end_sql might be your answer...
    Thanks,
    John

  • How to get current logged-in user name in data access driver or in universe

    In universe, to get the current log in user is via @Variable('BOUSER').
    Right now, I need to be able to get the user name in the data access driver. I am writing a customized data access driver because we need to patch some where clause on the the query generated by the universe based on the logged-in user info. I only think of using end_sql parameter or adding an universe level filter to patch the @Variable('BOUSER') to the query, which would not work if user want to use customized query.
    Can anyone tell me how to get currentBO user name from connection server ? or how @Variable('BOUSER') is translated into the logged-in user name in the universe?

    I do not know your EJB Service. But you should pass the credentials of the current logged on portal user to your service. That's not by default I think.
    I had a similar problem with CAF developed webservices. I had to turn on permission checks in my web service and passed the credentials via logon ticket.
    Regards, Bernd

  • How to get Active users list in Essbase 6.5.6

    Hi Gurus,
    How to get Active users list in Essbase 6.5.6 version
    I dont find any Esscmd to find active users list....
    i used LISTLOGINS command in ESSCMD but its not helping me out....
    pls suggest me some approach to find active users list.
    Thanks in advance....

    Hi  ,
    Display sessions will give only active users details which are currently connected to the ESSBASE .
    if you need this list ? or  you need the  total list of   security  active users list ?
    if you need the currently connected to the ESSBASE
    if you check  one server  At a time  or you can check the application level also
    1)server level
    display  session all;
    2)application level
    display session on application  'application name ';
    go for the  run command ---> essmsh----->  login;----->enter user name ----> enter password----->enter host (like server name )  then you need to you   above  1 &2  commands
    Thanks,
    suresh

  • How to get current rowindex of clicked object in cr2008 preview control

    hi
    i want to get selected raw data when user click on crystal report 2008 preview control.
    i can achieve using following code for particular row no.
    Dim repReport as new ReportDocument
    repReport.Rows(RowIndex).Item(ColumnIndex)
    how to get current rowindex ? 
    Thanks
    Sanjiv Sharma

    Only way I can think of is to use the rowset controller from the InProc RAS SDK. Here is a snippet of a sample code on how to:
    //Load the report
    if (clientDoc != null) {
    //create metadata structure
    RowsetMetaData rowSetMetaData = new RowsetMetaData();  rowSetMetaData.setDataFields
    (clientDoc.getDataDefinition().getResultFields());
           Fields fields = rowSetMetaData.getDataFields();
           String colName,colTypeName;
           int colType, len;
           Field field;
           HashMap colNames = new HashMap();
           HashMap colTypes = new HashMap();
           for (int i = 0; i < fields.size(); i++) {
                   field = (Field) fields.get(i);
                   colName =field.getDisplayName(FieldDisplayNameType.description, Locale
    .ENGLISH);
                   colNames.put("COL"+i,colName);
           colType = getColTypeFromVariant(field.getType().toVariantTypeString());
           len=field.getLength();
                  //Placeholder
            //add column metadata to data structure or XML
            Object colValue;
            int rowCount=0;
            if (getMaxRows() != 0) {
                   RowsetCursor rowsetCursor = clientDoc.getRowsetController(). createCursor
    (null, rowSetMetaData);
                  //Setting the batch size to make sure that you get back all the
                  //rows by setting the batch size.
                        clientDoc.getRowsetController().setRowsetBatchSize (rowsetCursor
    .getRowset().getTotalRecordCount());
               //Getting the Results back starting from the first row
               RowsetCursor resultCursor = clientDoc.getRowsetController(). createCursor(null,
    rowSetMetaData);
               resultCursor.moveTo(0);
                  while (!resultCursor.isEOF()) {
                      for (int i = 0; i < fields.size(); i++) {
                               colName=(String)colNames.get("COL"+i);
                               colTypeName=(String)colTypes.get("COL"+i);
    colValue=record.getValue(i);
                                //Placeholder
    //add row data to data structure or XML
    resultCursor.moveNext();
    For more details, consult the Report Application Server .NET SDK Developer Guide
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to get Current row of ViewObject in the DoDML methode

    Hi all
    I have two ViewObject EmplyesView and DeptView
    How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesView

    OK, we can play this game on and on...
    I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
    So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
    Timo

  • How to get current IUser (com.sapportals.portal.security.usermanagement)

    Hi,
    does anybody know how to get IUser for the current user?
    I know how to get current IUser from com.sap.security.api package:
    IWDClientUser wdcu = WDClientUser.getCurrentUser();
    IUser sapUser = wdcu.getSAPUser();
    but I need to have IUser from com.sapportals.portal.security.usermanagement package.
    Regards,
    Ladislav

    Ladislav,
    Try this:
    Get the IUser uisng the API com.sap.security.api.IUser and store it in a variable, say <i>sapUser</i>.
    Then,
    // Convert the logged in user to old EP5 usermanagement API
    com.sapportals.portal.security.usermanagement.IUser user = null;
    try
         com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(sapUser);
    catch (UserManagementException e)
         e.printStackTrace();
    Bala

  • How to get current assigned participant id?

    Hi mates,
    This might be a basic questions, but useful for me :)
    How to get current assigned participant id from screenflow? Or How to pass it as an argument from interactive activity?
    Below is what I tried.
    Participant.id or Instance.participant.id - returns login user id
    Thanks

    Hi,
    Please correct me if I understood wrong.
    You want to know whether an instance is assigned or not and if assigned then you want to fetch the assigned participant id.
    If this is your requirement then please find the code below and make the necessary changes into it.
    Write the following code in screen flow automatic activity but before that you need to pass the instanceid as argument to the screen flow.
    In the process as well as screen flow layer make an instance variable instanceid as Int.
    Then make an argument variable instanceidArg as Int in both the screenflow and process layer and map accordingly so that it will take the instanceid from process layer to the screen flow layer.
    Assign instanceid = id.number; in process layer automatic activity but before the global interactive activity where you have maped the screen flow.
    Write the following code in screen flow automatic activity.
    logMessage("============= instanceid ==============" + instanceid); //instanceid is the id of the instance that you have passed from process layer.
    ProcessService ps;
    InstanceFilter instF = InstanceFilter();
    ps.connectTo(url : Fuego.Server.directoryURL, user : "<userid>", password : "<password>"); //In studio the userid and password will be same
    logMessage("Connected");
    instF.create(processService : ps);
    instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
    //<ProessId Name> is the id of the process where you want to know the assighed participant id
    instF.addAttributeTo(variable : VarDefinition.processid, comparator : Comparison.CONTAINS, value : "/" + "<ProessId>");
    instF.addAttributeTo(variable : VarDefinition.INSTANCE_NUMBER, comparator : Comparison.IS, value : Int(instanceid));
    Fuego.Papi.Instance[] instances = getInstancesByFilter(ps, filter : instF);
    foreach (instance in instances) {
    logMessage("Assigned ?: " + instance.participantId.empty);
    logMessage("instance.participantId: " + instance.participantId);
    ps.disconnectFrom();
    Bibhu

  • How to get all users under an organizations?

    Hello everyone.
    Just want to know if anyone knows how to get all users under a particular organization.
    From the Search User form, I found they may kind of user such attribute conditions:
    MemberObjectGroup
    is in
    XXXX(organization)
    But unfortunately, the "is in" is not a valid AttributeConditionOperator, so besides using "recursive" self-written function, anyone knows any possible buit-in trick?

    Here is my solution:
    <Rule'>
        <RuleArgument name='organization'/>
        <RuleArgument name='context'/>
        <block>
            <defvar name='orgs'>
                <new class='java.util.ArrayList'/>
            </defvar>
            <invoke name='getChildObjectGroupNames'>
                <invoke name='getObject' class='com.waveset.ui.FormUtil'>
                    <ref>context</ref>
                    <s>ObjectGroup</s>
                    <ref>organization</ref>
                </invoke>
                <ref>orgs</ref>
            </invoke>
            <append name='orgs'>
                <ref>organization</ref>
            </append>
            <invoke name='getUsers' class='com.waveset.ui.FormUtil'>
                <ref>context</ref>
                <map>
                    <s>conditions</s>
                    <list>
                        <new class='com.waveset.object.AttributeCondition'>
                            <s>MemberObjectGroups</s>
                            <s>in</s>
                            <ref>orgs</ref>
                        </new>
                    </list>
                </map>
            </invoke>
        </block>
        <MemberObjectGroups>
            <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
        </MemberObjectGroups>
    </Rule>

  • How to get current view name on clicking device back button?

    Hi,
    iam wriing a function for handling device back button(in android) press in my app.controller.js .How to get current viewname when clicking device back button.
    code samples will be helpful.
    my app.controller.js looks like below
    sap.ui.controller("com.opensap.App", {
      onInit : function() {
      document.addEventListener("deviceready", onDeviceReady, false);
      onBeforeShow : function(evt) {
      navButtonTap : function(evt) { 
    function onBackKeyDown(){
      //alert("hai");
      //sap.ui.getCore().byId("SalesDetail").app.backToPage("ProductList");
      //sap.ui.getCore().byId("ProductList").app.backToPage("Dashboard");
      //sap.ui.getCore().byId("SupplierDetail").app.backToPage("Dashboard");
    function onDeviceReady(){
       document.addEventListener("backbutton", onBackKeyDown, false);

    I somehow managed to find the solution
    function onBackKeyDown(){
      var app = sap.ui.getCore().byId("LoginDetail").app;
      app.back();

  • How to get current row data in table control

    Hi , expert ,
       I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
    I  have a question in UI
    How to get current row data and click pushbutton  in table control  to open next screen ?
    I want to get the current data and open next screen to carry out detail detail .
    Thansk for all your suggestion .

    GET CURSOR LINE SY-CUROW .
      READ TABLE internal_table index SY-CUROW.

Maybe you are looking for

  • How do I delete photos from my ipad that have been imported directly from a memory card.

      I have searched loads of forums and they all talk about using itunes to delete photos, but this seems to only apply to photos that orginated from a PC. The photos I am trying to delete were loaded directly on to my ipad from a memory card and don't

  • Getting " Not enough memory for the operation error " in BOE

    Hi, We are using BOE 11.0. we try to schedule a new report with multiple database logins for testing in BOE. When we run the report we are getting error like "Not enough memory for the operation error" The same report has been executed successfully w

  • Acrobat 9.1.1 crashes repeatedly

    I use Acrobat Professional all day long to generate and view PDF documents. I never had a single problem with version 8. I recently installed Acrobat Professional version 9 which updated itself to version 9.1 during the installation. While it works o

  • No actions for document sets in SharePoint Designer

    Hi, I am an SharePoint Online user and I want to create a workflow that copies/moves a document set from one library to an other library/repository. The problem is, that I don't have any actions concerning document sets in my SharePoint Designer. The

  • Question on EJB, JNDI and client jars

    Hi, This is a very fundamental question on EJBs and their clients - what all should go into the client jar of an ejb? I know for sure that just the remote and home interface classes of the ejb are sufficient on the client's classpath to work with an