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.

Similar Messages

  • 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.

  • 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

  • How ABAP and JAVA stacks are connecting

    Hi Experts,
    I have a doubt in pi. We are developing Message Mapping in IR, it means it is running on JAVA STACK. But we are checking any mapping error in SXMB_MONI which will run on ABAP STACK.
    Now My doubt is " How JAVA and ABAP stacks are connecting to each other and How we are able to see Mapping error in Integration Engine which resides on ABAP stack even though we create Mapping in IR which runs on Java".
    Thanks&Regards ,
    Gajapathi.

    Hi Gajapathi,
    How JAVA and ABAP stacks are connecting to each other
    PI manages using single database for both JAVA and ABAP servers. But both access them using different schema. They connect using RFC protocol via SAP Java Connector (JCo Connector).
    How we are able to see Mapping error in Integration Engine
    which resides on ABAP stack even though we create Mapping in IR which runs on Java".
    So when you create a object be it mapping or interface or any XI objects, it is stored in Single Database. When you use ABAP sxmb_moni for monitoring the message, it uses ABAP related schema to access the message.
    I hope it answers you query.
    Regards
    Ramesh

  • 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

  • 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.

  • ABAP to Java - JCo error

    I followed all the instructions in Gregor's blog: /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    This is based on the Example5.java that comes bundled with JCo software. I was able to start the server, I was able to  successfully test my RFC destination, but when I actually run by ABAP program the return error is:
    JCO.Server could not find server function 'JCOSERVER01'
    I am running the java code on my local machine on eclipse. And in the console this is what I get after the call from the ABAP program:
    Server JCOSERVER01 changed state from [ STOPPED ] to [ STARTED ]
    Server JCOSERVER02 changed state from [ STOPPED ] to [ STARTED ]
    Server JCOSERVER02 changed state from [ STARTED ] to [ STARTED  LISTENING ]
    Server JCOSERVER01 changed state from [ STARTED ] to [ STARTED  LISTENING ]
    Server JCOSERVER01 changed state from [ STARTED  LISTENING ] to [ STARTED  LISTENING  BUSY ]
    Exception in server JCOSERVER01:
    com.sap.mw.jco.JCO$Exception: (120) JCO_: JCO.Server could not find server function 'JCOSERVER01'
    com.sap.mw.jco.JCO$Exception: (120) JCO_: JCO.Server could not find server function 'JCOSERVER01'
         at com.sap.mw.jco.rfc.MiddlewareRFC$Server.nativeListen(Native Method)
         at com.sap.mw.jco.rfc.MiddlewareRFC$Server.listen(MiddlewareRFC.java:1395)
         at com.sap.mw.jco.JCO$Server.listen(JCO.java:7067)
         at com.sap.mw.jco.JCO$Server.run(JCO.java:6996)
         at java.lang.Thread.run(Thread.java:534)
    Server JCOSERVER01 changed state from [ STARTED  LISTENING  BUSY ] to [ STARTED  LISTENING ]
    Server JCOSERVER01 changed state from [ STARTED  LISTENING ] to [ STARTED ]
    Server JCOSERVER01 changed state from [ STARTED ] to [ STOPPED ]
    Server JCOSERVER01 changed state from [ STOPPED ] to [ STARTED ]
    Server JCOSERVER01 changed state from [ STARTED ] to [ STARTED  LISTENING ]
    Server JCOSERVER01 changed state from [ STARTED  LISTENING ] to [ STARTED  LISTENING  BUSY ]
    Pls help!
    Thanks in adv
    gs

    Hi Prashil,
    I am getting the error when I am testing using the test program from the blog.
    Here it is:
    DATA: REQUTEXT LIKE SY-LISEL,
          RESPTEXT LIKE SY-LISEL,
          ECHOTEXT LIKE SY-LISEL.
    DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
    DATA: RFC_MESS(128).
    REQUTEXT = 'HELLO WORLD'.
    RFCDEST = 'Z_TEST_ABAP_TO_JCO'. "corresponds to the destination name defined in the SM59
    CALL FUNCTION 'JCOSERVER01'
       DESTINATION RFCDEST
       EXPORTING
         REQUTEXT = REQUTEXT
       IMPORTING
         RESPTEXT = RESPTEXT
         ECHOTEXT = ECHOTEXT
       EXCEPTIONS
         SYSTEM_FAILURE        = 1 MESSAGE RFC_MESS
         COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
    IF SY-SUBRC NE 0.
        WRITE: / 'Call STFC_CONNECTION         SY-SUBRC = ', SY-SUBRC.
        WRITE: / RFC_MESS.
    ENDIF.
    Also I have created and successfully tested the RFC destination: "Z_TEST_ABAP_TO_JCO" with the program id: "JCOSERVER01".
    And "JCOSERVER01" is the name of one of the two servers started in the java program Example5.java.
    Thanks
    gs

  • More complex JCO Server examples (ABAP to Java)

    JCo connections:
    I found a couple of good documents for connecting from Java to ABAP. Whenever it comes to the other direction (ABAP to Java), information is somehow rare.
    I had a look at the examples coming with the JCo lib, however I would like to find some more complex examples. Especially the transfer of larger result sets (obtained on the Java side) is interesting.
    Does anybody know something like this? I have tried Google, but somehow always the same few articles showed up.
    Any hints?

    You can also use the JCO RFC Provider Service of the Web Application Server for your ABAP to Java calls.
    The steps involved in that are
    1. Configure destination in SM59 in SAP.
    2. Create RFC Destination in Visual Admin.
    3. Create a stateless session bean with JNDI name as the name of calling function module in SAP.
    4. Add a business method public void processFunction(JCO.Funtion fn) which is called by the JCO RFC Provider Service. The name should be 'processFunction'.
    5. Set library references in application-j2ee-engine.xml to type weak for the following
        a. com.sap.mw.jco.
        b. com.sap.tc.Logging (if you are using the logging api )
    Here is the sample code for the EJB biz method
    Business Method.
         public void processFunction(JCO.Function function) {
              try {
                   // Get the import parameters for the function module
                   JCO.ParameterList importList = function.getImportParameterList();
                   logger.infoT("The value sent is" +
                   (String)importList.getValue("USER_NAME"));
                   // Set the export parameter value for the function module
                   JCO.ParameterList export = function.getExportParameterList();
                   export.setValue("From EJB", "RETURN");
                   function.setExportParameterList(export);
              catch (java.lang.Exception e) {
                   e.printStackTrace();     

  • 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

  • ABAP Calling JAVA Function or Method

    Hi Friend,
    I need help in how to proceed using  ABAP  and Call JAVA Function . I know that  we need to use RFC enabled Function modules. I was able to connect  using JAVA Connector which was provided by SAP For communicating with JAVA Apps. The approach for connecting the JAVA to SAP is working fine.  But I  have browsed through various website but failed to find any information.Now i am looking forward to help from you friends to solve my problems .
    The Requirement is mentioned below:-
      1. Prerequiste for SAP ABAP calling a third Party software which is working in JAVA Platform (like any middle ware which might be hardware or software).
      2. Sample Code  like calling a Text  ' Hello  to the world  calling JAVA from ABAP'.
      3. Steps and process so that it would be helpful.
    Timely help would be appreciated.
    Rajiv Christopher.

    1.Middleware is JCO RFC provider it comes with SAP so no need any third party Adapter.
    2.
    " The ECHOTXT parameter should contain the text of REQUTXT.Information on
    " calling the function module should be returned in RESPTXT, indicating, for
    " example, in which system and when the function module call was processed.
    data:ECHOTEXT type SY-LISEL,
         RESPTEXT type SY-LISEL.
    CALL FUNCTION 'STFC_CONNECTION' DESTINATION '<Your JCO destination name>' " which one you have developed in SM59 as TCP/IP
      EXPORTING
        requtext       = 'ABAP Calls JAVA'
    IMPORTING
       ECHOTEXT       = ECHOTEXT
       RESPTEXT       = RESPTEXT.
    if sy-subrc = 0.
      WRITE:/'---------------------------------------------------------------------'.
      WRITE: / 'establish a link to the ABAP application server with logon data'.
      WRITE:/'---------------------------------------------------------------------'.
      write:/ ECHOTEXT .
      else.
          WRITE:/'---------------------------------------------------------------------'.
      WRITE: / 'Not establish a link to the ABAP application server with logon data'.
      WRITE:/'---------------------------------------------------------------------'.
      endif.
    Check the sample code and Let me know will you get ECHOTEXT ?
    Kanagaraja L
    Edited by: Kanagaraja  Lokanathan on Jan 6, 2010 1:27 PM

  • 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!!

  • WDA accessing MySQL DB through Java Connector

    Hi,
    Im having some issues to interfacing a web dynpro abap application with a MySQL DB through a java connector connexion.
    Here what I want to do:
    Doing queries on my MySQL DB after input fields of search criteria and get the results back to display them in the web dyn pro application. (reporting tool-)
    Accessing the data of a MySQL Database in my SAP, to avoid a duplication of data.
    I would like to know how to send a query  to my Java application ?
    And how to send the result of this query to the Webdynpro ABAP ?
    Whats the best and easiest solution ?
    Thanks !

    Found my way through JCo Server.
    I need an rfc or BAPI that have specific parameters --> a table with several specific fields and several fields for search criteria.
    The user enter the search criteria than I send those to my Java server, the Java server retrieve those parameters and perform a SQL query on the MySQL DB. I fill in the table parameter with the result and send the whole table to the abap
    How is it possible ?
    Thanks !

  • SAP mobile + Java Me + Jco

    Hello folks,
    I wanted to play a little with mobile development, especially Java ME and Java connector, but I didn´t find any way how to glue these things together. Example: I am not able to use jco.jar as a library like I am allowed to in Java SE. Does anybody have any idea why I can´t do this?
    Feels like I am not supposed to use Jco for Java ME connection to the SAP system, but I think it would be just great to be able to do this... Can anybody suggest any other ways? I am sure I could read a lot about it, but there are so many resources that a personal recommendation would help a lot:))
    cheers Otto

    Hi Otto,
    Firstly, nice hobby.
    To my knowledge, SAP Java Connector does not works with Nokia OS... and I see no need to be "fighting" with this limitation! Just surrounds it ... invoking Web Services.
    As a matter of using a VPN, is normal and correct ... you should check with your Basis team and infrastructure to undertake the necessary settings in the Firewall and WebAS, and maybe the DMZ.
    Already the publication of a BAPI as Web Service is easy ... troubleshootings are complicated. I think you need to involve a developer ABAP and Basis team for this task.
    Another possibility ... is to create a WebService in SAP Web AS using JCO to consuming the BAPIs. I believe that in this case a good search in the SDN can result in good articles.
    Sorry I can not help you better ... Ineed to make money with it! (not a weekend hobby for me) laughs
    Best regards,
    Angelo

Maybe you are looking for

  • Payment Term (include Material exclude Unplanned Freight)?

    Hi all, The business has requested a Payment Term 0123 that can be used in MIRO to include a discount % on the material price but exclude the discount from the unplanned freight entered on the invoice.  They want a 10% discount on the material with n

  • Custom Page Size list...can it be re-ordered?

    As a service provider I must get asked this question two or three times per week. I'm hoping someone has figured this out as it seems to be a pretty common complaint. When you create a new custom page size the new size gets added to the list in a com

  • Duplicate entries in the Enumerated Drop-downlist?

    Hi All, I have the following context structures in WDA. A ( Cardinality 0..n, Selection 0..1, Supply function - B_ITEMS) -B( Cardinality 0..n, Selection 0..1, Supply funtion - B_ITEMS) - B1   - B2   - B3   - B4 A1 A2 A3 A4 I populate 3 items in the c

  • AirPort Not Seeing Networks

    The writing's on the wall but I'll put up a post as one last ditch effort. I took in a PowerBook 15" 1.5 GHz. First thing I did was do an Archive and Install of OS X 10.4. With the first boot the AirPort wasn't seeing nearby networks. I then exhauste

  • Configuring Oracle for learning purpose in Laptop

    Hi all, I would like to configure Oracle11g in my laptop for learning purpose. Basically i would like to learn PL-SQL by creating some stored procedures and playing around that. Could you just tell me as to how to simulate a pl-sql development enviro