RTMF apis to retrieve logged in users in portal

Hi Experts
Can anyone tell me if there is any RTC api available that can be used in webdynpro java to fectch the list of logged in users in the portal.
Also if the apis are not available in webdynpro java, can these be used in portal components?
Thanks
Siva

Hi,
You should read the wiki : [List of logged on users in the Portal |http://wiki.sdn.sap.com/wiki/display/Snippets/Listofloggedonusersinthe+Portal]
Regards,
Pierre

Similar Messages

  • Retrieve log on user's name in class SimpleUICommand

    Hi everyone, I would like to retrieve current log on user name in the method execute(IScreenflowData sfd) in class SimpleUICommand, found at https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/Implementing%20Flexible%20UI%20One-Step-Screenflow.article.
    Since there is no request to work with so I tried the following code
    try {
      String userName = AccessContextFactory.getInstance().getContext().getUser().getEmail();
    catch (ContextUnavailableException e)
      PortalRuntime.getLogger().severe("ContextUnavailableException");
       e.printStackTrace();
    But I got ContextUnavailableException in the log.
    How can I retrieve log on user name in this case? Is it a general method to do this in case there is no request ?
    Thanks for reply.
    Best regards.
    Wang

    Hi Wang,
    without having tested it, it seems that the framework calls <i>setTargetParameters</i> (hopefully before <i>execute(IScreenflowData sfd)</i> is called). If this is the case, you'll have the IResourceContext at hand. From this you can retrieve the user.
    Hope it helps
    Detlev

  • Help required on Brodcast messages to logged on users in Portal- Weblogs

    Hi All
    The link to the weblog is
    Brodcast messages to logged on users in Portal(Part1)
    My doubts is
    1) Whenever user refreshes his/her page the popup gets displayed.
    User might get irritated everytime he will referesh the page.
    2) When does the data stored in container destroys?
    Please comment
    Points will be rewarded.
    Regards
    Sonal Mangla

    Hi Sonal,
    Did you find a solution yet ?
    I'm also interested.
    Regards,
    H. Cakir

  • How to see the logged in user on the portal EP6 SP2

    Hi All,
    I am using EP6.0 SP2 Patch 5.I want to know that which users are logged on.Can I see the user id of the logged in user inthe portal.
    Any suggestions.
    Paritosh

    Hi Paritosh,
    I think SAP Note 762004 should answer your question!
    Best regards,
    Robert

  • OIM11gr2 - How to get currently logged in user details using oim api

    Hi All,
    I have a requirement to retrieve currently logged in users profile in the process adapter.
    I have tried with getSelfProfile in tcUserOperation and also ContextManager.getOIMUser API's however, in both the cases i am getting xelsysadm details only.
    Also as know request details in Process task mapping doesnot work for OIM11g onwards (its returning column not found exception )
    DOes any one has idea how to achieve this.
    PS. - i am using platform to retrieve API's.
    Thanks & Regards
    Swati Pandey

    You can get the logged in user name using the below java code:
    ADFContext adfCtx = ADFContext.getCurrent();
    SecurityContext secCntx = adfCtx.getSecurityContext();
    String user = secCntx.getUserPrincipal().getName();
    HTH

  • Logged in user ID retrieval irrespective of UME?

    Hi,
    I have found below code which can retrieve currently logged in user and it's working fine.  Reading the code I assume this will only work if the user datasource is ABAP, will the below code work if we change to LDAP as user datasource?  If not, is there a generic coding which can be used to retrieve logged in userid irrespective of user datasource?  We are currently using ABAP as datasource, but we will be moving to LDAP soon, so I'm writing a WD app which needs to work in both situation.
    String strUserName = null;
         try {
              IWDClientUser wdClientUser = WDClientUser.getCurrentUser();          
              IUser sapUser = wdClientUser..getSAPUser();
              if (sapUser != null) {
                   IUserAccount[] acct = sapUser.getUserAccounts();
                   if (acct[0] != null) {
                        strUserName = acct[0].getDisplayName();
         } catch (WDUMException e) {
              e.printStackTrace();
         } catch (UMException e) {
              e.printStackTrace();
         return(strUserName);
    Thanks
    Praveen

    I found this WIKI and thread
    retriving user details from user rofile in portal database
    /people/sap.user72/blog/2005/06/05/user-management-api-in-webdynpro
    Which says that below code
    IUser iUser = user.getSAPUser();
    getSAPUser() method, though it says SAP User it's not direct retireval from ABAP, it's from SAP Web App Server user which could be any datasource (R/3, LDAP, Portal UME). 
    If you read in the blog right at the bottom in the user comments sections you will find clarification on getSAPUser and portal user.  This answers my question that I can use user.getSAPUser() method irrespective of user datasource(r/3, LDAP, UME).
    If my understanding is wrong please advise.  I'm marking this thread answered.
    Thanks
    Praveen
    Edited by: Praveen11 on Oct 16, 2009 3:14 AM

  • How to retrieve the username of the logged in user

    Hi, I've been looking for a possibility retrieve some user data like the username of the currently logged in user since yesterday but could not find anything proper. I'm relatively new to APEX. Could someone perhaps point me to an easy-to-understand document? I would be glad if it would also cover the basic of authentication and authorization schemes.

    Hi, thanks for your reply. I've already changed my handle but the system said that it would take about one hour for the change to be done.
    Actually I have the following situation. I have a table that associates IDs to names. The names are the same as the user names of the users in APEX. On an APEX-Page I have a select-box that lists all available IDs. What I want to do is to automatically pre-select the ID of the currently logged in user. So I have created an authentication scheme as described in the help using following options:
    Based on a pre-configured scheme from the gallery > Show Login Page and Use Application Express Account Credentials
    And then I made the new authentication scheme the application's current scheme. Then I went to the page definition and created a new process, selecting "On Load - After Regions" as "Process Point", and entered the following source:
    declare
    nID number;
    begin
    :P2_TEMP := :APP_USER; -- this is just for debug purposes
    select b.ID into nID from MYTABLE b where b.NAME = :APP_USER;
    :P2_ID := nID;
    exception
    when others then
    null;
    end;
    But it doesn't work. Since the text field P2_TEMP stays empty I believe I am doing something wrong with APP_USER. Anybody who can help me with that?
    Edited by: user10977071 on 05.04.2009 08:57

  • Retrieving information about the logged in user in Power BI for O365

    I am trying to retrieve the email of the current logged in user so i can pass it into a query to my sql server which then adjusts the data based on who is viewing a power bi dashboard. If anyone knows a way to grab that information or even the url that
    the file has, then i can parse out its location and change my data based on that as well.

    Currently row level security is not supported in Power BI.
    Thanks,
    Sagar K 
    (Blog: http://datamazik.blogspot.in/)

  • An error occurred during olap API metadata retrieval. This is probably caus

    this is what i have done so far. i really nead some help asap!!!
    1. Install Oracle 9i Release 2 (9.2.0.1) Enterprise Edition with the General purpose database configuration (Data warehouse works as well). At the end of the installation I chose the password management button to change passwords for the few necessary accounts: SYS, SYSTEM, OLAPSYS, SH.
    2. Download the p3948480_9206_WINNT.zip from metalink, the 9.2.0.6 patchset
    3. Shut down any existing Oracle9i database instances with normal or immediate priority. Stop all listener and other services running in the Oracle home directory where you want to install the patch set.
    4. unzip the content of thepatch to a temp directory
    5. start setup.exe under the temp directory (it will start the Oracle Universal installer 10.1.0.3)
    6. install the patchset to your Oracle home, selecting the source in the temp_dir\stage\products.jar file
    7. review carefully the post-installation tasks for the patchset:
    Review the following sections before upgrading a database (quote from the patchset html readme):
    8.2.1.1If JServer is part of the installation ensure that there is at least 10 MB of free space allocated to the SYSTEM tablespace.
    8.2.1.2 Check XDB Tablespace Size
    For RAC installations, ensure that there is at least 50 MB of free space allocated to the XDB tablespace.
    8.2.1.3 Set the SHARED_POOL_SIZE and JAVA_POOL_SIZE Initialization Parameters
    Set the value of the SHARED_POOL_SIZE and the JAVA_POOL_SIZE initialization parameters as follows:
    Start the database:
    SQL> STARTUP
    If necessary, enter the following command to determine whether the system uses an initialization parameter file (initsid.ora) or a server parameter file (spfiledbname.ora):
    SQL> SHOW PARAMETER PFILE;
    This command displays the name and location of the server parameter file or the initialization parameter file.
    Determine the current values of these parameters:
    SQL> SHOW PARAMETER SHARED_POOL_SIZE
    SQL> SHOW PARAMETER JAVA_POOL_SIZE
    If the system is using a server parameter file:
    If necessary, set the value of the SHARED_POOL_SIZE initialization parameter to at least 150 MB:
    SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='150M' SCOPE=spfile;
    If necessary, set the value of the JAVA_POOL_SIZE initialization parameter to at least 150 MB:
    SQL> ALTER SYSTEM SET JAVA_POOL_SIZE='150M' SCOPE=spfile;
    If the system uses an initialization parameter file, if necessary, change the values of the SHARED_POOL_SIZE and the JAVA_POOL_SIZE initialization parameters to at least 150 MB in the initialization parameter file (initsid.ora).
    Shut down the database:
    SQL> SHUTDOWN
    8.2.2 Upgrade the Database
    After you install the patch set, you must complete the following steps on every database associated with the upgraded Oracle home:
    Log on as a member of the Administrators group to the computer where the Oracle components are installed.
    Use SQL*Plus to login to the database as the SYS user with SYSDBA privileges:
    sqlplus /NOLOG
    CONNECT SYS/password AS SYSDBA
    Enter the following SQL*Plus commands:
    SQL> STARTUP MIGRATE
    SQL> SPOOL patch.log
    SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catpatch.sql
    SQL> SPOOL OFF
    Restart the database:
    SQL> SHUTDOWN
    SQL> STARTUP
    Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
    SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp.sql
    12. Install JDeveloper 9.0.4 (download it from OTN and just unzip it in a directory ... it doesn't require an oracle home)
    13. Install BI Beans 9.0.4 (download it from OTN as well), run the setup.exe that comes with it and in the destination oracle home select the directory where you installed JDeveloper and give an oracle home name to it)
    14. Install the BIBDEMO schema:
    Create a directory on the computer that is running the Oracle9i database. This install_home directory is the location to which you will upload the data files that are required to build the BIBDEMO schema.
    On the computer where BI Beans is installed, locate the bibeans_home\bibdemo_schema folder (where bibeans_home is the root folder of your BI Beans installation). Copy all of the files found in this folder to the install_home folder on your server machine.
    Open a DOS prompt and navigate to the install_home folder.
    Run bibdemo.bat to install the schema, using the following syntax:
    bibdemo.bat <path to Oracle database files >
    For example, for an instance named my9iService, enter the following:
    bibdemo.bat D:\OraHome1\oradata\my9iService
    You are prompted for the password for the sys as sysdba user.
    The script takes approximately 15 minutes to run, depending on the machine specifications. It is normal to see some error messages while the script is running. In addition, when materialized views are being created in the database, the script will appear to stop; this is also normal. A clear message will tell you when the script has completed.
    The log files (*.log) that are generated by the installation script are stored in the folder from which you ran the script.
    Here's what
    bi_checkconfig.bat -h ana -po 1521 -sid proiect -u bibdemo -p bibdemo -q
    returned:
    BI Beans Diagnostics(v1.0.2.0) 2/28/05
    ===============================================================================
    JDEV_ORACLE_HOME .......................... = E:\OraDS
    JAVA_HOME ................................. = E:\OraDS\jdk
    JDeveloper version ........................ = 9.0.4.1.1.1436
    BI Beans release description .............. = BI Beans 9.0.4 Production Release
    BI Beans component number ................. = 9.0.4.23.0
    BI Beans internal version ................. = 2.7.5.32
    Connect to database ....................... = Successful
    JDBC driver version ....................... = 9.2.0.4.0
    JDBC JAR file location .................... = E:\OraDS\jdev\lib\patches
    Database version .......................... = 9.2.0.6.0
    OLAP Catalog version ...................... = 9.2.0.1.0
    OLAP AW Engine version .................... = 9.2.0.1.0
    OLAP API Server version ................... = 9.2.0.1.0
    BI Beans Catalog version .................. = N/A; not installed in bibdemo
    OLAP API JAR file version ................. = 9.2
    OLAP API JAR file location ................ = E:\OraDS\jdev\lib\ext
    Load OLAP API metadata .................... = Successful
    Number of metadata folders ................ = 2
    Number of metadata measures ............... = 12
    Number of metadata dimensions ............. = 8
    Testing sample query for measures and dimensions
    (S=Schema, C=Cube, M=Measure, D=Dimension)
    1/21) Measure Budget ................... = Successful
    S=BIBDEMO, C=BIBDEMO_BUDGET_CUBE, M=BUDGET
    2/21) Measure Actual ................... = Successful
    S=BIBDEMO, C=BIBDEMO_ACTUAL_CUBE, M=ACTUAL
    3/21) Measure Close Price .............. = Successful
    S=BIBDEMO, C=BIBDEMO_STKPRICE_CUBE, M=STKPRICE_CLOSE
    4/21) Measure Open Price ............... = Successful
    S=BIBDEMO, C=BIBDEMO_STKPRICE_CUBE, M=STKPRICE_OPEN
    5/21) Measure Low Price ................ = Successful
    S=BIBDEMO, C=BIBDEMO_STKPRICE_CUBE, M=STKPRICE_LOW
    6/21) Measure High Price ............... = Successful
    S=BIBDEMO, C=BIBDEMO_STKPRICE_CUBE, M=STKPRICE_HIGH
    7/21) Measure Stock Volume ............. = Successful
    S=BIBDEMO, C=BIBDEMO_STKPRICE_CUBE, M=STKPRICE_VOLUME
    8/21) Dimension Division ............... = Successful
    S=BIBDEMO, D=DIVISION
    9/21) Dimension Line Items ............. = Successful
    S=BIBDEMO, D=LINE
    10/21) Dimension Time ................... = Successful
    S=BIBDEMO, D=TIME
    11/21) Dimension Day .................... = Successful
    S=BIBDEMO, D=DAY
    12/21) Dimension Stock .................. = Successful
    S=BIBDEMO, D=STOCK
    13/21) Measure Costs .................... = Successful
    S=BIBDEMO, C=ANALYTIC_CUBE, M=F.COSTS
    14/21) Measure Promotion ................ = Successful
    S=BIBDEMO, C=ANALYTIC_CUBE, M=F.PROMO
    15/21) Measure Quota .................... = Successful
    S=BIBDEMO, C=ANALYTIC_CUBE, M=F.QUOTA
    16/21) Measure Units .................... = Successful
    S=BIBDEMO, C=ANALYTIC_CUBE, M=F.UNITS
    17/21) Measure Sales .................... = Successful
    S=BIBDEMO, C=ANALYTIC_CUBE, M=F.SALES
    18/21) Dimension Channel ................ = Successful
    S=BIBDEMO, D=CHANNEL
    19/21) Dimension Geography .............. = Successful
    S=BIBDEMO, D=GEOGRAPHY
    20/21) Dimension Product ................ = Successful
    S=BIBDEMO, D=PRODUCT
    21/21) Dimension Time ................... = Successful
    S=BIBDEMO, D=TIME
    Metadata output location .................. = E:\OraDS\bibeans\bi_checkconfig\bi
    _metadata.txt
    To interpret this output, see the "Displaying Information about your Oracle9i Bu
    siness Intelligence Beans Client Configuration" technical note, whose file name
    is bi_checkconfig_tn.html
    These diagnostics are captured in: E:\OraDS\bibeans\bi_checkconfig\bi_checkconfi
    g.xml
    now: i have created some new stuff:
    1). user ana with roles:
    -dba
    -olap_dba
    -connect
    -resource
    (same roles as bibdemo)
    2).schema ana; tablespace ana (permanent), tablespace anatemp (temporary)
    3).i have created some relational tables and i have inserted some data in them:
    agent, aparat (cofee machines), beneficiar (clients), locatii (city), raport (REPORT), timp (time), tipaparat (types of cofee machines), tipbautura (products : types of cofee made by all the cofee machines), zone (state)
    4). one fact table with:
    - sold cantity (measure)
    - id_bautura (id_product) primary key
    - id_timp(id_time) primary key
    - id_beneficiar (id_client) primary key
    - id_agent primary key
    - id_locatie (id_city) primary key
    - id_aparat (id_cofee_machine)primary key
    i have inserted some data also
    5).dimensions:
    AGENT_DIM :levels: codag(id_agent), numeag (agent name), telefag (agent phone number)from relational table agent
    BENEFICIAR_DIM :levels: codben (id_client), denumire (client name), adresa (adress) ,codl (id_city) etc from relatinal table beneficiar (clients)
    TIMP_DIM :levels: id, year, month from relational table timp (time)
    TIPBAUTURA_DIM :levels: codbautura (id_product), numebautura (product name)from relational table tipbautura (products)
    ZONA_DIM :levels: codzona (id state), numezona (state name), codoras (id city), numeoras (city name) with ierarhy id_state---id_city FROM 2 RELATINAL TABLES CITY AND STATE!!!!!!!! AM I ALOUD TO DO THAT?????
    DO I NEED TO CREATE A DIMENSION FROM ONLY ONE TABLE???????
    APARAT_DIM :LEVELS: codben (id client), codtip (id machine type), denumireap (machine type name), matricolap ((machine id) (FROM 2 RELATIONAL TABLES ALSO!!!!!!! FROM TYPES OF COFEE MACHINES AND COFEE MACHINES!!!!!
    6). I HAVE NOW CREATED THE CUBE FROM THE FACT TABLE AND WITH ALL THE DIMENSIONS
    7). summary advisor wizard NOT WORKING! IT NEVER STOPS!
    8). I HAVE CREATED ALSO ONE materialized view FOR THE CUBE
    IF I COMPILE IT... NO ERRORS
    9). CUBE VIEWER NOT WORKING!!!!!!! IT ONLY APEARS A BELL!!!
    NOW IF I RUN BI_CHECK CONFIG ON ANA AND ALSO ON BIBDEMO!!!!!!!!!!!!
    IT SAYS:
    1) An error occurred during olap API metadata retrieval. This is probably caused by inconsistent metadata.
    ============================================================================
    oracle.express.ExpressServerExceptionError class: Unknown Error
    Server error descriptions:
    INI: System failure, Generic at TxsOqConnection::getDefaultDatabase
    at oracle.express.olapi.data.full.ExpressDataProvider.getMetadataProviderInterface(ExpressDataProvider.java:1003)
    at oracle.olapi.metadata.MetadataFetcher.initialize(MetadataFetcher.java:73)
    at oracle.olapi.metadata.MetadataFetcher.<init>(MetadataFetcher.java:45)
    at oracle.olapi.metadata.BaseMetadataProvider.<init>(BaseMetadataProvider.java:47)
    at oracle.olapi.metadata.mdm.MdmMetadataProvider.<init>(MdmMetadataProvider.java:130)
    at oracle.express.olapi.data.full.ExpressDataProvider.getDefaultMetadataProvider(ExpressDataProvider.java:964)
    at oracle.dss.metadataManager.server.drivers.mdm._92.MDMMetadataDriverImpl_92.getMdmMetadataProvider(MDMMetadataDriverImpl_92.java:1133)
    at oracle.dss.metadataManager.server.drivers.mdm._92.MDMMetadataDriverImpl_92.attach(MDMMetadataDriverImpl_92.java:810)
    at oracle.dss.metadataManager.server.drivers.mdm.MDMMetadataDriverImpl.attach(MDMMetadataDriverImpl.java:125)
    at oracle.dss.metadataManager.server.MetadataManagerImpl.buildObjectModel(MetadataManagerImpl.java:1092)
    at oracle.dss.metadataManager.server.MetadataManagerImpl.attach(MetadataManagerImpl.java:969)
    at oracle.dss.metadataManager.client.MetadataManager.attach(MetadataManager.java:876)
    at oracle.dss.metadataManager.client.MetadataManager.attach(MetadataManager.java:799)
    at BICheckConfig.checkConnection(BICheckConfig.java:277)
    at BICheckConfig.main(BICheckConfig.java:1348)
    I TRYED ALSO WITH USER ANA WITH ROLES:
    - DBA
    - CONNECT
    -RESOURCE
    - OLAP_USER
    NOT WORKING! AND ALSO BIBDEMO NOT WORKING!
    WHAT AM I MISSING? SHOULD I USE AW MANAGER? OR DO I NEED TO CREATE AN AMNALITIC WORKSPACE???
    WHAT ARE THE STEPS TO CREATE A GOOD METADATA????

    Hi,
    The issue here is if the whole catalog is corrupt or just one schema. So to try and determine the status of the catalog I would try:
    1) Using OEM remove all the objects you created
    2) I presume you created your database using the Database Configuration Assistant? You should have used the warehouse template
    3) Make sure the following accounts are unlocked and also not expired : SH, OLAPSYS
    4) Make sure the password for the SH schema is SH
    5) Make sure the password for the OLAPSYS account is manager
    6) Install the BIBDEMO schema that is shipped with BI Beans. This in the jdev_home/bibeans/bibdemo_schema
    The installation process will remove SH schema from the OLAP catalog.
    7)Once this is installed use JDeveloper to see if you can create a crosstab or graph.
    8) If the BIBDEMO schema works try creating your new schemas one at a time.
    9) Make sure the if you define the a dimension as type time it has END_DATE (column type DATE) and TIME_SPAN (column type number) defined. Otherwise don't define the dimension as type time.
    Hope this helps
    Keith Laker
    Product Manager
    Oracle Business Intelligence Beans

  • Read logged in user-works in Delphi7 but not in Delphi 2010

    Hi all
    I have some code I wrote a while back in Delphi 7 - simple program to read a currently logged in user IDs, read available class definitions, read some user attributes - relatively simple stuff. I am now trying to move to Delphi 2010 and the very same code that works on Delphi 7 does NOT work on Delphi 2010. The code was updated to compile and run on Delphi 2010, so it executes with no errors.
    I am using NWDSWhoAmI to get the currently logged in user name and NWDSRead to retrieve user attribute values. On Delphi 7, the code works, all API return "Success" and return correct values. In Delphi 2010, all APIs return "Success" but the code act as if I am not logged in - the username returned is "[Public]" and when I try reading attribute values I get $8884 - RESOLVE SVC FAILED (also may mean I am not authenticated to the NDS tree).
    The environment is XP and Novell Client 4.91 on the workstation, NW6.5 on the server (one sever tree). The code runs under the currently logged in user with full admin rights in the tree and Novell Client configuration on both workstations is identical. Any ideas on how to resolve this would be greatly appreciated.
    Thanks
    Vlad

    Vlad,
    since both Delphi versions go through the same DLLs it must be a difference
    in the code - possibly different variable implementation as 16/32 bit or
    signed/unsigned vars
    It is good practice to use the NWLibrary defined variable types instead of
    native Delphi types.
    I have successfully used the same sources in Delphi 4, 5, 6, and 2010
    Try my old samples:
    http://support.novell.com/techcenter...a20020203.html and my Delphi
    version independent Delphi libraries
    http://developer.novell.com/wiki/index.php/Delphi-units
    Wolfgang
    "vladh" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hi all
    > I have some code I wrote a while back in Delphi 7 - simple program to
    > read a currently logged in user IDs, read available class definitions,
    > read some user attributes - relatively simple stuff. I am now trying to
    > move to Delphi 2010 and the very same code that works on Delphi 7 does
    > NOT work on Delphi 2010. The code was updated to compile and run on
    > Delphi 2010, so it executes with no errors.
    > I am using NWDSWhoAmI to get the currently logged in user name and
    > NWDSRead to retrieve user attribute values. On Delphi 7, the code works,
    > all API return "Success" and return correct values. In Delphi 2010, all
    > APIs return "Success" but the code act as if I am not logged in - the
    > username returned is "[Public]" and when I try reading attribute values
    > I get $8884 - RESOLVE SVC FAILED (also may mean I am not authenticated
    > to the NDS tree).
    > The environment is XP and Novell Client 4.91 on the workstation, NW6.5
    > on the server (one sever tree). The code runs under the currently logged
    > in user with full admin rights in the tree and Novell Client
    > configuration on both workstations is identical. Any ideas on how to
    > resolve this would be greatly appreciated.
    > Thanks
    > Vlad
    >
    >
    > --
    > vladh
    > ------------------------------------------------------------------------
    > vladh's Profile: http://forums.novell.com/member.php?userid=84546
    > View this thread: http://forums.novell.com/showthread.php?t=422167
    >

  • Passing customer id(logged in user)  to BAPI

    Hi,
    I am creating a sales order application where in i have to pass the user id (customer  logged in through portal) .
    I have made the MODEL RFC as ticket, and meta data as user id password where i have passed the service user and password.
    Now my problem is that there will be 'N' customer ids in Portal but we are not creating any customer ids in SAP ECC. We are planning to pass the user id of portal logged in user to ECC (which will be customer id) and get the data based on the customer id passed.
    Question is how do i pass customer id to BAPI, ? Do i have to make the MODEL JCO as user/password or ticket should be fine as i am getting information for only customer logged in Portal ?
    How and where do i write the the following piece of code ? Should it be in wdDo init() or in the execute method of Controller ?
    try{
    IUser user = WDClientUser.getLoggedInClientUser().getSAPUser();
    IUserAccount[] acct = user.getUserAccounts();
    if(acct[0] != null)
    String strUserid = acct[0].getLogonUid();
    customer=strUserid.substring(0,strUserid.indexOf("."));
    if(customer.equalsIgnoreCase(customer))
    wdContext.currentYOURRFC_InputElement().setCustomer(customer);
    }catch(Exception ex)
    ex.getMessage();
    Should the above code be in the component controller before i execute the BAPI ?
    your help is appreciated.
    Regards
    PN

    Hi Portal Newbie,
    Your tickets and userid/password works as following:
    Tickets: When u select SAP logon ticket (SLT), EP generates a ticket with the user id of the logged in user, attached to the ticket. Now when it reaches R/3 it will check for the same user id. If no such user id is exits it will throw an error. To over come this u can define a reference system where u can do the user mapping.
    UIDPD: When u select this option u have to manually enter the user id and password in JCo. So when a EP user logs in the UID and password mentioned in JCo will be passed, not the EP user id, and R/3 will look for that user and execute the BAPI. And i guess u dont want that.
    Solution:
    As far as i have understood u dont want the same number of users in EP and R/3, (might be a licensing issue) and want only a few user IDs in R/3.
    1. Select UIDPD in JCo, and in your BAPI add another field like "user_id" through which u can send the user id to R/3 and execute a query which shall return the value corresponding to that particular user. [issue: there is a limit to the JCo connections created for a user.] Also there is an api to handle JCo connection in webdynpro. There u can set the user id, password and client number. But here also the user id that you set should be present in R/3.
    2. Select SLT in JCo and configure a reference system. You have to perform user mapping for every user. Now when a user logs in the ticket will contain the user id of EP and also the one u have mapped, ie the R/3 user. Make sure the R/3 user id exists in R/3. Now the sy-unam in BAPI will contain the R/3 user id. I guess there is an option to retrieve the EP user id from the ticket, but im not sure.
    In your kind of scenario its always recommended to have same number of user ids in EP and R/3. If user names are same then there is no need to configure reference system.
    Regards,
    Piyush.
    ps: reference system is just a system that we create in EP but in UME settings we have to specify this system as the reference system.

  • Sharepoint 2013 delivers documents through IIS too good! Need to restrict by logged in user

    I have a Sharepoint 2013 app that lets external users (https://) pull data from SQL to create links on the page that the user can click on to get documents to pop-up in the browser so they can view/save them.  The page sends the user's ID as a parameter
    and the stored proc uses that to return only the documents that user is allowed to see.  Took forever to figure out... looks great... my employer is going to be impressed and save money... yada, yada yada!  Problem is:  If you knew the name
    of a directory on the mapped location and knew the filename (somehow), and you had a login that got you to the site, you could successfully put that address in your address bar and the document would come up!  That's a bad thing!  I need to only
    let users see documents they have access to.
    I have been playing with the app pool settings and advanced settings for the sub-site, but it still lets me pull items that the logged-in user doesn't have permissions on the server to get to.  I haven't been able to prove it, but I suspect that IIS
    is sending another login credential to the directory to retrieve the file... something like "admin" or something that can have wider access.
    Here is my setup:  I have a directory on another server that is mapped to the Sharepoint Server box.  I have a Virtual Directory that points to that mapped drive.  My Sharepoint Page is on a site of its own and is called with the URL "https://reportcenter.<company
    name>.com".  There is only one page on the site.  When the page opens it provides links to documents on the Virtual Directory.  When you click on any of them the files appear in the browser just fine.  Sharepoint is running on a
    Windows 2012 R2 Standard OS.  The test user I am using is "Client1" and they are a member of the "SP_Clients" group which is not a member of anything else in Active Directory.  In the file directory I went to the Share list and
    made sure my test user and the SP_Clients group is not in the list... if the system tried to use Client1 there is no way they should get access.
    Any thoughts on what I can do to stop Clients from getting to files they shouldn't be?

    Thank you for your question and reply.
    No, the identity is not passed as a URL property.  The way it works is that SP verifies the user and sends them to the default page after they sign-in.  Once there, the page evaluates the UserID value and that values is passed to a stored procedure
    as a parameter.  The user can't get to the page unless they are verified by SP, they can't somehow go around this. 
    Now, once the page loads they click on one of files they wish to see (a link on the page that was created from the results of the stored procedure call).  The link points to a virtual directory setup in IIS that points to a mapped drive where the files
    are located.  The security on the files is set on the directories in their actual location.  I just need SP to pass the user's ID to the file directory and check the sharing rights on the file to see if this user has rights to get it.  It seems
    like SP is passing some other credential (probably SP_Admin, or Admin or something) which has the ability to read the file and therefore pass it back to the screen.
    I can't put the documents in SharePoint... they have to be in a file directory. The reason is that we have an elaborate program that runs every month to create these files and places them in the correct directories.  Somehow changing that application
    to create the files and place them programmatically in a SharePoint directory is beyond the scope of the project.  Under the circumstances, it would be much simpler to just provide the user a list of the documents they have access to and have them click
    on a link on a page and have the document appear in their browser.  Everything actually works, but I just have this last piece where SP is not 'telling' the file directory the UserID of the logged in user and therefore all the documents are available.
    All that needs to be done, is to make sure the userID is passed to the file directory so it can be checked against the security there to see if the user can have the file or not.
    I hope that makes sense.  I look forward to hearing back from you with your thoughts on this and how this can be accomplished.
    Thanks,
    Scott

  • How many users have logged in the Enterprise portal

    Hello Expert,
    Please suggest..
    Feature required to monitor as how many users have logged in the Enterprise portal 7.0(Portal is Implemented with MDM), so that utilization can be known.
    Regards,
    Vidhanshi

    Hi,
    You can wirte the following code to get the logged in user's ID
    try {
          IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
          IUser sapUser = wdClientUser.getSAPUser();
          IUserAccount[] acct = sapUser.getUserAccounts();
          String str = acct[0].getDisplayName();
          wdComponentAPI.getMessageManager().reportSuccess("user "+ str);
         } catch (WDUMException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
         } catch (UMException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
    You need security api for using it make sure that is present.
    [Find out who is login into the Portal|http://forums.sdn.sap.com/thread.jspa?threadID=1723807]
    Hope This is Help full for you!!!
    Best Regards
    Vijay K

  • How to fetch the logged in user?

    Hi Friends,
    In my BSP application, I need to capture some data from the logged in user. For this I need to fetch the logged in user name, through my BSP application.
    Could you please let me know, whether there is any FM or API, which serve the purpose for me.
    Your help in this regard is highly appreciated.
    Thanks & Regards,
    John

    Hi,
    Use the system variable  SY-UNAME .
    Regards,
    Anubhav.

  • Identity User( Find Current Logged in User) Windows Forms

    I have implemented dummy code for logging in to a windows Forms Application using Identity (Owin Auth). part of my code is as follows:
    private bool validateuser()
    bool isAuthorised = false;
    Login1 log = new Login1();
    if (DialogResult.OK == log.ShowDialog())
    Splasher.Show(typeof(frmSplash));
    userC = log.usernameTextBox.Text;
    PassC = log.passwordTextBox.Text;
    if (userC == "" || PassC == "")
    count++;
    //isAuthorised = false;
    if (count > 0) log.LoginStatus.Text = "Empty passwords or usernames are not allowed. please try again";
    if (count == 2) MessageBox.Show("You have one try remaining");
    if (count == 3) { MessageBox.Show("You have exosted your tries application will now close"); Application.Exit(); }
    validateuser();
    else
    var userStore = new UserStore<IdentityUser>();
    var userManager = new UserManager<IdentityUser>(userStore);
    var user = userManager.Find(userC, PassC);
    if (user != null)
    var userIdentity = userManager.CreateIdentity(user, DefaultAuthenticationTypes.ApplicationCookie);
    isAuthorised = userIdentity.IsAuthenticated;
    userIdentity.AddClaim(new Claim("FullName", user.UserName));
    userIdentity.AddClaim(new Claim("User_Id", user.Id));
    return isAuthorised;
    else
    count++;
    //Application.Exit();
    if (count > 0) log.LoginStatus.Text = "You may have entered a wrong password or username. Please try again";
    if (count == 2) MessageBox.Show("You have one try remaining");
    if (count == 3) { MessageBox.Show("You have exosted your tries, application will now close"); Application.Exit(); }
    validateuser();
    count = 0;
    return isAuthorised;
    When the code works fine and is able to authenticate from the database. In the current form, I'm able to get the current user by using user.UserName or id by using user.Id
    How do I get to retrieve the name or Id of the current logged in user from another form. Please Help
    Thanks
    My ASP

    Type in c.Type is giving an error. could I be missing any important reference?
    My ASP
    Hi,
    Looks from Aram's code, I found a blog from Leandro Boffi.
    http://leandrob.com/2012/02/claims-identity-c-4-0-dynamics/
    Some similar code like Aram's. You should install
    Windows Identity Foundation and the companion
    WIF SDK
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Collapsible Panel open on new page

    I am using the Spry Collapsible Panel as a sidebar menu. I would like to be able to click on a menu link, which takes me to a new page with the relevant panel staying open on that new page. Is this possible? If so, how do I make it happen? I am not g

  • How to achieve Entity Bean methods ONLY by calling them from a Session Bean

    Hi, I used a session bean as a business facade to a entity bean. In the session bean I achieve the entity bean with a jndiContext.lookup("java:comp/env/ejbEntityBean"). Now I am looking for a solution that it is only possible to call the entity bean

  • How can I know in which Tables are the fields stored

    Hi, In transaction FSE3 Display Financial Version Statement Version, if I drilldown in details, I can see Item No, Chart of Acc, From Accountm To Account D, C. when I do a F1 on the fields, I can see that it is a structure. How can I know in which Ta

  • Java from Time Machine

    Hi all... Due to the recent Java update (From Apple), Java is disabled in web-browsers. Simple question is, how do I restore just the old version of Java from a Time Machine backup, without having to do a full restore of all my files? Thanks.

  • What is the best Reference for Objective-C

    I am trying to learn Objective-C to develop for iphone and ipad by following a stanford course, and i need to understand more and more about Objective-C , i know the documentations that xcode provides , but it's not quite enough for me actually, I ho