Retrieving System Name used in JCO connection ?

Hi All,
Do you know how to retrive the System Name paramer value used in JCO connection using Web Dynpro programe. If so can you please sen me how.
I promise to award points for the correct answer.
Thank you and Regards
Maruti CR

Hi Jennifer,
Thank you for your reply. I am still trying to get the SAP system name for the model used. I trind to your your code but I am getting some compilation errors.
Bapi_User_Get_Detail_Input iasmodel  = new Bapi_User_Get_Detail_Input();
The code I used is
Bapi_User_Get_Detail_Input iasmodel = (Bapi_User_Get_Detail_Input)WDModelFactory.getModelInstance(Bapi_User_Get_Detail_Input.class);
IWDJCOClientConnection jcoClientConn = (IWDJCOClientConnection)iasmodel.modelInstance();
I am getting compile errors..
The type of model represented by class 'com.ias.Bapi_User_Get_Detail_Input' is not compatible for creation by WDModelFactory
Can you please suggest?
Thank you and Regards
Maruti CR

Similar Messages

  • How to use a JCO connection pool in an EJB?

    Hi *,
    I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
    I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
    Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
    Kind regards,
    Lars

    Hi *,
    I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
    I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
    Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
    Kind regards,
    Lars

  • What is the logical system name used for in R/3?

    We have a R/3 server. The production client has a logical system name. What is the logical system name used for?
    Tony Tam

    Hi Tony
    Following Links will help you in understanding the concept
    http://benstudycenter.blogspot.com/2008/02/logical-system.html
    http://help.sap.com/saphelp_sm32/helpdata/en/78/217dc151ce11d189570000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_sm32/helpdata/en/78/217dc151ce11d189570000e829fbbd/frameset.htm
    thanks
    Bhudev

  • Retrieving User name using SAP id

    Hi Experts,
        I want to retrieve my name using my SAP user id. Can anyone say in which table I can find.
    I searched usr01,02,...06 table where I didn't get my user name. But in all session, in title bar I am getting my name. From where it may be taken.
    Thanks and regards,
    Venkat

    Use USR21 and ADR6 tables.
    you can check the same here.
    [Retrieving User name and id|Table for Username & Email address]

  • Retrieve system information using BAPI's

    Hi,
    I want to know if we can retrieve SAP information like :
    1) System name, sid, system number,db schema etc.
    2) Implemented CRM processes like sales, services etc. in CRM
    3) Netweaver component like BW, MI etc.
    using BAPI's / RFM...
    Please help..SAP ABAPers...
    Thanks..

    Hi Rashi,
    Plz go through the link.
    http://www.ibm.com/developerworks/websphere/techjournal/0306_minocha/minocha.html
    rewards if useful.
    Thanks
    Mohinder Singh Chauhan

  • Retrieving file name using web agent

    When uploading to the database using interMedia web agent and an HTML form, is the file name (as well as the file contents) passed to the agent?
    If so, how does one retrieve the file name on the server side?
    Thanks for insight.
    -John

    Hi John,
    OK, you got me thinking, so I just had to look :-) Turns out its not in the documentation as such. Its in the doc changes section at the end of the README. (Because, now I really think about it, I added the code after the docs were last updated).
    Simon

  • Retrieving cursor names using SQLJ

    Hi,
    I would like to know if & how its possible to get the cursor name of a resultset using SQLJ.
    The Statement.setCursorName()/getCursorName() gives me a "Feature not supported" when I use the oracle internal driver "jdbc:odbc:kprb", but the same method works for a simple JDBC:ODBC bridge.
    Thanks,
    Joe

    I am not sure if my reply is relevant. But if you have a named iterator in SQLJ, you may try
    myIter.getResultSet().getCursorName().
    null

  • Identify system name using SMSID

    Hello All,
    Looking for a help, I am getting the below message on one of the SCCM 2012 Primary server. From the below SMSID, I want to identify the problematic client. Is there any way I can do so?
    "MP has rejected the request because CD(SMSID = 56AD2E95-7458-44F7-8418-395C7459E110) certificate has expired."

    Hi,
    Please have a look at the similar thread below. It fixed the problem by edit the value of IsRevoked in ClientKeyData table from 1 to 0. Note, this is not supported by Microsoft.
    https://social.technet.microsoft.com/Forums/en-US/3fd25d9d-3912-4b49-964c-fb94eedcea95/mp-has-rejected-policy-request-from-cdsmsid-because-this-smsid-is-marked-as-blocked?forum=configmanagergeneral
    Best Regards,
    Joyce
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • JCo Connection using file.properties doesn't work when deployed

    Hello Experts,
    I'm trying to connect to a SAP backend system using the JCo connection.
    I've tyed with the standard connection, crating dinamically the connection and it works fine:
    mConnection = JCO.createClient("001", // SAP client
    "sap.user", // userid
    "********", // password
    "IT", // language
    "ashost.domain.dom", // application server host name
    "06"); // system number
    mConnection.connect();
    Then I tryed to store the login data in a file 'login.properties' put in the same package of my connection classes.
    The code is:
    String[] logonStr = new String[5];
    Properties properties = new Properties();
    try {
    InputStream is = getClass().getResourceAsStream("login.properties");
    properties.load(is);
    } catch (Exception e) {
    e.printStackTrace();
    logonStr[0] = PropertyManager.getProperty(applicationProperties,"jco.client.client");
    logonStr[1] = PropertyManager.getProperty(applicationProperties,"jco.client.user");
    logonStr[2] = PropertyManager.getProperty(applicationProperties,"jco.client.passwd");
    logonStr[3] = PropertyManager.getProperty(applicationProperties,"jco.client.ashost");
    logonStr[4] = PropertyManager.getProperty(applicationProperties,"jco.client.sysnr");
    mConnection = JCO.createClient(logonStr[0],      // SAP client
    logonStr[1],    // userid
    logonStr[2],    // password
    "IT",           // language
    logonStr[3],    // application server host name
    logonStr[4]);   // system number
    If I test locally this code it works fine and the login datas are extracted from the 'login.properties' file.
    But when I deploy my PAR file in the Portal seems that the 'login.properties' file isn't found by my application...
    Which could be the cause??
    Could it be a permission problem??
    Any Ideas?
    Thanks in Advance,
    Best Regards

    Hi Shyam,
    Thanks for your answer!
    I could use the string "ashost.domain.dom" instead to extract it from the 'login.properties' but I need also the others login info as username and password.
    My problem is that the 'login.properties' file is not found by my application when the PAR file is deployed in the portal...
    I need to know if I need to move the 'login.properties' file in another package or something else...
    Any ideas??
    Have I to declare the .properties file in some configuration file (for example portalapp.xml or somthing similar..) ??
    Best Regards...

  • Will system change effect JCO connections.

    Hi,
    We are connecting to other server. So will the changes in the system reflect in the JCO connections or we have to create JCO connections individually for each application??
    Is there any way to create JCOs for all applications together?
    Thanks,
    Zayed

    If you are referring to the generated metadata and modeldata JCo destinations after creating/importing a model, it's wise to choose meaningful names for them. In my opinion a good practice is to let them reflect the type of system (ECC, CRM, etc.) that they will connect to. You can use the same names for different models. These models will then use the same JCo destinations, which has the advantage that you will only have to change 2 JCo destinations (the metadata and modeldata) when your ECC system connection parameters change for example.

  • How to get the local lan connecting all the system names ?

    how to get the local lan connecting all the system names using java?
    any body know then send the coding or solution

    This question is asked and answered repeatedly. Search the forum.

  • Defining Logical System name for ALE using T.C- SPRO?

    Hi,
    Can anybody tell, how to define logical system name using T.C SPRO?
    Where can I find the "Define Logical System for ALE"?
    Thanks
    Balaji

    HI,
    Use the SALE transaction , there you can have all steps clearly,
    please see the below links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cdded790-0201-0010-6db8-beb9bb2b2660
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    /people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping
    Regards
    Chilla..

  • How do I get the Weblogic system name in WLS 6.1 sp2 without creating T3Client

    Hi Folks,
    In Weblogic Server 5.1, I get the weblogic.system.name using the following code:
    T3ServicesDef t3services = T3Services.getT3Services();
    String systemName t3services.config().getProperty("weblogic.system.name");
    What is the counterpart for Weblogic Server 6.1?
    Thanks in advance for your help.
    Bill

    The class doesn't seem to be documented in the normal documentation, but
    you can get an overview of the methods by executing
    javap weblogic.management.Admin
    with weblogic.jar in your classpath.
    Hope that helps,
    Nils
    Bill Lam wrote:
    >
    Jim,
    Can you tell me where I can find documentation for
    weblogic.management.Admin?
    Thank you.
    Bill
    "Bill Lam" <[email protected]> wrote:
    Jim,
    Thanks. I appreciate your help.
    Bill
    Jim Brown <[email protected]> wrote:
    Bill:
    The weblogic.server.name property in WLS 5.1 has been replaced by the
    property weblogic.Name in WLS 6.X. Although it is possible to retrieve
    this value by calling System.getProperty(), I would encourage you to
    use
    the new JMX services which have replaced our proprietary management
    interfaces (T3ServicesDef, et. al.). For example, you could write aJMX
    client to read the various properties of ServerMBean. To get started,
    here is the link to our WebLogic JMX documentation:
    Programming WebLogic JMX Services
    <http://e-docs.bea.com/wls/docs61/jmx/index.html>
    Please post any follow-up questions about JMX to the
    weblogic.developer.interest.management.general_and_jmx newsgroup.
    Besides writing a JMX client, you can also take advantage of the
    following short-cut for retrieving the server name. The remaining code
    for this example can be found in your WebLogic Server samples directory
    under: ./wlserver6.1/samples/examples/cluster/rmi/HelloClusterImpl.java
    private String getLocation(){
    String toReturn = null;
    try{
    toReturn = weblogic.management.Admin.getServerName();
    }catch(Exception e){
    System.out.println("HelloClusterImpl failed getLocation");
    e.printStackTrace();
    if(toReturn==null){
    return "";
    }else{
    return toReturn;
    Regards,
    Jim Brown
    Bill Lam wrote:
    Hi Folks,
    In Weblogic Server 5.1, I get the weblogic.system.name using the followingcode:
    T3ServicesDef t3services = T3Services.getT3Services();
    String systemName t3services.config().getProperty("weblogic.system.name");
    What is the counterpart for Weblogic Server 6.1?
    Thanks in advance for your help.
    Bill--
    Jim Brown
    Developer Relations Engineer
    BEA Support
    ============================
    [email protected]

  • JCO Connection close

    Hi  All,
    I wanted to know is the connection to close the JCO should be handled in the program or the system will handle since I am using the JCO connection handled by content admin with JCo Pool Configuration.
    <b>I am seeing in SAP backend all the sessions are still open.</b>
    Thanks,
    Rakesh

    Valery,
    We are having an issue wherein the JCo connections are still listed in AL08 output long after the applications are closed. We do call disconnectIfAlive method after executing the Adapative RFC calls.
    Do let me know if there is anyway we can force webdynpro to release connections to the backend or is there any timeout setting in R3 that has to be configured so these connections dont stay open for indefinite time.
    Thanks in advance !

  • Dynamic JCo Connection with Adaptive RFC Model 2

    Hi gurus,
    I'm trying to dinamically change a model data connector inside my web dynpro. I'm using an Adaptive RFC Model 2 to communicate with the R/3 backend. I've found that is possible to change the connector modifiyng the code inside the web dynpro. In detail I've found this example:
    IWDDynamicRFCModel model1 = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(Model1.class);
    I put this code into wdDoInit method but I get the following error:
    "<comp_name>.wdDoInit failed to create or init instance of model 'model_name' in scope NO_SCOPE with instanceId 'null'"
    Furthermore I've used the deprecated Adaptive RFC Model and when I instantiate a model, ModelName m=new ModelName(), I see that the methods m.setJcoClient(client) and m.setSystemName(systemName) are visible, while when I try to do the same with Adaptive RFC Model 2, with my model m, the methods before there aren't.
    So this is my question: is it possible to change data connector dinamically with Adaptive RFC Model 2?
    Thanks a lot

    Dear Lukinho,
    You may try this ;
    try {
    IWDJCOClientConnection clientCon =  WDSystemLandscape.getJCOClientConnection("<name of the JCO connection>");
    String clientName      = clientCon.getClientName();
    String lang          = clientCon.getLanguage();
    String passowrd          = clientCon.getPassword();
    String sysID          = clientCon.getSystemIdentifier();
    String user          = clientCon.getUser();
    //etc...
    } catch (WDSystemLandscapeException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    I got this code from the thread   [Multiple Client Logon in JCO   |Re: Multiple Client Logon in JCO;
    Also have a look at this thread
    [JCo Destination   |Re: JCo Destination;
    Hope it helps!!
    Warm Regards
    Upendra Agrawal

Maybe you are looking for

  • How do I install app on hundreds of ipads

    I've got a project in the works where about 100 ipads will be bought to put one local application on it which will run continuously. Also, application won't be available from itunes store. This application needs to be updatable, and I don't need uniq

  • C6 Email options changed

    Hey everyone, i recently updated my c6 to version 20.0.042 and noticed that the synchronization option of my mail as "SOONEST" has been removed from the list and replaced with "MANUAL". Can please anyone help me get the soonest option for my mail syn

  • How to recover deleted sms messages & emails in BB Q5

    Hi, I am seeking help to discover sms/text messages and emails data (which were deleted previously) from BB q5 handset.  Can some help me in this? regards

  • I am able to read a string but am receiving an error when graphing

    Note: using labview 6.0  Error: (arg 1) in try1_old_mods for new design.vi I am taking in data from a serial then using scan string to parse out part of the data, followed by the build array command, and the am graphing the data.  The program does no

  • How to back up iphoto

    I need help. I just downloaded the latest version of iPhoto '11. When I click on the iPhoto icon none of my pictures are there. Did I need to back them up. Where are my photos from the previous iPhoto? I don't have a hard drive so what do I do?