*** How to get the username in a custom password change routine....

How to get the username in a custom password change routine / procedure / form when a user's password has expired and is redirected automatically to this custom program?
We use the 2nd parameter in LOGIN_URL column in WWSSO_LS_CONFIGURATION_INFO$ table to get to this custom change-password proc.

OK !
Use that maybe good :
select USERID into v_user from sys.aud$
  where ntimestamp#=(
  select max(ntimestamp#)
  from sys.aud$ );

Similar Messages

  • How to get the caret inside a custom editor?

    I was reading through old posts the other day and noticed this by Rob Camick in this thread Re: Problem in cell selection in JTable Java Swing :
    camickr wrote:
    All KeyEvents are passed to the editor for the cell and the editor is psuedo invoked. That is, the caret is not placed on the text field used as the editor, but the character typed is added to the editor.This set me thinking about a known issue in my app which I had shelved for a "rainy day": how to get the caret into the cell editor component. I thought I'd get it out and look at it. I tried the following, in my custom cell editor:
      public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,
                                                 int row, int column)
        JTextField ec = (JTextField) editorComponent;
        ec.setText((String) value);
        if ("".equals(ec.getText()))
          ec.setCaretPosition(0);
        else
          ec.selectAll();
        return editorComponent;
      }But it has no effect whatsoever, the user still can't type something in and then press the backspace key to useful effect. Has anyone out there solved this problem? (And why, oh why, is the caret not put into the cell editor by default, if it's a component that has a caret?)

    Replying to my own post, in case what I ended up with is of some help to others. The desired behaviour was that anything the cell contained from the previous edit would be replaced by what the user types in the current edit, i.e.:
    user starts edit, types 234, stops editing, cell displays 234...user single-clicks on cell, types 567, stops editing, cell displays 567
    My code is as follows:
        public Component getTableCellEditorComponent(JTable table, Object value,
                                                     boolean isSelected, int row,
                                                     int column)
          final JTextField ec = (JTextField) editorComponent;
          ec.setText((String) value);
          // selectAll, so that whatever the user types replaces what we just put there
          ec.selectAll();
          SwingUtilities.invokeLater(new Runnable()
            public void run()
              // make the component take the keyboard focus, so the backspace key works
              ec.requestFocus();
              SwingUtilities.invokeLater(new Runnable()
                public void run()
                  // at this point the user has typed something into the cell and we
                  // want the caret to be AFTER that character, so that the next one
                  // comes in on the RHS
                  ec.setCaretPosition(ec.getText().length());
          return editorComponent;
        }

  • HttpSessionListener: how to get the username?

    When a session is created, I want to read some data from database
    and store it as session variables. What data is to be read depends
    on the user name.
    I use the HttpSessionListener.
    How can I get the username from within the sessionCreated method?
    I could getRemoteUser() from HttpServletRequest, but how do I get
    the request?
    J2EE API documentation says:
    public interface HttpSession
    Provides a way to identify a user across more than one page request or
    visit to a Web site and to store information about that user.
    Therefore, my problem ought to have a solution, oughtn't it?

    You'd like to think so.
    Unfortunately, the Servlets 2.3 spec does not appear to address combining deployer-based authentication with deployer-based listener classes. This means it's pretty much up to the vendors whether you can do this.
    I'm using jetty/jboss, and the situation is as follows:
    Authentication info is stored in the session only if you use form-based authentication (which, as I found, means you're forced to use form-based authentication if you want your users to be able to log off.)
    However, even if you are using form-based authentication, there are two problems.
    1. your HttpSessionListener implementing class gets called BEFORE they login (i.e. before the login page is presented). So there's nothing in the session yet.
    2. How the container stores the authentication info in the session is entirely up to the vendor. In the case of jetty, the login is stored in the session property "org.mortbay.jetty.Auth".
    So in the case of Jetty, you'd need to implement HttpSessionAttributesListener, wait for that property to be set, and then get the stuff from the db based on that setting. Needless to say, this is highly non-portable. sigh.
    I think the only way to do what we want is to forget HttpServletRequest and use a filter instead. Bummer.
    Did you come up with any bright ideas in the end?

  • How to get the count of distinct customer in matrix?

    Hi,
    I want to get the count of distinct customer in matrix at the time of validation event.
    Thanks Regards,

    Hi,
    Please close the thread.by marking the correct answer
    regards,
    Prasad

  • How to get the username/password of the current owner of the running code

    Dear friends,
    Our product is running on the App Server(weblogic/websphere...) and we also use security provider(OpenLDAP) and kerberos to support SSO. Before, when a user tyies to login in the first time, the way we use to authenticate the user is:
    1) Accept the username/password
    2) Query the security provider(OpenLDAP) to get the principles.
    3) verity if the username/password is corrent or not.
    As we know, to query the principles, we need to provide a search user(both username and password) if we configured the access control of the ldap server:
    I have configured my envirioment as follows
    1) In the LDAP server, configured the Middle Tire user(The Operating System user running the App Server) to have the permission to query principles.
    2) The server is configured to runing on SSO envirioment.
    My question is could I get the username/password of the OS user running the App Server at runtime so that I can query the ldap server without explicitly providing the search user?
    Thanks,
    RR
    Edited by: Ricky Ru on Oct 9, 2011 1:50 AM

    Thanks EJP.
    I have made some progress on this. But I have met another issue.
    *1) Using JAAS to login.*
    loginContext.login();
                   Subject subject = loginContext.getSubject();
                   ldapContext = (LdapContext) Subject.doAs(subject, this);
    *2) Init the ldapContext to use the GSSAPI authentication*
    // this is called automatically by login()
         public Object run() {
              Hashtable ldapEnv = new Hashtable();
              ldapEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
              ldapEnv.put(Context.PROVIDER_URL, "ldap://9.30.215.197");
              ldapEnv.put(Context.SECURITY_AUTHENTICATION,"GSSAPI");
              ldapEnv.put(Context.SECURITY_PRINCIPAL,"");
              ldapEnv.put(Context.SECURITY_CREDENTIALS,"");
              //System.setProperty("sun.security.krb5.debug", "false");
              // This tells the GSS-API to use the cached ticket as
              // credentials, if it is available
              System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");     
              try {
                   InitialLdapContext ctx = new InitialLdapContext(ldapEnv,null);
    But I got the following exception when excuting new InitialLdapContext(ldapEnv,null);
    Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
    Acquire TGT from Cache
    Principal is [email protected]
    Commit Succeeded
    javax.naming.AuthenticationException: GSSAPI [Root exception is javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Integrity check on decrypted field failed (31))]]
         at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:150)
         at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:214)
         at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2694)
         at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
         at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
         at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
         at LDAPKerbService.run(LDAPKerbService.java:66)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:337)
         at LDAPKerbService.login(LDAPKerbService.java:40)
         at LDAPKerbService.main(LDAPKerbService.java:82)
    Caused by: javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Integrity check on decrypted field failed (31))]
         at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:194)
         at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:105)
         ... 16 more
    Caused by: GSSException: No valid credentials provided (Mechanism level: Integrity check on decrypted field failed (31))
         at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:663)
         at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:230)
         at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:162)
         at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:175)
         ... 17 more
    Caused by: KrbException: Integrity check on decrypted field failed (31)
         at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:61)
         at sun.security.krb5.KrbTgsReq.getReply(KrbTgsReq.java:185)
         at sun.security.krb5.internal.CredentialsUtil.serviceCreds(CredentialsUtil.java:294)
         at sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(CredentialsUtil.java:106)
         at sun.security.krb5.Credentials.acquireServiceCreds(Credentials.java:562)
         at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:594)
         ... 20 more
    Caused by: KrbException: Identifier doesn't match expected value (906)
         at sun.security.krb5.internal.KDCRep.init(KDCRep.java:133)
         at sun.security.krb5.internal.TGSRep.init(TGSRep.java:58)
         at sun.security.krb5.internal.TGSRep.<init>(TGSRep.java:53)
         at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:46)
         ... 25 more
    Do you have any clue on this? Thanks.

  • How to get the username in  "atfer serverror" trigger ?

    Hi folks;
    How to get the name of the user who just miss his connection to the database in a "after serverror" trigger ?
    The code of the trigger :
    create or replace
    TRIGGER TRG_LOGGON_FAILURES
    AFTER SERVERERROR ON DATABASE
    BEGIN
      IF (IS_SERVERERROR(1017)) THEN
      UPDATE utilisateur_ora SET UTO_STA='BLOQUE', UTO_DATE_STATUT=sysdate WHERE UTO_USR_GPL=<var_user>;
      COMMIT;
      END IF;
    END;

    OK !
    Use that maybe good :
    select USERID into v_user from sys.aud$
      where ntimestamp#=(
      select max(ntimestamp#)
      from sys.aud$ );

  • How to get the cursor field on custom cotrol area

    Hi all,
    I crated a custom contorol area on  Dynpro screen.
    I'd like to get the cursor when i set the cursor on custom control area.
    I tried 'GET CURSOR FIELD w_xxx AREA w_yyy', but I can't get that.
    I don't know how.
    If you know that, please let me know.
    Regards.
    Rie.

    You have to use set_focus method of CL_GUI_CUSTOM_CONTAINER.
      CALL METHOD me->txt_container->set_focus
        EXPORTING
          control = me->txt_editor.

  • Web Services: How to get the username token?

    Hello everybody,
    I wrote an EJB, Exposed it as a web service.
    I'm using encryption+username as the inbound policy.
    The client is adding a username token to the message.
    I understood that the userpassword are checked automatically and I don't need to implement that myself but I need the userpassword from this token for another reason.
    How can I get this information in the EJB's code?
    Thanks, Adi.

    You can get the user from Session Bean's context.
    myContext.getCallerPrincipal();
    I think you cannot get the password. That way, it would be easy to disguise your WS as another one you could want to crack.
    Regards.

  • How to get the name of a (custom) component

    Hi,
    I would like to know whether there is a way to get the name Xcelsius uses for instance in the Object Browser. Getting the components "name" property doesnt return this information.
    Thanks in advance.

    String myFileName = request.getRequestURL().substring(request.getRequestURL().lastIndexOf("/")+1);
    or with javascript
    <H1><script>document.write(document.location.href.substring(document.location.href.lastIndexOf("/")+1))</script></H1>
    bye! :)

  • How to get the screen value to custom screen from standard screen

    Hi all,
    I have a standard screen which is attached to a standard function group and a custom screen which is attached to a custom function group... Now my requirement is to get some field values from the Std screen to my custom screen ...
    I have used the FM DYNP_VALUES_READ but its resuts in error...
    in my current screen PBO i called this FM and given the prog name as the Std pgm name which being created while creating the screen from the function group and the screen number as the standard screen number...
    Eg : Standard Function gp = FSBP_02
           Pgm name  = SAPLFSBP_02
          Screen Naumber = 0220
    Custom screen = 9001
    Pgn Name = zname
    in 9001 PBo i called
    DATA: IT_DYNPFIELDS  TYPE TABLE OF DYNPREAD,
           WA_DYNPFIELDS like line of IT_DYNPFIELDS.
    WA_DYNPFIELDS-FIELDNAME = 'BP021-BUSINESS_Y'.
    APPEND WA_DYNPFIELDS TO IT_DYNPFIELDS.
    CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
         DYNAME                               = 'SAPLFSBP_02'
         DYNUMB                               = '0220'
        TRANSLATE_TO_UPPER                   = ' '
        REQUEST                              = ' '
        PERFORM_CONVERSION_EXITS             = ' '
        PERFORM_INPUT_CONVERSION             = ' '
        DETERMINE_LOOP_INDEX                 = ' '
        START_SEARCH_IN_CURRENT_SCREEN       = ' '
        START_SEARCH_IN_MAIN_SCREEN          = ' '
        START_SEARCH_IN_STACKED_SCREEN       = ' '
        START_SEARCH_ON_SCR_STACKPOS         = ' '
        SEARCH_OWN_SUBSCREENS_FIRST          = ' '
        SEARCHPATH_OF_SUBSCREEN_AREAS        = ' '
       TABLES
         DYNPFIELDS                           = IT_DYNPFIELDS
      EXCEPTIONS
        INVALID_ABAPWORKAREA                 = 1
        INVALID_DYNPROFIELD                  = 2
        INVALID_DYNPRONAME                   = 3
        INVALID_DYNPRONUMMER                 = 4
        INVALID_REQUEST                      = 5
        NO_FIELDDESCRIPTION                  = 6
        INVALID_PARAMETER                    = 7
        UNDEFIND_ERROR                       = 8
        DOUBLE_CONVERSION                    = 9
        STEPL_NOT_FOUND                      = 10
        OTHERS                               = 11
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    How Can i get that... Its important ... Please help me...

    Hi,
        Try with the below FM
    RS_REFRESH_FROM_SELECTOPTIONS
    in your custorm program, check the SY-CPROG and SY-XPROG values, for the standard program name or directly pass the importing parameter for the above FM as SAPLFSBP_02.
    Regards
    Bala Krishna

  • How to get the name of user who last changed the settings of process chain

    Hi All,
    I have a process chain which runs daily. At one atep it would load data till PSA then there was a separate process to update data from PSA. But recently someone changed the settings and data is loaded in PSA and data target in parallel. But the process update data from PSA is also there still and as a result giving error as data already reached infocube. I wish to know who changed the settings. I searched and found about tcode SGL1 but not getting any fruitful result. Can anyone pls suggest anything.
    Thanks in advance,
    Sananda

    Hi There,
    In your case, nobody has changed the settings in process chains. However, it appears that someone has changed the Processing mode in the Info package. Since now the infopackage has already run after the change was made, I don't think there is any way to find who has changed the setting in the infopackage.
    However, the solution would be to just switch back the processing mode from "PSA and Data Targets in Parallel" to "Only PSA".
    Regards,
    Hemant Khemani

  • How to query the username....

    Hello folks,
    please can anyone help me on how to get the username of a user who is locking a specific row, for example if a user in a multi-user application is locking the record where emp_id=10 and name=X, how can I get his name?????
    and thank you in advance

    Hi fish,
    deadlocks are different things. Oracle documentation says : "A deadlock can occur when two or more users are waiting for data locked by each other" and "Oracle automatically detects deadlock situations and resolves them by rolling back one of the statements involved in the deadlock"
    See http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/consist.htm#sthref2043
    See my example (ora102 is OS user and lock1 is my script above) :
    Session 1 :
    SCOTT@db102 SQL> update emp set sal=3000 where empno=7902;
    1 row updated.
    SCOTT@db102 SQL>Session 2 :
    SCOTT@db102 SQL> update emp set sal=3000 where empno=7902;
    ... hangsSysdba session :
    SYS@db102 SQL> @lock1
    TO_CHAR(SYSDATE,'DD
    17/05/2006 16:25:54
    BLOCKER                     SID 'BLOCKS' BLOCKEE                     SID USERNAME
    ora102                      148  blocks  ora102                      158 SCOTT
    OBJECT_NAME                           SID ORACLE_USERNAME      TY      LMODE    REQUEST
    EMP                                   148 SCOTT                TX          6          0
    SYS@db102 SQL>                                                                         

  • How to get the latest credit limit values per each customer in the report.

    Hi All,
    Can anybody give me an idea on how to get the latest credit limit values per each customer in the report.
    I have below requiremnt.
    I have cube which is having transactional data on document and customer level .and it also having master data info object in the cube which is credit management view having all the customer numbers .
    This credit management view is master data info object having credit limit key figure as attribute.These credit limit are per each customer.
    So we need these credit limits in the report as dynamic values .(I mean whatever be the current credit limit in the master data table for that paricular customer that should show up in the reporting).
    one more thing these credit limits should roll up correctly at the HTR level.
    One HTR having number of customers .
    for example HTR 100 can have customer number 200,300,400.
    Those 200,300,400 customer credit limits should roolup correctly at the HTR 100 level.
    Example below :
    Cube DATA :
    HTR Customer Doct number Credit managment view
    100 200 10001 200
    100 200 10002 200
    100 300 10004 300
    100 300 10005 300
    100 400 10006 400
    100 400 10007 400
    100 400 10008 400
    Master data tabel (P Table)(Credit managment view)
    Credit managment view Credit limits
    200 1000.00
    300 50000.00
    400 90000.00
    Please remeber :
    We can not make these credit limits as navigational becasue these are keyfigure attributes not characteristics.
    one more thing we can not make them as charatistics because we need use these credit limits to derive other calkculation. so it is not possibel to derive calculations on charactristics .

    Create a formula variable of type replacement path with reference as attibutes of Credit management view and choose your key figure credit limit,say zcredit.
    Now create a formula or CKF and use zcredit.
    This should display the credit limit in your report as normal key figure.
    I didnot get this part "one more thing these credit limits should roll up correctly at the HTR level.", may be the above will solve this too.Try it.
    Hope this helps.

  • How to get the current month value for a customer exit variable?

    How to get the current month value for a customer exit variable? 
    And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
    Thanks!

    Hi Kevin,
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    Regards,
    Vijay.

  • How to get the current logged in username from windows and put it into an AS var

    Hello,
    I was hopeing someone would know how to get the current logged in username from windows and put it into a var, so I can create a dynamic text box to display it.
    Thanks in advance
    Michael

    Just for everyone’s info, this is the script I have used to get the logged in windows username into flash ---- not and air app.
    In the html page that publishes with the .swf file under the <head> section:-
    <script language="JavaScript" type="text/javascript">
    function findUserName() {
         var wshell=new ActiveXObject ("wscript.shell");
         var username=wshell.ExpandEnvironmentStrings("%username%");
         return username;
    </script>
    The ActionScript:-
    import flash.external.ExternalInterface;
    var username:String = ExternalInterface.call ("findUserName");
    trace (username); // a quick test to see it in output

Maybe you are looking for

  • Same sequence value for multiple targets

    Hello In my mapping, I have 4 target tables. The primary key of the first table is filled by a sequence. Now I should use the same value to fill in the 3 other tables. I was trying to use the sequence in the joiner and in the splitter but when I vali

  • Microsoft Excel Icon in ALV Grid Report

    Hi all, We have a customized report. When we execute that reports, it open in ALV Grid format. When we choose "Microsoft Excel" Icon to change layout to Excel, it then shows the report in excel without any data. Can any one please tell me that why th

  • How to know form is open or not or not in sap

    How to know form is open or not or not in sap

  • Trapped by the completely useless Modification Assistant !!!!!!!

    Hi all you SAP gurus Some background.... Our system SAP r/3 4.7 We have a number of SAP screens we have modified to include functionality for Quick Address. The modifications were a couple of extra screen elements and a bit of code. This allows the u

  • I have problems connecting to wifi with my mac book pro

    I cant connect to my house wifi network. The network status says: Wifi: green Wifi settings: green Network Settings; yellow ISP: green Internet: red (failed) Server: red (failed) I dont know what the problem is.