Call RFC  using java procedure

Hi
How can I to use java procedure and call RFC for to access tables of SAP ?
Thank You

RFC? That term in the IT environment usually means "+Request For Comments+" and refers to Internet protocol and usage standards.
Do you perhaps means RPC (Remote Process/Procedure Calls)? Or something else?
Also, SAP is a company. Not a product. SAP has a product called R3. This runs inside a database.
Connecting from Java to a database typically requires nothing more than a JDBC driver. So why can't you use a JDBC driver and need to call the database (and access tables) using another method?

Similar Messages

  • Sample Java code and detail to call RFC from Java clas developed in Eclipse

    Hi All,
    I am new to Java. I have downloaded Eclipse IDE  and planning to use for developing Java application to send data to SAP by calling RFC JCO Interface.
    I need a sample java code/tutorial step by step to create Java class for simple example to call RFC from Java.
    I have downloaded SAPJCO3 from service market place.
    Kindly help me to send steps involved to configure for JCO  with my Eclipse with JCO.
    Thanks in advance.
    Sharma

    Hi Sharma,
    Please have a look at [Example: Using Generated Proxies to Call Function Modules |http://help.sap.com/saphelp_nw04/helpdata/en/b6/55e3952a902447847066a0df27b0d6/content.htm]
    JCo Exceptions : http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f6/daea401675752ae10000000a155106/content.htm
    Hope it will helps
    Regards
    Arun

  • Problem when call rfc using function control

    i try to call rfc using functin control but error "wdtfuncs error '800a03eb' Fail to call Remote Function Module" be popuped.
    my code like that:
    Set objSAPFunction = Server.CreateObject("SAP.Functions")
              Set objSAPFunction.Connection = objSAPConn.NewConnection
              IsLogOnSAP = False
              If objSAPFunction.Connection.Logon(1, True) Then
                   IsLogOnSAP = True
                   'Upload Cancel Invoice
                  Set objFunc = objSAPFunction.Add("ZRFC_SD_BILLINGDOC_GET1")
                   Set objISGR1 = objFunc.exports("DOCUMENT")
                   Set objISGR2 = objFunc.exports("COMPANYCODE")
                   Set objISGR3 = objFunc.exports("YEAR")
                   set objOSGR1 = objFunc.imports("NETVALUE")
                   set objOSGR2 = objFunc.imports("CURRENCY")
                   set objOSGR3 = objFunc.imports("DATE")
                   set objOSGR4 = objFunc.imports("CUSTOMERCODE")
                   set objOSGR5 = objFunc.imports("CUSTOMERNAME")
                   objISGR1.value = cstr(doc)
                   objISGR2.value = cstr(companycode)
                   objISGR3.value = cstr(year)
                   bResult = objFunc.Call          <<<<< Error
                   GetDataFromSAP = Array(cstr(objOSGR1),cstr(objOSGR2),cstr(InvDateFormat(objOSGR3)),cstr(objOSGR4),cstr(objOSGR5))
                   If IsLogOnSAP Then
                             objSAPFunction.Connection.Logoff
                        End If
              End If
    These code can run on the A machine, but do not run on the B machine. And both two machines have been installed SAP FrontEnd.
    which problem about it?

    To change all definition of parameters of the function from type to like may be solution.

  • Without BPM:Call RFC using JCO in interface mapping using java mapping

    Hi all
    I have a very small scenario where REQUEST from the customer comes via Web Service all i have to do is to read the request using SOAP adapter and call an interface mapping(lets say the name is IM_TEST) inside which there is a JAVA MAPPING program written which will call an RFC in CRM using JCO.
    Now this was really simple and i cud test the Interface mapping successfully, but the problem is when loading the scenario in integration directory i have certain things to do
    1. to set the SENDER AGREEMENT which i did correctly
    2. set the RECEIVER DETERMINATION, INTERFACE DETERMINATION AND RECEIVER AGREEMENT now here i am stuck because there is no receiver in my case as the RFC is called inside the mapping only.
    can i call one more message mapping in IM_TEST which will write file onto the XI directory and then in RECEIVER DETERMINATION, INTERFACE DETERMINATION AND RECEIVER AGREEMENT i can mention the reciever as FTP.
    I tried it but i gives the following error
    Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_TEST_WRITE_FILE: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Parsing an empty source. Root element expected!
    Please help me how to complete the scenario so that customer can run it end to end.
    <REMOVED BY MODERATOR>
    Edited by: Prateek Raj Srivastava on May 12, 2010 1:44 PM

    Stefen
    What do i do then...actually this is the project requirement. They want a very fast response from PI and thats why they wnt us to omit BPM and the Graphical mapping from the scenario.
    I am able to test the interface mapping which calls the the Java mapping inside which there is an RFC call, but i cannot implement it end - to - end as there is no receiver business system in this case. The only business system i have is the SOAP sender.
    I am really troubled now, please help me with a solution.
    Is there any other possible way through which the process can become very fast whic hcan meet their requirement.
    Regards
    Naina

  • Call RFC from java (j2ee) /  call to j2ee from R/3

    hello
    i´ve browsed the forum for some time to find how to:
    1.) call ejb from r/3 system via rfc
    2.) call rfc enabled function modules on r/3 from within an j2ee enviroment
    but i didn´t quite get it, because i was a bit confused about all the mentionend techniques
    what i found out about
    1.) use ejb (session bean) and jndi; configure RFC-Engine Service (we use sap webas)
    2.) use jco / jca
        (or all rfc enables rfm´s are available as web service, but didn´t find anything about this)
    so my question:
    are these the preferred techniques to connect j2ee (webAS) <-> r/3; if not are there any others, maybe easier methods?
    and last but not least: are there any good online tutorials for this topic?
    thanks in advance
    franz

    Just as a short partial reply.
    The generic Java --> RFC method is JCO (it will work on older versions as well), you can think of it as a JDBC driver where R/3 is the database, it behaves very similar in many ways.
    EJB development on SAP WAS is really not any different from EJB development on any other J2EE server. The deploy tool is superb. very easy to use and the JNDI registry, etc. are standard stuff...
    ABAP to EJB calls, haven't looked at this in over a year now, but back then we did a Proof Of Concept based on information at http://help.sap.com and it did work indeed. The only thing was back then that you needed to do a few tweaks to get it to work properly.
    As mentioned above, look at the JCO examples and then you can ask more specific questions once you get stuck.
    Good Luck!
    Cheers,
    Kalle

  • How to call RFC using EJB module.

    hi,
        I want to call the RFC using EJB module in java. how to do it.
        if someone having the code plz post it.
    regards,
    Shanthakumar.

    /***Start of JRA specific code***//
    // Retrive connection factory                
    InitialContext initialcontext = new InitialContext();
    connectionfactory = (ConnectionFactory) initialcontext.lookup("java:comp/env/ConnFactory");
    //Request a connection handle:
    connection = connectionfactory.getConnection();
    //Create a RecordFactory object to get a metadata description
    // of the RFC SALERT_CREATE
    RecordFactory recordFactory = connectionfactory.getRecordFactory();
    // Create Record objects containing all
    // necessary information about the RFM.
    MappedRecord input = recordFactory.createMappedRecord("SALERT_CREATE");
    //Fill in the import parameters and the import table structure data here
    input.put("IP_CAT", "ALRT_CAT"); // alert category
    // Refer to the SW_CONT structure of the table of RFC SALERT_CREATE
    ResultSet inputITContainer = (ResultSet) input.get("IT_CONTAINER");
    int tabIndex = 0;
    inputITContainer.moveToInsertRow();
    inputITContainer.updateString("ELEMENT", "CONT_1");
    inputITContainer.updateString("TAB_INDEX", "" + tabIndex++);
    inputITContainer.updateString("ELEMLENGTH", "250");
    inputITContainer.updateString("TYPE", "C");
    inputITContainer.updateString("VALUE","Container_1 value");
    inputITContainer.insertRow();
    inputITContainer.moveToInsertRow();
    inputITContainer.updateString("ELEMENT", "CONT_N");
    inputITContainer.updateString("TAB_INDEX", "" + tabIndex++);
    inputITContainer.updateString("ELEMLENGTH", "250");
    inputITContainer.updateString("TYPE", "C");
    inputITContainer.updateString("VALUE","Container_N value");
    inputITContainer.insertRow();
    interaction = connection.createInteraction();
    // execute the call with the input parameters.
    interaction.execute(null, input);
    }catch(Exception e){
         // Error handling code goes here
    }finally{
         try {
                    if (interaction != null)
                   interaction.close();
              if (connection != null)
                   connection.close();
         } catch (Exception ignored) {
              // Do nothing
    // Pass on module data to the next module in chain, unaltered
    return moduleData;

  • How to call webservice using java client

    Hi,
    I am new to webservice related stuff.Can any body help me.
    How can i call the webservice using simple java programing using jdeveloper tool is very useful for me.
    Thanks
    venuj

    user10394151 wrote:
    Hi,
    I am new to webservice related stuff.Can any body help me.
    How can i call the webservice using simple java programing using jdeveloper tool is very useful for me.
    Thanks
    venujTry this simple webservice client.
    You will need apache-axis.jar in your classpath. The following client is apache axis based. A similiar client can be built also using the JAX-WS only[without apache-axis.jar].
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    public class WEBSERVICE_CLIENT{
    public static void main(String [] args) {
    try {
    String endpoint ="<YOUR WS ENDPOINT>";
            Service  service = new Service();
            Call     call    = (Call) service.createCall();
            // YOU CAN SET VARIOUS PROPERTIES IN THE "CALL" OBJECT...LIKE
            // USERNAME,PASSWORD,PROPERTIES OF HTTP HEADER. SEE "CALL" OBJECT'S API FOR MORE PROPERTIES.
            call.setTargetEndpointAddress( new java.net.URL(endpoint) );
            call.setOperationName(new QName("<YOUR WS SERVICE NAMESPACE>", "<WS SERVICE TO BE INVOKED>"));
            String msg = (String) call.invoke( new Object[] { "data" } );
            System.out.println("RETURNED MESSAGE : "+msg);
          } catch (Exception e) {
            System.err.println(e.toString());
    }

  • Calling RFCs in Java WebDynpro

    Hello Experts,
    I'm new to WebDynpro. I'm a novice at best and have just learned the basics. I'll probably be asking a lot of questions about this soon. Here is one problem I recently encountered:
    I managed to call RFCs from R/3 using a user input and then another one by using one field retrieved from the first called RFC. Now i have to call a BAPI recursively from the data I got from the 2nd RFC that I called.
    Here is the code so far:
    public void executeBapi_Network_Getdetail_Input( )
        //@@begin executeBapi_Network_Getdetail_Input()
        //$$begin Service Controller(246259973)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          BigDecimal plannedCost = new BigDecimal(0);
           for (int i=0; i<wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks().size(); i++) {
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network(false);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network_Activity(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Relation(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Element(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Milestone(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Component(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setNumber(
                wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks().getEx_NetworksElementAt(i).getAufnr());
              wdContext.currentBapi_Network_Getdetail_InputElement().modelObject().execute();
              wdContext.nodeNetworkDetails().invalidate();
              plannedCost.add(wdContext.nodeBapi_Network_Getdetail_Input().nodeNetworkDetails().nodeE_Network().getE_NetworkElementAt(i).getPlanned_Cost());
    sorry if this is totally wrong. I'm totally a newbie here.
    Hoping for your kind and helpful responses.
    Cheers,
    Alfonso

    Hi Alfonso,
    Can you please try this code:
           IWDMessageManager manager = wdComponentAPI.getMessageManager();
             try
               BigDecimal plannedCost = new BigDecimal(0);
               // Initializing a IWDNode to make code more readable and clean
               IWDNode nodeEx_Networks = wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks();
               // I have initialized the int variable because you should never calculate the size() in for loop.
               // It is major performance hit.
               int size = nodeEx_Networks.size();
               for (int i=0; i<size; i++) {
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network(false);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network_Activity(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Relation(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Element(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Milestone(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Component(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setNumber(nodeEx_Networks.getEx_NetworksElementAt(i).getAufnr());
                   wdContext.currentBapi_Network_Getdetail_InputElement().modelObject().execute();
                   // WHY IS THIS INVALIDATE DONE.. WHICH IS THIS NODE???
                   wdContext.nodeNetworkDetails().invalidate();
                IWDNode nodeE_Network = wdContext.nodeBapi_Network_Getdetail_Input().nodeNetworkDetails().nodeE_Network();
                  int sizeNetwork_Getdetail = nodeE_Network.size();
                  for (int i = 0; i < sizeNetwork_Getdetail; i++) {
                       plannedCost.add(nodeE_Network.getE_NetworkElementAt(i).getPlanned_Cost());
                  // Now you can check the plannedCost by printing it using the manager you have initialized above.
    I hope this solves your issue. If you have any further issue please revert back.
    Thanks and Regards
    Pravesh

  • How to calculate call duration using java card API

    Hi,
    I am developing an application using Java card API. I want to calculate duration of otgoing calls in it. I am trying to start timer at the beginning of call in Call Control event. Can someone kindly check following code of Call control event? Here timerManagement function is sending proactive command for starting timer for 3 hours. Here I am asuming that maximum call will be of 3 hours. In callDisconnect event i can get current value of timer and use it to calculate duration of call. But this scenario is also not working.
    Problem is that during code execution program stuck at send command (proHdlr.send();) of timmerManagement function. I am sending postAsBERTLV command before starting timer so may be reason is that it is not possible to send proactive command while phone is busy.
    But I also cannot send postAsBERTLV after timerManagement function. Because it is mention in specification that "The EnvelopeResponseHandler content must be posted before the first invocation of a ProactiveHandler.send method or before the termination of the processToolkit, so that the GSM applet can offer these data to the ME (eg 9Fxx/9Exx/91xx). After the first invocation of the ProactiveHandler.send method the EnvelopeResponseHandler is no more available"
    Take a look at following code
                     * Method illustrating the use of the Call Control event.
                    private void callControlService() {
                                    /** @todo: Replace following sample code with your implementation */
                                    ProactiveHandler proHdlr = ProactiveHandler.getTheHandler();
                                    EnvelopeHandler envHdlr = EnvelopeHandler.getTheHandler();
                                    ProactiveResponseHandler rspHdlr = ProactiveResponseHandler
                                                                    .getTheHandler();
                                    EnvelopeResponseHandler envRspHdlr = EnvelopeResponseHandler
                                                                    .getTheHandler();
                                    durationCount = 0;
                                     // allow call with no modifications
                                    envRspHdlr.postAsBERTLV((byte)0x9F, (byte)0x00);
                                    // start clock using timer
                                    timerManagement(proHdlr, rspHdlr, (byte) 0x0, timer_id, tempBuffer);
                                    return;
                    }Please help me in this regard
    Thanks
    Yasir

    I am also unable to start timer in call connected event. I cannot send any proactive command while phone is busy. I am using Gemalto development Suite and there simulators (Simulation 2G chain).
    Is it limitation of simulator that you cannot send any proactive command while phone is busy?
    Is there any other work around for getting call duration?

  • How to create database connection and how to call it using Java

    Hi,
    Good day! I'd like to know how I can create a db connection in JDev, then use this connection to retrieve data using a Java Class? I've seen using New Gallery > Database Connection. But I'm not sure how I can access this connection using Java and display some output from the retrieved records.
    Any steps/tutorial link is appreciated.
    Thanks in advance,
    Rian

    Hi,
    If you need to access the connection in the entity object then refer http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvgen.htm#BABEIFAI i.e in MODEL.
    But if you want to access connection in ViewController part of application then you need to do it manually.For this i am giving you my code for reference.------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.faces.context.FacesContext;
    import oracle.jdbc.pool.OracleDataSource;
    public class DataHandler {
    String jdbcUrl = null;
    String userid = null;
    String password = null;
    Connection conn;
    public static final String CONNECTION_STRING =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("connectionString");
    public static final String USER_NAME =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("userName");
    public static final String PASSWORD =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("password");
    public DataHandler(String jdbcUrl, String userid, String password,
    boolean shouldConnect) throws SQLException {
    this.jdbcUrl = jdbcUrl;
    this.userid = userid;
    this.password = password;
    if (shouldConnect) {
    connect();
    public void connect() throws SQLException {
    OracleDataSource ds;
    ds = new OracleDataSource();
    ds.setURL(jdbcUrl);
    conn = ds.getConnection(userid, password);
    public Connection getConnection() {
    return conn;
    public ResultSet executeQuery(String sql) throws SQLException {
    Statement s = conn.createStatement();
    return s.executeQuery(sql);
    public void closeConnection() throws SQLException {
    if (!conn.isClosed()) {
    conn.close();
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Problem while calling RFC in java

    hi,
    I writed a java program  calling a batch input RFC.  The RFC return an internal table which storing the system messages of the batch input process. My problem is:
    When i debug the java program,the RFC excecuted and return the correct internal table to me.
    But when i executed it not in debug mode, there is no batch input messages return to me.
    My code is:
    package com.hongta.com.z_delivery_bdc;
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    import com.sap.mw.jco.JCO.ParameterList;
    @author Administrator
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class ConnectRFC extends Object {
         JCO.Client mConnection;
         JCO.Repository mRepository;
         String filePath;
         String BDCLOG;
         JCO.Function function;
         public void Connect1() {
              filePath =
                   "C:
    Documents and Settings
    Administrator.3939200975DB4C5
    desktop
    cigaXY2008-12-15.xml";
              function = null;
              try {
                   // Change the logon information to your own system/user
                        mConnection = JCO.createClient("610", // SAP client
              "xxxxxx", // userid
              "xxxxxx", // password
              null, // language
              "10.96.0.53", // application server host name
         "01"); // system number
          // mConnection.setAbapDebug(true);
                   mConnection.connect();
                   mRepository = new JCO.Repository("ARBsoft", mConnection);
              } catch (Exception ex) {
                   ex.printStackTrace();
                   System.out.println("jco connect failed");
                                            mConnection.disconnect();
                   System.exit(1);
              //JCO.Table codes = null;
              try {
                   function = this.createFunction("Z_BAPI_CONTRACT_BDC");
                   if (function == null) {
                        System.out.println(
                             "Z_BAPI_contract_bdc" + " not found in SAP.");
                        if ( mConnection != null && mConnection.isAlive()) {
                             mConnection.disconnect();
                        System.exit(1);
                   //function.getImportParameterList().setValue(filePath, "FILEPATH");               
                   //function.getImportParameterList().setValue(BDCLOG, "BDCLOG");
                   mConnection.execute(function);
                                   catch (Exception ex) {
                                       //System.out.println(ex.toString());
                                    ex.printStackTrace();
                                     System.out.println("execute failed");
                                            mConnection.disconnect();
                                     System.exit(1);
              JCO.Table codes = null;
              codes =
                 function.getTableParameterList().getTable("MESSAGE");
              try {
                        codes.firstRow();
                        for (int i = 0; i < codes.getNumRows(); i++, codes.nextRow()) {
                        System.out.println(codes.getString("CON")"  "codes.getString("MESG"));
              catch(Exception ex1){
                   ex1.printStackTrace();
                   System.out.println("codes");
              if ( mConnection != null && mConnection.isAlive()) {
                   mConnection.disconnect();
                   System.out.println("chenggong");
              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) {
                   ConnectRFC app = new ConnectRFC();
                   app.Connect1();
    Regards,
    taowenbo.

    hi,
    i had resolved my problem in other way.I don't upload my data using ws_upload now,but upload with table.
    here is my code.Maybe helpful to somebody:
           JCO.Table C_XYORDERTable;
         JCO.Table C_XYORDPR_FINALTable;
         public void getXyordprFinalElement(Element e) {
              try {
                   for (Iterator i = e.getChildren().iterator(); i.hasNext();) {
                        Element child = (Element) i.next();
                        if (child.getName().equals("ORDER_ID"))
                             C_XYORDPR_FINALTable.setValue(child.getText(), "ORDER_ID");
                        else if (child.getName().equals("ID"))
                             C_XYORDPR_FINALTable.setValue(child.getText(), "ID");
                        else if (child.getName().equals("PRODUCT_ID"))
                             C_XYORDPR_FINALTable.setValue(
                                  child.getText(),
                                  "PRODUCT_ID");
                        else if (child.getName().equals("MATNR"))
                             C_XYORDPR_FINALTable.setValue(child.getText(), "MATNR");
                        else if (child.getName().equals("QUANTITY"))
                             C_XYORDPR_FINALTable.setValue(child.getText(), "QUANTITY");
                   C_XYORDPR_FINALTable.nextRow();
              } catch (Exception ex) {
                   ex.printStackTrace();

  • Call rfc from Java Web application.

    Hi:
    I am new to SAP Java programming.
    I am developing a java web application on SAP NW SP16.
    I need to call a rfc and process the data to be displayed on a jsp page.
    I have few questions...
    1) Can I use the JCO destination created in thru wed dynpro content administrator, to connect to sap and execute the rfc/bapi?
    2) How would I create and access the model (rfc)?
    3) Are the required jar and dll(rfc32.dll ... ) files available on the server?
    Any help would be greatly appreciated.
    Thanks.

    Hi,
       See the follwoing links which contains sample code to ceate JCO and execute BAPI.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/14e13d8ee4535ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/14e13d8ee4535ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/14e13d8ee4535ee10000000a114084/frameset.htm
    Kind Regards,
    S.Saravanan.

  • Pointbase database using java procedure in trigger

    Hi,
    I use Sun Creator to create my Single.war archive.
    �\src\db contains package db;
    In it is public class braincreate;
    Inside of braincreate is public void triggerInsert1 (aa,bb);
    �\src\single contains package single;
    In it is public class Page1;
    Inside of Page1 is code to create and execute Pointbase Trigger. The Trigger calls stored procedure triggerInsertxx, which in turn executes CALL which has \"db.braincreate::triggerInsert1\" declaration.
    All other issues, including connection, settings and so on are resolved. When ran in debug mode the following error is raised:
    "The external \"db.braincreate::triggerInsert1\" routine had the following runtime exception \"java.lang.ClassNotFoundException: db.braincreate\""
    I also tried to put the method to class Page1, but it still did not work. I tried to change CLASSPATH to point to compiled Single.war, but it still did not work.
    Question:
    How to set the code so triggerInsert1 is found and executed? Maybe I need to put .war file or package in some specific place?
    I tried to rename Single.war to Single.jar and put it in ...\Creator2ea\...java\lib\ext (does anybody know if it makes sense?), but it did not work.

    Please find further discussion in:
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=63068
    I added 10 Duke dollars to each issue.

  • Calling RFC using UDF

    Hi,
    I have a small doubt.
    In file to IDOC mapping, I am mapping two fields using a UDF.
    That UDF in turn calls a RFC.
    But that RFC is not moved to quality server.
    If now I try to test that in quality environment, the mapping works fine and IDOC is posted because the error handling is done in ABAP.
    My doubt is why did the messge did not failed in XI, saying the RFC not available??
    I tried to search in sdn, by did not get anything related to this.
    Please try to clarify my doubt.
    Regards,
    Sachi

    Ravi,
    Below is the UDF code:
    MappingTrace importantTrace = container.getTrace();
    String query = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Z_RFC_UOM xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\">";
    String restQuery = "</ns0:Z_RFC_UOM>";
    String Lookup_Key_Tag = "I_MATNR";
    String Lookup_Key_Tag1 = "I_VKORG";
    String Lookup_Key_Tag2="I_VTWEG";
    String Lookup_Value_Tag = "E_MENEE";
    String Lookup_key_StartTag = "<" + Lookup_Key_Tag + ">";
    String Lookup_key_EndTag =  "</" +Lookup_Key_Tag + ">";
    String Lookup_key_StartTag1 = "<" + Lookup_Key_Tag1 + ">";
    String Lookup_key_EndTag1 =  "</" +Lookup_Key_Tag1 + ">";
    String Lookup_key_StartTag2 = "<" + Lookup_Key_Tag2 + ">";
    String Lookup_key_EndTag2 =  "</" +Lookup_Key_Tag2 + ">";
    String Lookup_Value_StartTag = "<" + Lookup_Value_Tag + ">";
    String Lookup_Value_EndTag = "</" +Lookup_Value_Tag + ">";
    String comm_channel = "";
    String content = "";
    String items = "";
    String item1 = "";
    String item2 = "";
    String item3 = "";
    String ItemsTag = "";
    String Lookup_Value = "";
    int j =0;
    String Rec = Service[0];
    for(int i= 0;i< material.length;i++)
                ItemsTag =  Lookup_key_StartTag material<i> Lookup_key_EndTag;
                item1 = item1 + ItemsTag;
    for(int i= 0;i< sales_org.length;i++)
                ItemsTag =  Lookup_key_StartTag1 sales_org<i> Lookup_key_EndTag1;
                item2 = item2 + ItemsTag;
    for(int i= 0;i< dist_channel.length;i++)
                ItemsTag =  Lookup_key_StartTag2 dist_channel<i> Lookup_key_EndTag2;
                item3 = item3+ ItemsTag;
    items=item1item2item3;
    items = items + restQuery;
    query = query + items;
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    comm_channel = "CC_Recv_RFC";
    try
                Channel channel = LookupService.getChannel(Rec,comm_channel);
                accessor = LookupService.getRfcAccessor(channel);
                InputStream inputStream = new ByteArrayInputStream(query.getBytes());
                importantTrace.addWarning(query);
                XmlPayload payload = LookupService.getXmlPayload(inputStream);
                Payload result1 = accessor.call(payload);
                InputStream in = result1.getContent();
                out = new ByteArrayOutputStream(1024);
                byte[] buffer = new byte[1024];
                for(int read = in.read(buffer);read>0;read = in.read(buffer))
                            out.write(buffer,0,read);
                content = out.toString();
                importantTrace.addWarning("RFC Response::" + content);
                //Parsing RFC output
                j= 0;
                while ( content.indexOf(Lookup_Value_StartTag) != -1 )
                                                                Lookup_Value = content.substring( content.indexOf(Lookup_Value_StartTag) + Lookup_Value_StartTag.length()  , content.indexOf(Lookup_Value_EndTag) ) ;
                                                                importantTrace.addWarning("LookupValue::" + Lookup_Value);
                                                                j++;
                                                                content = content.substring(content.indexOf(Lookup_Value_EndTag) + Lookup_Value_EndTag.length() );
                                                                result.addValue( Lookup_Value);
    }//end of try
    catch(Exception ex)
                importantTrace.addWarning("Error while lookup"+ ex.getMessage());
    //catch(LookupException e){  importantTrace.addWarning("Error while lookup"+ e.getMessage()); }
    //catch(IOException e) { importantTrace.addWarning("Error while IOException"+ e.getMessage()); }
    finally
                if(out!=null)
                            try
                                        out.close();
                            catch(IOException e)
                                        importantTrace.addWarning("Error while IOException"+ e.getMessage());
                if(accessor!=null)
                            try
                                        accessor.close();
                            catch(LookupException e)
                                        importantTrace.addWarning("Error while lookup"+ e.getMessage());
    result.addValue("");

  • Calling ESB using Java Web Proxy

    Hello Evryone,
    I have a ESB which is giving output as follows:-
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body
    xmlns:out1="http://www.example.org">
    <out1:ProcessResponse
    xmlns:out1="http://www.example.org">
    <out1:RowSetCollection>
    <out1:RowSet>
    <out1:SOFTWARE_PKGS
    SOFTWARE_PKGS="">database_K_DKL_NW02</out1:SOFTWARE_PKGS>
    <out1:CREATION_DATE
    CREATION_DATE="">2008-07-07T00:00:00.000+05:30</out1:CREATION_DATE>
    <out1:CREATION_TIME
    CREATION_TIME="">2008</out1:CREATION_TIME>
    <out1:FILE_SIZE
    FILE_SIZE="">3435</out1:FILE_SIZE>
    <out1:FILE_PATH
    FILE_PATH="">http://www.google.com</out1:FILE_PATH>
    </out1:RowSet>
    <out1:RowSet>
    <out1:SOFTWARE_PKGS
    SOFTWARE_PKGS="">database_config.txt</out1:SOFTWARE_PKGS>
    <out1:CREATION_DATE
    CREATION_DATE="">2006-03-14T00:00:00.000+05:30</out1:CREATION_DATE>
    <out1:CREATION_TIME
    CREATION_TIME="">2006</out1:CREATION_TIME>
    <out1:FILE_SIZE
    FILE_SIZE="">342345</out1:FILE_SIZE>
    <out1:FILE_PATH
    FILE_PATH="">\\01hw180464\MOTO\database_config.txt</out1:FILE_PATH>
    </out1:RowSet>
    <out1:RowSet>
    <out1:SOFTWARE_PKGS
    SOFTWARE_PKGS="">database_help.doc</out1:SOFTWARE_PKGS>
    <out1:CREATION_DATE
    CREATION_DATE="">2008-05-12T00:00:00.000+05:30</out1:CREATION_DATE>
    <out1:CREATION_TIME
    CREATION_TIME="">2005</out1:CREATION_TIME>
    <out1:FILE_SIZE
    FILE_SIZE="">555</out1:FILE_SIZE>
    <out1:FILE_PATH
    FILE_PATH="">\\01hw180464\MOTO\database_help.docx</out1:FILE_PATH>
    </out1:RowSet>
    <out1:RowSet>
    <out1:SOFTWARE_PKGS
    SOFTWARE_PKGS="">database_help.txt</out1:SOFTWARE_PKGS>
    <out1:CREATION_DATE
    CREATION_DATE="">2008-07-01T00:00:00.000+05:30</out1:CREATION_DATE>
    <out1:CREATION_TIME
    CREATION_TIME="">2008</out1:CREATION_TIME>
    <out1:FILE_SIZE
    FILE_SIZE="">68</out1:FILE_SIZE>
    <out1:FILE_PATH
    FILE_PATH="">\\01hw180464\MOTO\database_help.txt</out1:FILE_PATH>
    </out1:RowSet>
    <out1:RowSet>
    <out1:SOFTWARE_PKGS
    SOFTWARE_PKGS="">database_new.zip</out1:SOFTWARE_PKGS>
    <out1:CREATION_DATE
    CREATION_DATE="">2008-02-01T00:00:00.000+05:30</out1:CREATION_DATE>
    <out1:CREATION_TIME
    CREATION_TIME="">2000</out1:CREATION_TIME>
    <out1:FILE_SIZE
    FILE_SIZE="">1567</out1:FILE_SIZE>
    <out1:FILE_PATH
    FILE_PATH="">\\01hw180464\MOTO\database_new.zip</out1:FILE_PATH>
    </out1:RowSet>
    <out1:RowSet>
    <out1:SOFTWARE_PKGS
    SOFTWARE_PKGS="">database_search.txt</out1:SOFTWARE_PKGS>
    <out1:CREATION_DATE
    CREATION_DATE="">2007-12-03T00:00:00.000+05:30</out1:CREATION_DATE>
    <out1:CREATION_TIME
    CREATION_TIME="">2007</out1:CREATION_TIME>
    <out1:FILE_SIZE
    FILE_SIZE="">365</out1:FILE_SIZE>
    <out1:FILE_PATH
    FILE_PATH="">\\01hw180464\MOTO\database_search.txt</out1:FILE_PATH>
    </out1:RowSet>
    </out1:RowSetCollection>
    </out1:ProcessResponse>
    </env:Body>
    </env:Envelope>
    I am trying to call this ESB from Java web Proxy. But I am getting following error :-
    deserialization error: XML reader error: unexpected character content: "database_K_DKL_NW02"
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:163)
         at proxyesb.proxy.types.org.example.runtime.RowSet_LiteralSerializer.doDeserialize(RowSet_LiteralSerializer.java:79)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.types.org.example.runtime.RowSetCollection_LiteralSerializer.doDeserialize(RowSetCollection_LiteralSerializer.java:61)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.types.org.example.runtime.ProcessResponse_LiteralSerializer.doDeserialize(ProcessResponse_LiteralSerializer.java:62)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub._deserialize_execute(__soap_ModifyResult_execute_ppt_Stub.java:126)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub._readFirstBodyElement(__soap_ModifyResult_execute_ppt_Stub.java:112)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:333)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub.execute(__soap_ModifyResult_execute_ppt_Stub.java:76)
         at proxyesb.proxy.__soap_ModifyResult_execute_pptClient.execute(__soap_ModifyResult_execute_pptClient.java:50)
         at proxyesb.proxy.__soap_ModifyResult_execute_pptClient.main(__soap_ModifyResult_execute_pptClient.java:36)
    CAUSE:
    XML reader error: unexpected character content: "database_K_DKL_NW02"
         at oracle.j2ee.ws.common.streaming.XMLReaderBase.nextElementContent(XMLReaderBase.java:53)
         at proxyesb.proxy.types.org.example.runtime.SOFTWARE_PKGS_LiteralSerializer.doDeserialize(SOFTWARE_PKGS_LiteralSerializer.java:60)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.types.org.example.runtime.RowSet_LiteralSerializer.doDeserialize(RowSet_LiteralSerializer.java:79)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.types.org.example.runtime.RowSetCollection_LiteralSerializer.doDeserialize(RowSetCollection_LiteralSerializer.java:61)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.types.org.example.runtime.ProcessResponse_LiteralSerializer.doDeserialize(ProcessResponse_LiteralSerializer.java:62)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub._deserialize_execute(__soap_ModifyResult_execute_ppt_Stub.java:126)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub._readFirstBodyElement(__soap_ModifyResult_execute_ppt_Stub.java:112)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:333)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub.execute(__soap_ModifyResult_execute_ppt_Stub.java:76)
         at proxyesb.proxy.__soap_ModifyResult_execute_pptClient.execute(__soap_ModifyResult_execute_pptClient.java:50)
         at proxyesb.proxy.__soap_ModifyResult_execute_pptClient.main(__soap_ModifyResult_execute_pptClient.java:36)
    CAUSE:
    XML reader error: unexpected character content: "database_K_DKL_NW02"
         at oracle.j2ee.ws.common.streaming.XMLReaderBase.nextElementContent(XMLReaderBase.java:53)
         at proxyesb.proxy.types.org.example.runtime.SOFTWARE_PKGS_LiteralSerializer.doDeserialize(SOFTWARE_PKGS_LiteralSerializer.java:60)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.types.org.example.runtime.RowSet_LiteralSerializer.doDeserialize(RowSet_LiteralSerializer.java:79)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.types.org.example.runtime.RowSetCollection_LiteralSerializer.doDeserialize(RowSetCollection_LiteralSerializer.java:61)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.types.org.example.runtime.ProcessResponse_LiteralSerializer.doDeserialize(ProcessResponse_LiteralSerializer.java:62)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
         at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub._deserialize_execute(__soap_ModifyResult_execute_ppt_Stub.java:126)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub._readFirstBodyElement(__soap_ModifyResult_execute_ppt_Stub.java:112)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:333)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
         at proxyesb.proxy.runtime.__soap_ModifyResult_execute_ppt_Stub.execute(__soap_ModifyResult_execute_ppt_Stub.java:76)
         at proxyesb.proxy.__soap_ModifyResult_execute_pptClient.execute(__soap_ModifyResult_execute_pptClient.java:50)
         at proxyesb.proxy.__soap_ModifyResult_execute_pptClient.main(__soap_ModifyResult_execute_pptClient.java:36)
    Process exited with exit code 0.
    Please help me how to resolve this.

    It seems like it doesn't like the underscore characters.

Maybe you are looking for

  • Schedule Lines not getting created in MRP

    Dear All. I created Scheduling agreement and assigned this Scheduling agreement in Source list with indicator 2 which is u201CRecord relevant to MRP. Sched.lines generated automaticallyu201D Then I run MRP using MDO3 and parameters Processing key: NE

  • Issues after Mountain Lion Update

    Hello, can someone please assist me with this error report I receive after trying to open the desktop and screen saver in system preferences? I also cannot open finder, it does not respond at all and when I start the computer, it does not show user a

  • Oracle 10g unable to insert yet prompt no error

    Hi all, I bumped into this strange case. I have my web app connect to oracle 10g. I got all driver and JDBC setup and coded correctly. Somehow, it won't insert into table when i execute insert statement. No exceptions thrown and yet no error. I'm sti

  • Scenario not triggered

    Hi I have configured 2 scenarios idoc-file. Both the scenario has the same idoc as input. As per requirement, i should create 2 different scenarios in the Integration Directory as well. But when i run the scenarios, only the first scenario gets execu

  • How find system specification in java

    is it possible to find out system specification in java e.g. motherboard, bios vendor & serial id etc.