How to recognize a telnet session (RF) from a SAPGUI?

hi guys,
i must check and block a transaction, developed for a RF terminal, if it is executed by SAPgui...
how to, in abap, recognize a telnet session (RF) from a SAPGUI ?
I have tried FM "SAPGUI_OBJECT_ID" hoping in a sy-subrc ne 0 with telnet but it's not right.
Edited by: Cacco Andrea on Apr 28, 2009 2:43 PM

i resolved like this:
    cl_gui_frontend_services=>get_computer_name(
      changing
        computer_name        = zterm
      exceptions
        cntl_error           = 1
        error_no_gui         = 2
        not_supported_by_gui = 3
        others               = 4
    if sy-subrc = 0.    "SAPGUI
  else.               "telnet
    endif.

Similar Messages

  • How can i lookup a session bean from the client side

    how can i lookup a session bean from the client side...........i am using sun appserver..............
    this is my code.................[B]
    private final static String JNDI_NAME="ejb/LmsBean";
    private static String url="ldap://localhost:4848";
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    [B]and i got the exception........
    Inside Client before calling delegate
    Before Loading Context in Delegate
    javax.naming.CommunicationException: Request: 1 cancelled
    javax.naming.CommunicationException: Request: 1 cancelled
    at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
    at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    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.ja
    va:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
    a:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    62)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
    0)
    at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
    :50)
    at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
    pls go tru the exception and pls help.........

    That url string should be having the server name or ip instead of localhost.

  • How to disconnect a telnet session ?

    Router#show use
    Line User Host(s) Idle Location
    98 vty 0 idle 3d22h x.x.x.x
    99 vty 1 idle 3d21h x.x.x.x
    100 vty 2 idle 2d11h x.x.x.y
    *101 vty 3 idle 00:00:00 x.x.x.z
    Hi guys, I wanna disconnect telnet sessions 98, 99, and 100. How do I do it ? Thanks in advance.

    Atif is quite correct that clear line is how to terminate those telnet sessions - once the problem has developed. And his suggestion that the problem be prevented by configuring an idle timeout is what I also recommend.
    Looking at the idle time of these sessions certainly suggests that someone has configured the vty lines with exec-timeout 0 0 which disables the idle timeout. This has the effect that telnet sessions may go on for a very long time - and over a period of time hung telnet sessions may make all the vty ports busy and prevent remote access to the router. While I might not go as short as Atif's suggestion of a 5 minute timeout, I believe that the vty should have some timeout (perhaps quite long - especially in a testing or development environment). A vty with no idle timeout is a problem waiting to happen.
    HTH
    Rick

  • [SOLVED] Is It Possible to Create a Telnet Session in URXVT?

    Greetings-
    Just curious if anyone can tell me how to create a telnet session via rxvt. I saw a thread on here where someone said that it's possible, but I can't find any documentation on it. Just wanted to try it out to connect to my switch which I normally connect to from a tera term emulator.
    Thanks guys!
    Last edited by w201 (2013-10-03 23:57:02)

    ewaller wrote:
    Just run:
    telnet the_address_of_your_switch
    Or I missing something profound?
    Well it was profound to me until you just showed how easy it is. The magic of learning eh?
    Thanks.

  • Find session id from Webdynpro in 04s?

    Do you know how to find the j2ee session id from webdynpro?
    In NW 2004, we used this code:
              HttpServletRequest request = ((IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();
              HttpSession session = request.getSession();
              String sessionId = session.getId();
    How can you find this using 2004s with the IWDProtocolAdapter class??

    Hi,
       Modifying your posted code a bit:
    HttpServletRequest request = (HttpServletRequest) WDProtocolAdapter.getProtocolAdapter().getRequestObject().getProtocolRequest();
    HttpSession session = request.getSession();
    String sessionId = session.getId();
    Regards,
    Satyajit.

  • Session Params from Java

    Does anyone know how to set an xsql session parameter from within a custom java handler? I looked through the xsql java api and couldn't find anything that would accomplish this.
    Thanks
    null

    XSQL does not have its own API for setting session level parameters. To do this, you should get hold of the HttpServletRequest object, get the Http Session from there, and set the session parameters in the way you would from any servlet.
    If what you mean is set XSQL page-level private parameter, then the API to use from within your action handler is:
    getPageRequest().setPageParam()

  • How do I establish a telnet session with unit under test?

    I am going to the next step as a novice and moving from serial communications to ethernet on my unit under test. I have been all over the help and discussion forums etc and cannot find an answer. I need to open up a telnet session with my unit under test and keep it open to send commands back and forth for control of the unit. Can anyone give me a hint of how I am to establish this communication? I have the IP address and I am using port 23 but I just get the session started and then immediately closed. The sequence of events will be: start the session, the unit will reply with a username and then password, after that I need the session to remain open so I can send commands as if I am sitting at the serial port. When complete the session will then be terminated. Thanks in advance for any help.

    If you want to do telnet using plain TCP, you need to do everything yourself, including the telnet options negotiation.
    RFC 854 should have most of what you need (look towards the bottom).
    Most likely, the server will propose a few options, which you should either accept or reject depending on your needs.
    Easiest is probably to use a packet sniffer on a regular telnet session, then dissect the negotiation to see what that particular server wants.
    RFC 990 has a list of telnet options, look for the section labeled "ASSIGNED TELNET OPTIONS".
    It should be simple to write some code that negotiates with one particular host. It will be more difficult to write a full-blown telnet client that does general negotiations with any type of telnet server.
    I have a small program that telnets to a router to do some configuration. The only thing I reply to the proposed options is:
    "\FF\FD\03\FF\FE\01\r\n" (In \-codes). Translated: "Don't suppress go ahead, Do echo".
    (FF=IAC "Interpret as command", FD=Do, FE=Don't, 01=echo, 03= suppress go ahead.)
    LabVIEW Champion . Do more with less code and in less time .

  • How do you use one managed session bean from another?

    Hello -
    I am a complete newbie to JSF coming from Struts 1. My question is how do you use one managed bean from the method of another one? I think this would be a common senario. For example I put a bean in session scope when a user logs in and in a different method within a different bean I want to get some of this user's information. What is the correct way to retireve one bean from a method in another with session scope?
    Also what would the code look like to retieve another bean from the method of a managed bean where the bean you want to retrieve has application scope?
    Thank you in advance.

    Sinplicity wrote:
    Could you be a bit more specific? If a bean is configured in the faces config file then all of it's properties are managed, correct?Not necessarily.
    What would the code look like to retireve the bean?You don't retrieve it, it has been injected.
    Can I retrieve the whole bean or just a property of the bean. I would be really interested in seeing how this is done in code? And would really love a bit more information on what it means to be a managed property?Time to consult a JSF tutorial.

  • How to call session EJB from EP service in EP 7.0?

    Hi,
    I am trying to invoke stateless session EJB from my portal service. Both the service and EJB are deployed on the same server which is EP 7.0.
    I found [this|http://help.sap.com/saphelp_nw70/helpdata/EN/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm] in SAP help and tried to implement it (added PrivateSharingReference to portalapp.xml and implemented the code), but everytime I try to lookup the session bean and cast it using P4ObjectBroker.narrow() method, I get java.lang.ClassCastException. The object found in JNDI and my portal service have different classloaders, so I suppose this is the problem, but I don't know how to handle it...
    Can anyone please help me?
    Regards,
    Tomas

    Hi Satya ,
              please go though following blog for used DC concept.
    Componentization of Webdynpro Application in CE7.1
    In netweaver 7.1 interface controler is abstract and component controller is implementing interface controller so the context data and methods have to be implemented by component controller

  • How can I set the value to a session bean from backing bean

    Hi Experts,
    How can I set the value to a session bean from backing bean where I have created getter and setter
    methods for that variable.
    Basically I am using ADFUtils class where I am able to get the value from session bean
    using following expression
    String claimType =
    (String)ADFUtil.invokeEL("#{ClaimValueObj.getClaimType}");
    Thanks
    Gayaz

    Gayaz,
    Wrong Post !!
    Post in JDeveloper and ADF
    Thanks
    --Anil                                                                                                                                                                                                                               

  • How do I get my IPad to recognize my e-mail contacts from my computer?

    How do I get my IPad to recognize my e-mial contacts from my computer.  My IPad is sending and receiving e-mails, but it will not pull up my e-mail contacts from my computer.

    Did you sync the contacts from the computer by selecting them to sync in the Info Tab of iTunes while the iPad is connected to your computer and with iTunes running?

  • How can I test (Abap) a session is from type RFC

    Hi ,
    How can I test (Abap) a session is from type RFC ? Field in SY tables ?

    He wants to know if it's possible to tell by the currently running code whether it was called via RFC.
    Transaction SM04 is able to tell about a user session if it is RFC or not... so by analyzing that code, it should be possible.

  • How to create session id from different string controls

    how to create session id from different string controls

    fais,
    Please create the VI you are talking about and save some default data into all of the controls. Also on the front panel, place the session ID that should be generated by that data. Now, post your VI to a response so I can download it. I can then take this VI and help you create the functionality. (Please post what version of LabVIEW you are using.)
    My guess it that you are going to need to use a good number of string concatenations as well as a few string indexes to get parts of strings out. As for the date, you can use a Property node with the Numeric Text.Text property to get the actual string displayed on the front panel for the date and parse out the parts that you want.
    Randy Hoskin
    Applications Engineer
    National Instruments
    h
    ttp://www.ni.com/ask

  • How to know Http Session Id from Application Module ?

    Hi All,
    Our app has requirement to maintain state across many root AM, by storing it in DB on UserId+HttpSessionId.
    (or is there any other way to do this ? )
    So in prepareSession in each root AM I need to query to DB by UserId+HttpSessionId then store the result in transient VO.
    The question is : how to get to know the HttpSessionId from within AM ?
    Thank you very much for any help,
    Krist

    Hi Steve,
    Yes we use JAAS, and we have used getUserPrincipalName() .
    But, we not only need username, that is not enough, because one user can log-in from different machine concurently, that is the requirement.
    That is why we need the HttpSessionId.
    During log-in user "right after" autenticated user will choose some values from drop-list below the login Form, it is those values that we have to maintain in session scope until he/she logout. And the "same user" may log-in from another machine and choose another values.
    That is why we need to either :
    - store those values within HttpSession and access it from AM
    or
    - store those values in DB with key = user+HttpSessionId, and query it from AM.prepareSession() -> this is why I need to pass HttpSessionId to am.prepareSession()
    Thank you for your help,
    xtanto

  • How to kill particular Oracle Session from the multiple Session of User

    Hi,
    I am working on Web Application using ASP.NET , C# with Oracle. I am excuting queries from multiple connection of same user. I want to kill particular user session. I have tried to Kill session by using ALTER SYSTEM KILL SESSION 'sid,serial#' it is working fine but how can i identify which session is generated by particular connection so that i can kill that particular session.
    Suppose there us user 'abc' there are multple instance of this user and all are active but same USERNAME. So Please tell me how can i identify that session through which i am executing the query.
    Thanks,
    Nitin

    Some ideas for how to pick the right session:
    -Look at the time the session was connected (logon_time)
    -Look at the time the session last started it's most recent statement (last_call_et)
    -Look at the sql that the session is running (join with sql_address and sql_hash_value over to v$sqltext_with_newlines or one of the other views that show you the sql they are running)
    That usually gets me most of the way, if it's possible to distinguish them. ("Yeah I just started this query and I want you to kill it." is different than "I started five different queries at about the same time and I'm not sure which one I need killed.")

Maybe you are looking for

  • Key Date Variable in Webi

    Hi I have one webi report created on top of BW/ Bex Query and im using the KeyDate variable as my exchange rate conversion date. So, whenever i run the Webi Report it prompts a screen where i can key in the Date. Whenever i repoint the universe to th

  • Best notebook for editing HD videos?

    I consider to buy a MacBookPro or MacBookAir. Which one is the best choice for editing HD videos?

  • HP Pavilion 15-e092se Notebook PC keyboard not working

    HP Pavilion 15-e092se Notebook PC keyboard not working . win 8.1.

  • Difference between XLSTProcessor and oraxsl

    Hi, I am getting what appears to be a bug in XSLTProcessor. Running oraxsl with a particular XSL and XML produces the anticipated output. However using XSLTProcessor inside a servlet (with both XML and XSL correctly parsed) produces an incomplete out

  • Conky with Lua

    I am trying to use Conky, but I want to use lua with it.  Lua is not compiled with conky when I use pacman.  How do I solve this?