About JCo..

Hi.
I have heard that it is possible to call Java code from
ABAP using JCo. I am interested in doing that. I have a
few questions regarding this...
1) Where should the JCo be installed? At the SAP server
or at the SAP Client side?
2) Is is possible to install the JCo at the SAP client
machine and call a Java method "testMethod" in class "com.test.pkg.TestClass" on the client machine
from ABAP? Do you have any sample code?
3) It seems authorization is required to
download the JCo from http://service.sap.com/connectors.
Does any one know an alternate link?
Thanks a lot in advance.

hi
good
go through the following links i hope this will give you the idea how to deal with JCO and JAVA.
https://media.sdn.sap.com/javadocs/NW04/SPS15/jc/com/sap/mw/jco/JCO.Connection.html
http://www.oio.de/seminar/java-with-sap-training-en.htm
http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.Connection.html
THANKS
MRUTYUN

Similar Messages

  • Question about  Jco conenctions/Logical name of the model and metadata

    Is it common to use the same logical name of the model and metadata across different enviroments?
    For example,  MODEL_DATA_DEST, META_DATA_DEST is used for DEV, QAS and PRD? Because i seem to have some trouble using code built in DEV to another environment if the logical name of the model and metadata is different.
    Thanks in advance

    Hi,
    No for every environment the logical name of the model and metadata are different...
    for eg: some logical names, 
    WD_RFC_METADATA_DEST
    WD_MODELDATA_DEST
    USERINFO_WD_RFC_METADATA_DEST
    USERINFO_WD_MODELDATA_DEST
    About JCo Details,
    SAP JCo Functions,Architecture,Applications,Installation,Client & Server Programming :
    http://help.sap.com/saphelp_nw70/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/frameset.htm
    Creating Jco destination:
    http://help.sap.com/saphelp_nw70/helpdata/en/3a/3b1b40fcdd8f5ce10000000a155106/frameset.htm
    Maintaining Jco destination:
    http://help.sap.com/saphelp_nw70/helpdata/en/94/3c1b40fcdd8f5ce10000000a155106/frameset.htm
    The SAP JCo Repository :
    http://help.sap.com/saphelp_nw70/helpdata/en/01/43e13d82fcfb34e10000000a114084/frameset.htm
    Dynamic Jco creation Blogs:
    /people/anilkumar.vippagunta2/blog/2007/02/06/dynamic-jco-creation
    /people/gregor.wolf3/blog/2004/09/23/from-function-module-to-jco-application--part-1-of-3

  • About JCO and XI

    Hello,
    I heard some people talking about end of support for JCO..I was wondering if some of you can confirm or not ? Is there any documents/roadmap about this ?
    Those guys were saying that with the promotion of SAP XI and therefore JRA, java proxies and so on..SAP would stop JCO...
    Thanks in advance for your answers !

    Dear Eric,
    JCO :
    SAP Java Connector (SAP JCo) is a middleware component that enables the development of SAP-compatible components and applications in Java. SAP JCo supports communication with the SAP Server in both directions: inbound calls (Java calls ABAP) and outbound calls (ABAP calls Java).
    JRA :
    SAP Java Resource Adapter (SAP JRA) is a J2EE -compatible connector for SAP systems. It enables the integration of SAP systems with J2EE application servers.
    This will help you to understand more
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/b55a4201301453e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5caa85b11d6b28500508b5d5211/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Regards
    Agasthuri Doss

  • A  problem about JCO

    Hi experts:
          I  meet a strange  problem,  i  deploy a webdynpro java   program which  use  rfc  module.  The SLD and JCO  connection was  good. When running this program , sometimes  it can used  but  sometime  it  run with error.
         The  error message like these:
         com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: CPIC-CALL: CMRCV on convId: 89492625
    LOCATION    CPIC (TCP/IP) on local host with Unicode
    ERROR       connection to partner '10.10.10.20:3300' broken
    TIME        Tue May 11 16:04:19 201
    RELEASE     701
    COMPONENT   NI (network interface)
    VERSION     38
    RC          -6
    MODULE      nixxi.cpp
    LINE        3960
    DETAIL      NiIWrite
    SYSTEM CALL writev
    ERRNO       32
    ERRNO TEXT  There is no process to read data written to a pipe.
    COUNTER     3
            at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:516)
            at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1514)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3980)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3417)
            at com.sap.mw.jco.JCO$Repository.execute(JCO.java:20577)
            at com.sap.mw.jco.JCO$Repository.queryFunctionInterface(JCO.java:20916)
            at com.sap.mw.jco.JCO$Repository.queryFunctionInterface(JCO.java:20602)
            at com.sap.mw.jco.JCO$Repository.getFunctionInterface(JCO.java:20706)
      How can do with it?
      Thank a lot!

    Hi,
    Please take a look at the below link.
    Hope this will help you.
    http://wiki.sdn.sap.com/wiki/display/EP/TroubleshootingSAPJavaConnector%28JCo%29
    Also check the system connection test.
    Regards,
    Sandip
    Edited by: Kundu Sandip on May 12, 2010 9:28 AM

  • Versions of ESS MSS business packs n about JCO jar file

    Hi Frndz..
    1)I want to know the versions of ESS n MSS busines pack
    2)Is there any jar file required while configuring JCO, if yes tell the name n use of that jar file
    Regards
    Rajesh
    09985516859

    Hello Rajesh,
    The versions are:
    ESS Business Pack 1.0 (Portal Content)
    ESS Business Pack 600 SP11 (Webdynpro Code)
    MSS Business Pack 1.0 (Portal Content)
    MSS Business Pack 600 SP11 (Webdynpro Code)
    There is no Jar file required in configuring jco's
    Regards,
    Shikhil

  • Getting notified about JCO.removeClientPool

    Hello,
    is there a way to be notified about removal of client pools? I have a PoolChangedListener in place, but it does not get called when the pool is removed.

    Hi,
    I suspect that is because you only have the one ID in use.
    I have the Apple ID  and my iPhone Number active.
    A second Apple ID used on a second iPhone and that iPhone number are also listed but Unticked (not active)
    All are shown in dark text.
    Messages only invokes Face Time to connect to a Messages Contact.
    It uses the ID you are using in FaceTime - no the one listed in Messages - although they can be the same.
    The issue might be if you are using Different ones
    The Invoking uses the Contact ID that is in the Chat.
    This means at your Contact's end their FaceTime is pulling your iMessages ID from Messages and trying to call that ID.
    It may not exist on the FaceTime Servers.
    The servers for both apps are separate for each other.
    9:40 pm      Monday; December 9, 2013
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Which RFC can read the Workflow Inbox about JCo

    Hello,
    I search the correct RFC to read the Workflow Inbox. I would like to develop a JAVA Class to connect the Inbox and then to show the workitems on a web screen. I use the SAP JCo to connect the SAP System. But until now, i don't found the correct RFC to connect the Workflow Inbox in the Workplace.
    Can anybody help me or know anybody the correct RFC?

    Hi
    Check this thread,
    BAPI to retrieve user's inbox items
    cheers
    Sameer
    PS: Assign points if you found the answer useful

  • Jco does not commit

    Hi experts.
    I have a problem with jco. I made a jsp page including jco that calls a CBO function module(RFC). When I run the page with debug mode, commit work is executed. But it's not work non-debug mode even though I execute 'BAPI_TRANSACTION_COMMIT' on the page. I don't know why it's not work. Below code is mine.
    public String fileDocTest(String doc, String doctype)       {
      JCO.Client client = null;
      JCO.Repository rep = null;
      JCO.Function function = null;
      JCO.Function function_comm = null;
      String rstring = "";
      String docnum ="";
      String temp = "1";
      String temp1 = "SAP-SYSTEM";
      try
        client = SAPConnectionPool.getInstance().getConnection();
        rep = new JCO.Repository(repositoryName, client);
        CreateFunction crtFnc = new CreateFunction(rep);
        CreateFunction crtFnc2 = new CreateFunction(rep);
        function_comm = crtFnc.createFunction("BAPI_TRANSACTION_COMMIT");
        function = crtFnc2.createFunction("Z_1EH_UPLOAD_DOC_2");
        JCO.setMiddlewareProperty("jco.middleware.allow_start_of_programs","ftp;sapftp;sapftpa;sapkprotp;http;saphttp;saphttpa");  
        JCO.Structure imp_f_table_00 = function.getImportParameterList().getStructure("DOCUMENTDATA");
         imp_f_table_00.setValue("CPD","DOCUMENTTYPE");
         imp_f_table_00.setValue("CFPDOC","DESCRIPTION");
        JCO.Table imp_f_table_01 = function.getTableParameterList().getTable("DOCUMENTDESCRIPTIONS");
         imp_f_table_01.appendRow();
         imp_f_table_01.setValue("EN","LANGUAGE");
         imp_f_table_01.setValue("CfPDoc","DESCRIPTION");
        JCO.Table imp_f_table_02 = function.getTableParameterList().getTable("DOCUMENTFILES");
         imp_f_table_02.appendRow();
         imp_f_table_02.setValue( "1","ORIGINALTYPE");
         imp_f_table_02.setValue( "SAP-SYSTEM","STORAGECATEGORY");                            imp_f_table_02.setValue(doc,"DOCPATH");     
         imp_f_table_02.setValue(doctype,"WSAPPLICATION");
         client.execute(function);
         client.execute(function_comm);
                                JCO.ParameterList exp_f_table = function.getExportParameterList();
      catch (Exception ex)
          ex.printStackTrace(); 
          System.out.println("Caught an exception: \n" + ex);
      finally
          JCO.releaseClient(client);
          return docnum;
    FM Z_1EH_UPLOAD_DOC_2 calls a standard FM API_DOCUMENT_MAINTAIN2.
    If you have any inforamtion about JCO commit error, please let me know.
    Regards.

    Hi Nils.
    Frankly I say, I try to commit in the source code of 'Z_1EH_UPLOAD_DOC_2" fucntion like below.
      CALL FUNCTION 'API_DOCUMENT_MAINTAIN2'
           EXPORTING: pf_transaction       = 'CV01'
                      documentdata         = documentdata
                      hostname             = hostname
                      change_number        = docbomchangenumber
                      valid_from           = docbomvalidfrom
                      revision_level       = docbomrevisionlevel
                      pf_ftp_dest          = pf_ftp_dest
                      pf_http_dest         = pf_http_dest
                      CAD_MODE             = CAD_MODE
           IMPORTING: documenttype         = documenttype
                      documentnumber       = documentnumber
                      documentpart         = documentpart
                      documentversion      = documentversion
                      return               = return
          TABLES:     characteristicvalues = characteristicvalues
                      classallocations     = classallocations
                      documentdescriptions = documentdescriptions
                      objectlinks          = objectlinks
                      documentstructure    = documentstructure
                      documentfiles        = documentfiles
                      longtext             = longtexts
                      components           = components.
       if return-type is initial or return-type =  'S'.
        commit work.
        if sy-subrc = 0.
          if return-type is initial.
            return-type = 'S'.
            return-message = documentnumber.
          endif.
        else.
          call function 'BAPI_TRANSACTION_COMMIT'
            exporting
              wait = 'X'.
          if sy-subrc = 0.
            return-type = 'S'.
            return-message = documentnumber.
          endif.
        endif.
      else.
        return-type = 'E'.
      endif.
    But, it's not work too. So, I tried to commit at JCO code. Is there any kind of problem?

  • Failed to resolve JCO destination

    Dear support,
    Recently we have made conection from our portal system to 4.7 system and Now we successfully login to portal.But when we click on ' Employee self service ' button we get below errors:
    The initial exception that caused the request to fail, was:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to resolve JCO destination name 'SAP_R3_SelfServiceGenerics_MetaData' in the SLD. No such JCO destination is defined in the SLD.
        at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter(JCOClientConnection.java:467)
        at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.init(AbstractJCOClientConnection.java:233)
        at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.<init>(AbstractJCOClientConnection.java:218)
        at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.<init>(JCOClientConnection.java:129)
        at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:149)
        ... 75 more
    I have checked SLD is running and is configured properly , i dont know anything about JCO destinations , this error is giving hint as
    Accessing the System Landsape Directory (SLD) failed. Depending on the concrete reason (see root cause) check the following:
    is the SLD Supplier in the J2EE engine configured correctly? See the SLD documentation for more details about the SLD and about how to configure it.
    are all JCO destinations maintained correctly? Use the preinstalled Web Dynpro Content Admin application to check/edit the destination. Use the Ping and Test functions of the Content Admin to
    I have gone through Blog
    Configuring SLD in Sneak Preview SAP NetWeaver '04 Sneak and all settings looks fine.
    Please make note this system has come recently under our maintainence and i am not much aware what exactly previous Administrator performed , But SLD is running fine.
    Can somebody help at earliest?
    Best Regards,
    AjitR

    Hi,
    Have you defined the JCO destinations in Web Dynpro Content Admin.
    If you havent, look at these link and configure the JCO Destinations required for ESS.
    http://help.sap.com/erp2005_ehp_01/helpdata/en/8c/cb3042366c0521e10000000a155106/frameset.htm
    http://help.sap.com/erp2005_ehp_01/helpdata/en/ca/115e4088dc0272e10000000a155106/frameset.htm
    Reward Points if helpful.
    Regards,
    Abhishek

  • Does JCo have connection limitation of 100?

    Hi, experts.
    I got complain from BASIS about JCo connection problem.
    The problem is basically every JCo can have only 100 connections to the maximum.
    Is this right?
    I thought configuration of JCo at WD management tool determines the maximum of the connections.
    Thanks for your help in advance.

    yes.
    create a environment variale CPIC_MAX_CONV = 500

  • Jco topics

    hi all
    i want learn more about jco topics.plz help me
    thanks
    hareesh

    Hi Hareesh,
    The SAP JCo can be downloaded from <a href="https://websmp101.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000463649">here</a>. The SAP JCo package includes the software as well as documentation, tutorial, and examples.
    See this link for <a href="http://www.sapgenie.com/faq/jco.htm">FAQ on JCO</a>.
    Regards,
    Pooja.

  • Some Jco questions

    Hi,
    I have some question about Jco:
    -is it needed to install Jco on the same server as R/3 run, or is it possible to run it on a own server?
    -is 2.0 the newest version=
    -Is there any support?
    thank you very much
    kindest regards
    Pete

    JCA is more of open architecture. JCO is home grown product from SAP to make java based systems talk to SAP.
    JCA is nothing but J2EE connector Architecture which is developed by SUN.
    I am definitely thinking, there is rewrite if you move to JCA from JCO.

  • JCO References

    Hi experts,
    I m having a pretty weird problem about JCO References.
    I was using WD_MODELDATA_DEST as my reference and then changed it to WD_MODELDATA_DEST_CATERING but after deploying the DC and then i try to retrieve data, i get the following error:
    Could not create JCOClientConnection for logical System: WD_MODELDATA_DEST - Model: class com.diagonal.sd.msmeal.model.SpecialMealModel. Please assure that you have configured the RFC connections and/or logical system name properly for this model!
    The strange thing is that i have already changed the logical system name to  WD_MODELDATA_DEST_CATERING  but the error still shows the old one. Even after a full restart, there is no difference. So i got no clue what is wrong since this should be a pretty straighforward configuration.
    FYI, the way i changed the logical system name is as follows:
    Under webdynpro perspective, right click on the root of the DC project and select properties and under webdynpro refereces i selected JCO references. After i did that i rebuilt the project and deploy.
    Thanks in advance.
    Best Regards,
    Daniel

    Hi Daniel,
    Check out this blog from Bertram Ganz. It may help you.
    /people/bertram.ganz/blog/2006/01/27/web-dynpro-adaptive-rfc--how-to-change-logical-system-names-after-model-import
    Regards,
    Gopal

  • JCO Connect Exception for connecting to ABAP system

    Hey Guys,
    When running the program
    [code]import com.sap.mw.jco.*;
    public class TutorialConnect1 extends Object {
       JCO.Client mConnection;
       public Connect1() {
         try {
           // Change the logon information to your own system/user
           mConnection =
              JCO.createClient("100", // SAP client
                "RFCUSER2"// userid
                "RFCUSER2", // password
                null, // language
                "LABR3", // application server host name
                "00"); // system number
           mConnection.connect();
           System.out.println(mConnection.getAttributes());
           mConnection.disconnect();
        catch (Exception ex) {
          ex.printStackTrace();
          System.exit(1);
      public static void main (String args[]) {
        Connect1 app = new Connect1();
    [/code]
    I get the exception
    [code]java.lang.NoClassDefFoundError
         at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:836)
         at com.sap.mw.jco.JCO$Client.connect(JCO.java:3159)
         at com.ids.jco.JCOUtil.getClient(JCOUtil.java:37)
         at com.ids.jco.JCOUtil.main(JCOUtil.java:23)[/code]
    My program in the developer studio compiles just fine, I have added all the libraries in the developer studio. In the "set additional libraries" context menu of the project I have included all the libraries.
    In the Debug/Run settings I see all the libraries included when I test the program.
    I am running the program on Netweaver Developer Studio SP15
    Any help is appreciated.
    Regards
    Sumit.

    Hi Sumit,
    the exact problem is discussed in this forum..just check this....
    Re: Some problems about JCo >.<
    let me know...
                           Regards
                           Kishor Gopinathan

  • Basic JCO Information

    I'm in the process of learning how to create custom business objects within the ISA framework.  I have been able to create a customer business object manager and a custom business object.
    I'm attempting to call the BAPI_CURRENCY_GETLIST function module and return a list of all currencies that SAP supports.  I'm able to execute the function, but I'm confused what I need to do next.  From what I understand the getExportParameterList() call on a JCoFunction will allow me to access objects that the bapi call returns.
    Again, the objective is very simple.  I'm trying to do is use the JCO object to return a list of currencies. 
    Also, I'm rather confused when I should be using a Structure and when I should be using a Table.  I don't understand the differences between these two objects.
    I appreciate the guidance, and thank you for being patient with me!

    Hi Brian,
    In simple word the difference between  JCO.Table and JCO.Structure is as follow.
    A structure is basically a special case of a table that has exactly one row.
    So in simple word when you know that your BAPI or RFC is going to return only one row or nothing then you can use JCO.Structur but if your BAPI/BADI or RFC will return more then 1 row then you have to use Table.
    You can not handle more then 1 row with JCO.Structure.
    So when there is a possiblilty that you can have more then one row use JCO.Table. If you are sure that BAPI/BADI or RFC will return only one row or nothing then use JCO.Structure.
    I hope this information will clear your confusion about JCO.Table and JCO.Structure.
    Regards.
    eCommerce Developer.

Maybe you are looking for

  • My $20 to the person who can write this simple script for Fission

    Here is what I need to automate. I don't care if it's an Apple Script, or an Automator work flow - whatever - just so it will work with my present setup. Once I test it and it works, I'll send $20 to the first person who can help me. Script needs to

  • Options to create IDOC in IDOC Flatfile

    Hi, we have requirement to process a fixed length file and map that structure to a standard IDOC and that IDOC has to be written out as IDOC flat file.I just want to get different opinions to see whether there are any other options other than using A

  • How do I put a contact group into the address of an email

    The email form does not have an address icon.  How do I get a group from the address into the address field of a new email?

  • Indesign and Premier Problems

    Indesign crashes every time I try to use the Text Tool and Premier won't even open...Please help!

  • Adobe AIR for TV in 2014?

    Hello, I've been using Adobe AIR in the latest years to build mobile apps, but I've never used it for TV apps. The info I've seen about AIR for TV is mostly talking about very old versions of AIR (2.5). Is that still supported? What TVs are compatibl