Java Connector (JCO) desupported?

Dear all,
does somebody know whether the Java Connector (JCO) will be desupported and if so when?
I would like to use it in a new project because it may be easier to introduce than the whole XI infrastructure.
But if there is an official desupport notice I have to switch my strategy.
If this may be the wrong forum please advise me to the right one.
Thanks in advance,
Frank

As far as I know,JCo is needed for the communication between ABAP stack and JAVA stack.In XI , ABAP stack and JAVA stack are mandatory and you need JCo.
"I would like to use it in a new project because it may be easier to introduce than the whole XI infrastructure."
Can you be a little more clearer abt what u mean by the above statement.

Similar Messages

  • ABAP to Java Connector (JCo)

    Hi All,
    Currently this is what I have:
    ABAP program uses OPEN SQL of course collect information from SAP database, then using NATIVE SQL goes thru DBCON to transfer information directly to another application (Non SAP system) database (not SAP database).
    I just dont like this idea anymore since I was reading about the Java Connector.
    So what I want to do is...Not sure feasible this is where I need your help on:
    Remove all my NATIVE SQL statements, use JCo and rewrite those statements in Java language and communicate to the Non SAP application thru their API (their API is also Java base)
    Will reward points.
    Tim

    hi,
    you will find more info on.
    http://www.sapgenie.com/faq/jco.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/47/80f671ee6e4b41b63c0fe46bd6e4f8/content.htm
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci854012,00.html
    http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-64134159551ecde70_glossary/S
    for installing JCO zip file...
    http://help.sap.com/saphelp_nw04/helpdata/en/47/80f671ee6e4b41b63c0fe46bd6e4f8/content.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/mysap4/mysap437.htm
    You simply have to have a connection with SAP system and then you can call BAPI with which you can read / update the data in the SAP system.
    Hope this info proves useful.
    Regards,
    Richa.

  • Java Connector (Jco) sizing in a NW2004s cluster

    Hi All,
    We have an EP7 cluster with 3 x SAP J2EE engines (multiple dispatcher and server processes running on multiple hardare).  I am looking at sizing the Jco connection pools for ESS and MSS applications.  This will involve changing the parameters against the Jco connection destinations - like 'maximum pool size' and 'maximum connections'.  My question is, if for instance I was to change the 'maximum pool size' from the default value '5' -> '50', being that we have 3 J2EE engines, does this mean that potentially we could have 150 (3 x 50) connections allowed to the backend ABAP system ?  Or are these settings global ? I can't seem to find a definite answer to this.
    Thanks for your time,
    Regards
    Anthony

    See if these links help explain further:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/3a/3b1b40fcdd8f5ce10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8b/91222fa9e611d6b28f00508b6b8a93/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/09/a4a9e1d51d11d6b2c200508b5d5c51/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e8/bda7c0cef411d6b2bd00508b5d5211/frameset.htm

  • DI Java Connector

    Hello All,
    First of all i have to say that im sick of searching abt this.......so if anyone can help it'll mean a lot to me. im trying to connect to SAP Business One from Java, in the SDK help file it says that i can connect to B1 through DI API, but how can i do it with Java???...........it says to use "SAPbobsCOM67.dll" file to connect with java....how can i do this??........and it says it includes the packages "com.sap.smb.sbo.api" , "com.sap.smb.sbo.util" , "com.sap.smb.sbo.wrapper.util" but i cant find it......i downloaded the SAP JCo 2.0 too from SAP Service Market Place....but it only has classes to connect to SAP R/3 System. What i need to do is connect to Business One with pure Java Code........using those class packages i listed above....but i don't seem to find it on the internet.....somebody pls help me on this.....because im not into VB .Net.... Thanks.

    Hi Malinda,
    You have to install the DI API and the SBO SDK to have the Java Connector (JCO)libraries and to have the JCO help file.
    In basic the API is the same as with .NET, but there are some differences.
    You can scan this forum for some samples.
    Regards
    Ad

  • Additional runtime license fees per user in order to use the Java connector

    Hi All,
    I have one question.
    Do we require to pay additional runtime license fees per user in order to use the Java connector (Jco) supplied by SAP?
    We're currently not using the Jco but are looking into the possibility of using it.
    Thank in Advance.

    Hi All,
    Please answer my question
    We need to use Jco to connect to our 4.6C SAP production system. We do not have Portal or any other components. It's just a plain 4.6C system, service pack level is 23.
    We are currently paying license fees for using the system on a per user basis.
    Thank You.

  • Thru Java connector to update SAP by BAPI

    Dear...
    How to bring the data from external application through the Java connector to SAP?  Pls help....

    Hai Check the following Document & Links
    Bapi to create customer master 
    BAPI_CUSTOMER_CREATEFROMDATA
    BAPI_CUSTOMER_CREATEFROMDATA1
    Or you can use FM SD_CUSTOMER_MAINTAIN_ALL
    what is BAPI?
    BAPI stands for Business API(Application Program Interface).
    I have answered this question before..
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    Check these Links out
    http://searchsap.techtarget.com/ateQuestionNResponse/0,289625,sid21_cid558752_tax293481,00.html
    http://www.sap-img.com/abap/interview-question-on-bapi-rfc-abap-objects-tables.htm
    http://www.sap-img.com/fu033.htm
    http://www.sap-img.com/abap/ale-bapi.htm
    Please check out this thread..
    Re: bapi
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    <b>Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    Java Connector(JCO) can call not only BAPI's but also the function modules which are remotely enabled..
    BAPI's as i said earlier are remotely enabled function modules..
    Hence, JCO can call also BAPI's(n not only BAPI's as u mentioned).</b>
    Thanks & regards
    Sreenivasulu P

  • IPV6 support by SAP Java Connector (SAP JCo)

    Hi there,
    Does anyone know if IPV6 is supported by SAP Java Connector (SAP JCo) ?
    Thanks

    See http://help.sap.com/saphelp_nwmobile71/helpdata/en/46/cd5ee2c45365dde10000000a155369/content.htm
    but unfortunately I couldn't make it work. Has anyone made it work? thanks,

  • JCo( Java Connector)

    Hi Guys,
    Any one give some info abt JCo( Java Connector). Thanks in advance.
    Thanks
    Kiran.B

    Hi Kiran,
    Check the following example
    SAP Java Connector - Excample 1: Simple RFC call
    Scenario
    We will call the RFC function module ZNAS_HIE1_GET_MEMBER_FARM.that returns members that have owned a farm. Input to the function is a farm number, and output is a table of members that have owned the farm and Owner number (Sequence number of owners).
    Class testJCO is excuted and calls class GetMemberFarm method GetMemberFarmFromSap. Input parameters to GetMemberFarm are Farm and Owner number.
    GetMemberFarmFromSap executes RFC ZNAS_HIE1_GET_MEMBER_FARM, that returns a table of members that have owned the farm from the input parameters.
    GetMemberFarmFromSap loops through the table and finds the member where ZZCHCODE (Owner numer), is equal owner number from the input-parameters. and returns the member.
    Code
    Class testJCO
    public class testJco
         public static void main(String[] args)
              GetMemberFarm testGetMemberFarm = new GetMemberFarm();
              String memberFarm= testGetMemberFarm.GetMemberFarmFromSap("0111020155","02");
              System.out.println("Memberfarm: " + memberFarm);
    Class GetMemberFram
    import com.sap.mw.jco.*;  //The JCO
    public class GetMemberFarm {
      public String GetMemberFarmFromSap(String farm, String OwnerNumber)   
      {  String zzmemb ="";
            String memberFarm = "";
         JCO.Repository mRepository;
         JCO.Client mConnection = null;
         JCO.Function myFunction = null;
         //Create Connection to SAP
           try
                mConnection = JCO.createClient("800",           //SAP client
                                            "HFR",       //User ID
                                            "vimmer3",     //Password
                                            "EN",            //Language
                                            "53.205.22.71", //Host
                                            "03");           //System
             mConnection.connect();
             System.out.println("Connection OK");
           catch (Exception ex)
                System.out.println(ex);
          // Create function and parameters
          try
            //Create repository
            mRepository = new JCO.Repository( "GetMember", mConnection );
            //Get a function template from the repository
            IFunctionTemplate ftemplate = mRepository.getFunctionTemplate("ZNAS_HIE1_GET_MEMBER_FARM");
            //Create function
            myFunction = new JCO.Function(ftemplate);
            System.out.println("Function created");
            //Set import parameter
            JCO.Field zzfarm = myFunction.getImportParameterList().getField("ZZFARM");
            zzfarm.setValue(farm);
            System.out.println("Parameters ok");
         catch (Exception ex)       
              System.out.println(ex);
         // Execute function
         try
              mConnection.execute(myFunction);
            System.out.println("RFC Call OK");          
         catch (Exception ex)      
          {  System.out.println(ex); //Exception from function          
         // Handle return table GT_HIERARCHY
         // Loop over the table and find the record that
         // has ZZCHCODE = OwnerNumber from the
         // method parameters, and return Member for the
         // record
         JCO.Table gt_HIERARCHY = null;
         try
              gt_HIERARCHY=myFunction.getTableParameterList().getTable("GT_HIERARCHY");
              //Loop thhrough table and return the member that has
              // changecode (ZZCHCODE) = 02
              for (int i = 0; i < gt_HIERARCHY.getNumRows(); i++)
              {   gt_HIERARCHY.setRow(i);
                  String zzchcode = gt_HIERARCHY.getString("ZZCHCODE");
                  if (zzchcode.equals(OwnerNumber))                        
                       zzmemb = gt_HIERARCHY.getString("ZZMEMB");                   
         catch (Exception ex)      
          {  System.out.println(ex);           
         // Disconnect from SAP
         try
             mConnection.disconnect();  
             System.out.println("Disconnected from SAP");
          catch (Exception ex)
               System.out.println(ex);
          return zzmemb;
    } //public class GetMemberFarm
    Tips and tricks for the Java connector
    How to set and import parameter - Field
    Give the import parameter SALESDOCUMENT the value "00006973":
    JCO.Field SalesDocumentField = jcoFunction.getImportParameterList().getField("SALESDOCUMENT");
    SalesDocumentField.setValue("00006973");
    How to handle an import parameter - Table
    JCO.Table ORDER_PARTNERS = jcoFunction.getTableParameterList().getTable("ORDER_PARTNERS");
    ORDER_PARTNERS.appendRow();
    ORDER_PARTNERS.setValue("AG","PARTN_ROLE");
    ORDER_PARTNERS.setValue("0000001032","PARTN_NUMB");
    How to handle an import parameter - Structure
    JCO.Structure order_header_inx = jcoFunction.getImportParameterList().getStructure("ORDER_HEADER_INX");
    order_header_inx.setValue("I","UPDATEFLAG");
    order_header_inx.setValue("X","DOC_TYPE");
    How to handle an export parameter - Table
    JCO.Table myTable = jcoFunction.getTableParameterList().getTable("STATUSINFO");
    for (int i=0; i < myTable.getNumRows(); i++)
      myTable.setRow(i);
      // Retrieve the value of the field DOC_DATE
      oDocDate = myTable.getField("DOC_DATE").getValue();
    How to handle BAPI return table
    Meesage type and message is stored in vector bapiReturn.
    Vector bapiReturn;
    JCO.Table jcoReturn = jcoFunction.getTableParameterList().getTable("RETURN");
        for (int i = 0; i < jcoReturn.getNumRows(); i++)
        { jcoReturn.setRow(i);
          String Message = jcoReturn.getField("TYPE").getValue() + " " +
                           jcoReturn.getField("MESSAGE").getValue();
          bapiReturn.setSize(i + 1);
          bapiReturn.setElementAt(new String(Message),i );
    Using COMMIT
        try
         { // Get a function template from the repository
           IFunctionTemplate ftemplate = mRepository.getFunctionTemplate("BAPI_TRANSACTION_COMMIT");
           // Create a function from the template
           jcoCommit = new JCO.Function(ftemplate);
           if ( jcoCommit == null )
             // Do something..;
        catch (Exception mException)
         {  mException.printStackTrace(); }
        // Execute COMMIT
        try
         { sapConnection1.mConnection.execute(jcoCommit);
        catch (Exception mException)
         { mException.printStackTrace(); }
    Thanks and Good Luck
    AK

  • SAP Business One - Java Connector

    Hi All,
    <br/><br/>
    We have a SAP Business One Application installed on a laptop. The requirement is to be able to use the SAP Java API to update tables in the system. We are not allowed to connect directly to the database and was advised to use the API instead.
    <br/><br/>
    The downloaded API that we are using is "sapjco30P_6-10005324 32 bit.zip". I have included the dll file contained in this package in the WINDOWS/system32 folder. I am using Eclipse as IDE and already included the "sapjco3.jar" in the classpath.
    <br/><br/>
    First question: Am I using the right Java Connector for SAP Business One?
    <br/><br/>
    I got sample code on how to connect using JCO:
    <br/><br/>
    package sample;<br/><br/>
    import java.io.File;<br/>
    import java.io.FileOutputStream;<br/>
    import java.util.Properties;<br/>
    import java.util.concurrent.CountDownLatch;<br/><br/>
    import com.sap.conn.jco.AbapException;<br/>
    import com.sap.conn.jco.JCoContext;<br/>
    import com.sap.conn.jco.JCoDestination;<br/>
    import com.sap.conn.jco.JCoDestinationManager;<br/>
    import com.sap.conn.jco.JCoException;<br/>
    import com.sap.conn.jco.JCoField;<br/>
    import com.sap.conn.jco.JCoFunction;<br/>
    import com.sap.conn.jco.JCoFunctionTemplate;<br/>
    import com.sap.conn.jco.JCoStructure;<br/>
    import com.sap.conn.jco.JCoTable;<br/>
    import com.sap.conn.jco.ext.DestinationDataProvider;<br/><br/>
    public class StepByStepClient<br/>
    {<br/>
        static String ABAP_AS = "ABAP_AS_WITHOUT_POOL";<br/>
        static String ABAP_AS_POOLED = "ABAP_AS_WITH_POOL";<br/>
        static String ABAP_MS = "ABAP_MS_WITHOUT_POOL";<br/>
        static<br/>
        {<br/>
            Properties connectProperties = new Properties();<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "localhost");<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR,  "06");<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "000");<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_USER,   "manager"); //sapuser<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "manager"); //sap1234<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   "en");<br/>
            createDataFile(ABAP_AS, "jcoDestination", connectProperties);<br/><br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, "3");<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT,    "10");<br/>
            createDataFile(ABAP_AS_POOLED, "jcoDestination", connectProperties);<br/><br/>
            connectProperties.clear();<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_MSHOST, "localhost");<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_R3NAME,  "SID");<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "000");<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_USER,   "manager"); //sapuser<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "manager"); //sap1234<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_GROUP, "GROUP");<br/>
            connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   "en");<br/>
            createDataFile(ABAP_MS, "jcoDestination", connectProperties);<br/>
        }<br/><br/>
        static void createDataFile(String name, String suffix, Properties properties)<br/>
        {<br/>
            File cfg = new File(name"."suffix);<br/>
            if(!cfg.exists())<br/>
            {<br/>
                try<br/>
                {<br/>
                    FileOutputStream fos = new FileOutputStream(cfg, false);<br/>
                    properties.store(fos, "for tests only !");<br/>
                    fos.close();<br/>
                }<br/>
                catch (Exception e)<br/>
                {<br/>
                    throw new RuntimeException("Unable to create the destination file " + cfg.getName(), e);<br/>
                }<br/>
            }<br/>
        }<br/><br/>
        public static void step1Connect() throws JCoException<br/>
        {<br/>
            JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS);<br/>
            System.out.println("Attributes:");<br/>
            System.out.println(destination.getAttributes());<br/>
            System.out.println();<br/><br/>
            destination = JCoDestinationManager.getDestination(ABAP_MS);<br/>
            System.out.println("Attributes:");<br/>
            System.out.println(destination.getAttributes());<br/>
            System.out.println();<br/>
        }<br/><br/>
        public static void main(String[] args) throws JCoException<br/>
        {<br/>
            step1Connect();<br/>
        }<br/>
    }<br/>
    <br/><br/>
    Each time I run the application I run into an error:
    <br/><br/>
    Attributes:<br/>
    Exception in thread "main" com.sap.conn.jco.JCoException: (102) JCO_ERROR_COMMUNICATION: Connect to SAP gateway failed<br/>
    Connection parameters: TYPE=A DEST=ABAP_AS_WITHOUT_POOL ASHOST=localhost SYSNR=06 PCS=1<br/><br/>
    LOCATION    CPIC (TCP/IP) on local host with Unicode<br/>
    ERROR       connection to partner '127.0.0.1:3306' broken<br/>
    TIME        Mon May 09 10:46:46 2011<br/>
    RELEASE     720<br/>
    COMPONENT   NI (network interface)<br/>
    VERSION     40<br/>
    RC          -6<br/>
    MODULE      gwxx.c<br/>
    LINE        646<br/>
    DETAIL      NiIRead: P=127.0.0.1:3306; L=0.0.0.0:50496<br/>
    SYSTEM CALL GwRead<br/>
    ERRNO       10054<br/>
    ERRNO TEXT  WSAECONNRESET: Connection reset by peer<br/>
    COUNTER     2<br/><br/>
         at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:662)<br/>
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1362)<br/>
         at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:721)<br/>
         at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:103)<br/>
         at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:293)<br/>
         at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:46)<br/>
         at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:262)<br/>
         at com.sap.conn.jco.rt.RfcDestination.initialize(RfcDestination.java:509)<br/>
         at com.sap.conn.jco.rt.RfcDestination.getAttributes(RfcDestination.java:347)<br/>
         at com.sap.conn.jco.rt.RfcDestination.getAttributes(RfcDestination.java:27)<br/>
         at sample.StepByStepClient.step1Connect(StepByStepClient.java:74)<br/>
         at sample.StepByStepClient.main(StepByStepClient.java:304)<br/>
    Caused by: RfcException: [null]<br/>
        message: Connect to SAP gateway failed<br/>
    Connection parameters: TYPE=A DEST=ABAP_AS_WITHOUT_POOL ASHOST=localhost SYSNR=06 PCS=1<br/>
    <br/><br/>
    Second question: What seems to be the problem with my sample application? Do I need to use a different Java Connector for SAP Business One or SAP Business One does not support Java Connector?
    <br/><br/>
    Please help.
    <br/><br/>
    Thank you all.
    Edited by: kevinroy on May 9, 2011 4:51 AM

    Hi,<br/>
    Thank you very much for the reply. I am now able to move forward with what I am doing.<br/>
    I used the following code in connecting but am encountering an error:<br/>
    public class ConnectSAP {
         // company interface
         public ICompany company;
         private SBOErrorMessage errMsg = null;
         public static void main(String[] args) {
              ConnectSAP company = new ConnectSAP();
              company.conn();
         //method make connection andinitialize company instance
         public int conn() {
              int rc = 0;
              try {
                   company = SBOCOMUtil.newCompany();
                   company.setServer("192.168.0.216"); //192.168.0.216
                   company.setCompanyDB("SBODemoUS");
                   company.setUserName("manager");
                   company.setPassword("manager");
                   company.setDbServerType(SBOCOMConstants.BoDataServerTypes_dst_MSSQL2005);
                   company.setUseTrusted(new Boolean(false));
                   company.setLanguage(SBOCOMConstants.BoSuppLangs_ln_English);
                   company.setDbUserName("username"); 
                   company.setDbPassword("password");
                   //company.setAddonIdentifier("...");     
                   //company.setLicenseServer("...");
                   rc = company.connect();
                   if (rc == 0) {
                        System.out.println("Connected!");
                   } else {
                        errMsg = company.getLastError();
                        System.out.println(
                             "I cannot connect to database server: "
                                  + errMsg.getErrorMessage()
                                  + " "
                                  + errMsg.getErrorCode());
              } catch (Exception e) {
                   e.printStackTrace();
                   return -1;
              return rc;
         public void freeConnection(){
              company.disconnect();
    }<br/>
    I am getting the error "Failed to Connect to SBOCommon -111".<br/>
    Error is still the same even if I set UseTrusted to true and comment the DbUserName and DbPassword.<br/>
    Do I need to specify the license? Or login to SAP before connecting?<br/>
    Thank you.

  • How to get pdf file from sap presentation server using java connector

    Hi Friends,
    with the below code i am able to get po details in pdf in presentation server.
    DATA : w_url TYPE string
           VALUE 'C:\Documents and Settings\1011\Solutions\web\files\podet.pdf'.
    CALL FUNCTION 'ECP_PDF_DISPLAY'
            EXPORTING
              purchase_order       = i_ponum
           IMPORTING
      PDF_BYTECOUNT        =
             pdf                  = file  " data in Xsting format
    *Converting Xstring to binary_tab
          CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
            EXPORTING
              buffer                = file
      APPEND_TO_TABLE       = ' '
    IMPORTING
      OUTPUT_LENGTH         =
            TABLES
              binary_tab            = it_bin " data in binary format
    **Downloading into PDF file
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
      BIN_FILESIZE                    =
              filename                        = w_url
              filetype                        = 'BIN'
             TABLES
              data_tab                        = it_bin
    when i am using java connector , to retirve the file from presentation server , the follwoing error i am getting...
    init:
    deps-jar:
    compile-single:
    run-single:
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Error in Control Framework
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1244)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3842)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3287)
            at PdfGen.<init>(PdfGen.java:35)
            at PdfGen.main(PdfGen.java:78)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 1 second)
    i debugged too, problem with <b>gui_download......</b>
    I am very glad to all with your suggestions!!
    Regards,
    Madhu..!!

    Hi
    You can try to create an external command (transaction SM69).......sorry I've forgotten,,,,they works on application
    How do you call CL_GUI_FRONTEND_SERVICES=>EXECUTE?
    Max
    Edited by: max bianchi on Oct 13, 2011 10:27 AM

  • Is this possible: SAP Java Connector - XI - R3 with XI RFC Adapter?

    Hi,
    I try to call a RFC on a remote R/3 System over the XI Server in a Java Application with SAP Java Connector.
    I have configured a RFC Sender Adapter in XI. I get the
    following Exception:
    "lookup of alternativeServiceIdentifier via CPA-cache failed for channel 'SenderChannel_RFC"!
    Is this scenario possible? Or do the connection from
    a SAP Java Connector App to the XI RFC Adapter not work?
    You can't set the Client and System ID of a Third-Party or
    Standalone Java system in the SLD.
    Thanks for any help!
    Regards
    Wolfgang

    Hi,
    We use a JCO for directly connecting to sap systems.
    In that case we need not use any XI also.
    But if you want to use RFC adapter and java application the best way is to use java proxies as sender and reciever as RFC adapter.
    I donot think there is any  architectural significance in using rfc adapter of XI while using JCO.
    Let me know if I mis-understood the context.

  • Using Java Connector Calling RFC.....But it's not returning correct result

    Hi Friends,
    In the code ....
    I am calling Remote Function module ZRFC_PO_VEND_VALID using java connector and passing PO_Number and Vendor Number as input parameters and after execution it returns (E_POVALID =1 [PO_NUMBER exists for Vendor number] otherwise E_POVALID = 0 )
    when i am executing the below code ....in both cases it is returning Zero value.
    I tested the function module in se37 its working....
    may i know the reason for this....
    import com.sap.mw.jco.*;
    @author Thomas G. Schuessler, ARAsoft GmbH
    http://www.arasoft.de
    public class TutorialBapi1 extends Object {
    JCO.Client mConnection;
    JCO.Repository mRepository;
    public TutorialBapi1() {
    try {
    // Change the logon information to your own system/user
    mConnection =
    JCO.createClient("100", // SAP client
    "abap", // userid
    "abap", // password
    "en", // language
    "sapdev1", // application server host name
    "00"); // system number
    mConnection.connect();
    mRepository = new JCO.Repository("ARAsoft", mConnection);
    catch (Exception ex) {
    ex.printStackTrace();
    System.exit(1);
    JCO.Function function = null;
    JCO.Table codes = null;
    try {
    function = this.createFunction("ZRFC_PO_VEND_VALID");
    if (function == null) {
    System.out.println("ZRFC_PO_VEND_VALID" +
    " not found in SAP.");
    System.exit(1);
    //mConnection.execute(function);
    JCO.Field vendID = function.getImportParameterList().getField("I_EBELN");
    JCO.Field poID = function.getImportParameterList().getField("I_LIFNR");
    vendID.setValue("20081");
    poID.setValue("4500000017");
    try {
    mConnection.execute(function);
    catch (Exception ex) {
         ex.printStackTrace();
         System.exit(1);
    JCO.Field povalid =
         function.getExportParameterList().getField("E_POVALID");
    //if (povalid.getValue() == null ){
         // System.out.println("Error Message");
    System.out.println(povalid.getValue());
         //if (povalid == null ){
              //System.out.println(povalid.getValue("E_POVALID"));
              //System.out.println("Error Message");
              //System.exit(1);
    catch (Exception ex) {
         ex.printStackTrace();
         System.exit(1);
    mConnection.disconnect();
    public JCO.Function createFunction(String name) throws Exception {
         try {
         IFunctionTemplate ft =
         mRepository.getFunctionTemplate(name.toUpperCase());
         if (ft == null)
         return null;
         return ft.getFunction();
         catch (Exception ex) {
         throw new Exception("Problem retrieving JCO.Function object.");
         public static void main (String args[]) {
         TutorialBapi1 app = new TutorialBapi1();
    with warm regards,
    Madhu.

    Hi Ravi ,
    I tried as per your sugggestion..still getting the same problem.
    Regards,
    Madhu!!

  • Integrating SAP Java Connector with SAP XI

    Hi XI experts
    We are about to integrate our SAP ERP2004 system with a new WMS system.  The vendors of the WMS system normally integrates with ERP directly through SAP Java Connector, but we would like to put SAP XI between the two systems so we have good way of monitoring the messages beeing sent.
    I would like to make a synchronous test scenario where we send a ARTMAS idoc from SAP to XI which sends it to the WMS. After WMS system receives the ARTMAS Idoc it sends an acknowledgement back to XI which passes it on to SAP.
    The integration would then look like this:
    SAP ERP <-> SAP XI <-> WMS (Jco)
    Is this scenario possible? And if so, how would you suggest to set it up?
    I was thinking of using the RFC adapter to connect to the Java Connector of WMS, but am not sure if this is the right approach or how it should be set up.
    Any help or comments would be greatly appreciated.
    Best Regards
    Chris

    I have made a setup like this:
    SAP <-> XI <-> WMS
    The Scenario is like this:
    SAP sends an ARTMAS03 idoc to XI which maps it directly to the same ARTMAS03 idoc structure (need a few changes in the future so thats why im not using IDOC tunnelling) then it uses a RFC receiver adapter to connect to our SAP gateway, where the WMS is registrered through JCO.
    When I first sent the idoc, i got a "RfcAFWException: failed to read funtionname from XML document: missing namespace declaration(2)" then after reading Q23 in note 730870, I used the RFCNormalizer xslt to change the namespace to a "urn:sap-com:document:sap:rfc:fuctions" instead of the "urn:sap-com:document:sap:idoc:messages". The error is now "functiontemplate from repository was <null>".
    As far as i can see the error is because the metadata repository defined in the RFC adapter cant find the function module that normally would be in the root of a RFC-XML. But I dont know how I can send an Idoc through the rfc adapter to the gateway then. Anyone got some ideas?
    Thanks
    Chris

  • Java Connectors

    Hello Experts,
    We have a real time requirement for getting data from r3 to bi and none of our data sources are delta enabled.
    So we are planning to use java connectors for this. I found that the SAP Query Connector could report realtime from BI or R3. But we need something which gets data from r3 to BI.
    Can you please lead me by guiding me towards the connectors that could be used for getting data from r3 to bi realtime?
    thanks,
    Sri.
    P.S. I promise to award points for helpful answers. Thanks Again!
    Message was edited by:
            Srirama Chandra

    use jco interface to get data from r/3

  • Download Sap Java connector

    Where can I download sap jco?

    Hi Alfonso !!!
    You can navigate through http://service.sap.com/connectors
    it's the place for all kind of SAP Connectors family.
    So, under the option *Overview choose SAP Java Connector link, at this point the left navigation menu will be wide open, so the last step is be able to find there the option "Tools&Services", the page with title Tools & Services: Support and Release Strategy, License Terms, Software Download will be opened, there is the place where you can find all versions of JCO for all supported OS.
    Be sure you also have an "SS" user (Sap Service User like SXXXXXXXXX) to certify your access to this link.

Maybe you are looking for