BAPI explorer functions with java

I am a newbie in SAP.
I have tested out some sample JCO programs. Then worked fine.
Now I want to go for some more.
Is it possible to implement applications like BAPI explorer with JCo ?
Basically I want to be able to list all the BAPIs with JCo ?
I have tried "RFC_FUNCTION_SEARCH" with "*" entry for all input values and
the output was null. 
How do I list all the BAPIs with JCo (Java Program)
Thanks !!!!

I was asking so obvious question with simple answer.
I have figured it out and it worked great. It's been a week since I started JCo program.
Anyway my problem was RFC_FUNCTION_SEARCH returns output in a table.
So I had to look up the table for result message.
Now I am asking another ? I have searched the forum already and couldn't find the answer.
How do I create the hierarchical view of BAPI with JCo ?
Basically I want to implement something like BAPI explorer (tree navigator) with Java.

Similar Messages

  • I hope to develop a function with java like IE's save as.How can I do?

    I hope to develop a function with java like IE's save as.How can I do?

    hi ,
    Considering IE browser page as an object, U can use Serialization where u can save that object.(i.e state of the object) And then when u open it thru de-serialization, u can restore the page/object .
    Hope that helps U .
    Techie.

  • Matlab Functions with java

    Hi friends.I have a many function that written in Matlab.Now I must use this functions in my
    java project.If I write this fungtion again I will spend very musch time .I want to call this function from java
    project how can I do it.
    Edited by: Turkfutuh on Jul 14, 2008 3:00 PM

    Solutions.
    1. Find an existing Java interface library
    2. Write a C executable, use the matlab library and write a communications api. Your java app talks to the communications API.
    3. Write JNI code that does something similar to what is in 2.
    Solutions 2 and 3 require a moderate level of experience in a programming language besides java, probably C or C++.
    Solution 2 requires work in the communications api while 3 requires a similar amount of work via the JNI api.

  • Search function with Java script

    Hi, i'm using ADF 11g . In one of the application page , i need to give a search function , in which user can enter any text , the entered text needs to be highlighted . Since ADF is very new to me , could some one point me how to use the javascript API to do this. Thanks.

    Thanks for your response Shay.
    The function should be like the find function in (Ctl-F) in Firefox browser. (In IE the find function finds only the node of the xml not the value of the node displayed in outputText Component. )
    The page displays a xml file in a tree structure. The value of a node is displayed in the output text component.
    The requirement is , a search field will be given at the bottom of the page, where user can enter any text and the function should find and highlight the matching Node as well as values. If user hits the button again, the function should highlights the next match.
    You mentioned i can use a backing bean to find and highlight the words. does it mean i no need to use the javascript API. Could you point me some docs or any demo piece. Thanks again.

  • Recreating the BAPI Explorer in Java

    Hi
    I'm using JCo to try to recreate something like the BAPI Explorer in a java program.
    I can do something like the alphabetical view by using SWO_QUERY_API_OBJTYPES to get all objects, and then calling SWO_QUERY_API_METHODS to get the BAPIs on those objects.
    Has anyone any idea what SAP functions I would use to create the hierarchical view rather than the alphabetical view?
    TIA
    Ian

    did you try http://ifr.sap.com
    Regards
    Raja

  • XSLT Enhancement with Java, Tokenize Functionality

    I tried the following requirement using EXSLT with no luck. Is there any other alternative to tokenize in XSLT 1.0.
    The syntax i have here is  
    <xsl:for-each select="tokenize($this/Field1,',')">
           <xsl:variable name="f1v" select="."/>
         <xsl:for-each select="tokenize($this/Field2,'\|')">
              <xsl:variable name="f2v" select="."/>
              <xsl:for-each select="tokenize($this/Field3,'\|')">
                        <xsl:variable name="f3v" select="."/>
    There are multiple for-each based on tokens
    I am leaning towards to Enhancing XSLT with Java Function. As i have less experience with Java, can anybody help me with the code that can be used by XSLT for Tokenize functionality.
    I have written something like following. I still have errors to fix. But i am not sure about having resultSet or return at the end, to make sure all the tokens were sent to XSLT.
    public class MyStringToken
         public static void main(String [] args)
              String str = "sssd;wwer;ssswwwwdwwwwwwwwwww;wwwwe";
              String delimiter = ";";
              MyStringToken my = new MyStringToken();
              my.getTokens(str,delimiter);
         public void getTokens(String str,String delimiter)
              StringTokenizer st = new StringTokenizer(str,delimiter);
              while(st.hasMoreElements())
                   try
                        String delString = new String(st.nextElement().toString());
                        return (delString);
                   catch(Exception e)
                        e.printStackTrace();
    Any help is appreciated

    Hi,
    I have been searching about, and I have found the next example that maybe can help you, It's a template to tokenize in XSLT 1.0 from the web [http://stackoverflow.com/questions/1018974/tokenizing-and-sorting-with-xslt-1-0]
    <xsl:template name="tokenize">
      <xsl:param name="string" />
      <xsl:param name="delimiter" select="' '" />
      <xsl:choose>
        <xsl:when test="$delimiter and contains($string, $delimiter)">
          <token>
            <xsl:value-of select="substring-before($string, $delimiter)" />
          </token>
          <xsl:text> </xsl:text>
          <xsl:call-template name="tokenize">
            <xsl:with-param name="string"
                            select="substring-after($string, $delimiter)" />
            <xsl:with-param name="delimiter" select="$delimiter" />
          </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <token><xsl:value-of select="$string" /></token>
          <xsl:text> </xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:template>
    Also I have found the next example of use tokenize in EXSLT from [http://exslt.org/str/functions/tokenize/index.html] It can be that inI your tests you are not using "str:tokenize", no?
    <xsl:template match="a">
       <xsl:apply-templates />
    </xsl:template>
    <xsl:template match="*">
       <xsl:value-of select="." />
          <xsl:value-of select="str:tokenize(string(.), ' ')" />
       <xsl:value-of select="str:tokenize(string(.), '')" />
       <xsl:for-each select="str:tokenize(string(.), ' ')">
          <xsl:value-of select="." />
       </xsl:for-each>
       <xsl:apply-templates select="*" />
    </xsl:template>
    I hope that helps you.
    Best.
    Jorge

  • About bapi with java

    hi expert's ,
             i wanted to know how we can do bapi with java ...?
             how we can retrive data from java.
              means what will be the coding for java?
                   may be m not able to explain but plz help me with this...
    Regards
    Pankaj.

    Hi
    lets see if this helps.
    Calling BAPIs from Java
    This is an example program for calling a BAPI from the IBM development platform, Access Builder for SAP R/3.
    Detailed program examples are shipped with the Access Builder for R/3.
    Access Builder for SAP R/3
    //Importing the required classes:
    import com.sap.rfc.*;
    import com.sap.rfc.exception.*;
    import com.ibm.sap.bapi.*;
    import com.ibm.sap.bapi.generated.*;
    //Connecting to the R/3 System:
    static private IRfcConnection establishConnection(MiddlewareInfo aMiddlewareInfo)
         throws JRfcRemoteException
         IRfcConnection aConnection = null ;
         ConnectInfo aConnectInfo = null ;
         UserInfo aUserInfo = null ;
         String orbServerName = aMiddlewareInfo.getOrbServerName() ;     
         // Please adjust the values written in UPPERCASE LETTERS
         // in the lines below so that they fit to your needs!
         // If you don't know the correct values ask your system
         // administrator!
         // After correcting these values you should change the
         // <bAdjusted> variable in the following line
         // from "false" to "true".
         // Then you can re-compile ("javac SampleCompanyCode.java") and
         // re-run ("java SampleCompanyCode -conn JNI") this sample...
         boolean bAdjusted = true;
         if (!bAdjusted) {
              throw (new JRfcRfcConnectionException (
                   "Please adjust the Connection-Parameters to your
                     needs! (See method \"establishConnection\")"));
        //Connection information:
         aConnectInfo = new ConnectInfo (
              3,          // int aRfcMode 3=R/3 or 2=R/2
              null,          // String aDestination
              "9.7.12.7",     // String aHostName YOUR  HOSTNAME (e.g. IP-
                         //address)
              0,          // int aSystemNo YOUR SYSTEM-NUMBER
              null,                    // String aGatewayHost
              null,                    // String aGatewayService
              null,                    // String aSystemName
              null,                    // String aGroupName
              null,                    // String aMsgServer
              false,               // Boolean isLoadBalancing
              true);               // Boolean isCheckAuthorization
        //User information:
         aUserInfo = new UserInfo (
              "MUSTER",          // String aUserName,      YOUR USERID
              "IDES",          // String aPassword,      YOUR PASSWORD
              "800",          // String aClient, YOUR CLIENT NUMBER
              "e",                // String aLanguage, YOUR PREFERRED
                                //LANGUAGE
              1103);          // int aCodePage YOUR REQUIRED CODEPAGE     
        //Technical conversion for the selected middleware;
        // Open connection:
         IRfcConnectionFactory aConnectionFactory = FactoryManager.getSingleInstance().getRfcConnectionFactory() ;
         aConnection = aConnectionFactory.createRfcConnection(aConnectInfo, aUserInfo) ;
         aConnection.open() ;
       //Returning the connection:
         return aConnection ;
    //Calling the main method:
    public static void main (java.lang.String[] args)
      //Setting up the connection using the selected middleware:
         MiddlewareInfo aMiddlewareInfo = new MiddlewareInfo(args) ;
         FactoryManager aFactoryManager = FactoryManager.getSingleInstance() ;
         aFactoryManager.setMiddlewareInfo(aMiddlewareInfo) ;
        //Initializing the connection object:      
         IRfcConnection aConnection = null ;
         try
              aConnection = establishConnection(aMiddlewareInfo) ;
         catch (Exception ex)     
              System.out.println("ERROR : Could not create connection : " + ex) ;
              System.exit(-1) ;
         System.out.println("Connection established.");
       // --- TEST CODE (start) -
         try
              printList(aConnection) ;
    //Calling the BAPI:
      //Declare an empty Object ID for the Business Object
      //CompanyCode:          
              objectId = CompanyCode.getEmptyObjectId() ;
         //Entering a value in the object ID:     
              objectId.getKeyField("COMPANYCODEID").setString("1000") ;
         //Instantiate the object CompanyCode with the object ID:
              companyCode = new CompanyCode(objectId) ;     // Create 2nd
             CompanyCode
              System.out.println ("Successfully created new CompanyCode : '" + companyCode + "'") ;
              printDetails(companyCode, aConnection) ;
         // --- TEST CODE (end) -
         catch (Exception ex)
              System.out.println ("Unexpected exception occurred:");
              System.out.println (ex);
    private static void printDetails(CompanyCode companyCode, IRfcConnection connection)
         try     
        //Declare the parameters of the BAPI CompanyCode.GetDetail:
              CompanyCodeGetdetailParams aCompanyCodeGetdetailParams =
                   new CompanyCodeGetdetailParams() ;
        //Aufruf des BAPIs CompanyCode.GetDetail auf die Objektinstanz:
              companyCode.getdetail(connection,      aCompanyCodeGetdetailParams);
          //Splitting the parameter object into its separate components
          //(Struktur):
              Bapi0002_2Structure struct = aCompanyCodeGetdetailParams.getCompanycodeDetail() ;
              System.out.println ("The details of the companycode are : ") ;
          //Splitting the structure into individual fields:          
              System.out.println ("CompCode :           '" + struct.getCompCode()  + "'" );
              System.out.println ("CompName :           '" + struct.getCompName()  + "'" );
              System.out.println ("City1 :              '" + struct.getCity()  + "'" );
              System.out.println ("Country1 :           '" + struct.getCountry() + "'" );
              System.out.println ("Currency :           '" + struct.getCurrency() + "'" );
              System.out.println ("Langu1 :             '" + struct.getLangu() + "'" );
              System.out.println ("ChrtAccts :          '" + struct.getChrtAccts() + "'" );
              System.out.println ("FyVariant :          '" + struct.getFyVariant() + "'" );
              System.out.println ("VatRegNo :           '" + struct.getVatRegNo() + "'" );
              System.out.println ("Company :            '" + struct.getCompany() + "'" );
              System.out.println ("AddrNo :             '" + struct.getAddrNo() + "'" );     
              System.out.println() ;
         catch (Exception ex)     
              System.out.println("Exception in printDetails() : " + ex) ;
         return;
    private static void printList(IRfcConnection connection)
         try     
          //Declaring the parameter object:           
              CompanyCodeGetlistParams aCompanyCodeGetlistParams =
                   new CompanyCodeGetlistParams() ;
          //Actual BAPI call:
              CompanyCode.getlist(connection, aCompanyCodeGetlistParams);
          //Splitting the parameter objects into its separate components
          //(Table):
              Bapi0002_1Table table = aCompanyCodeGetlistParams.getCompanycodeList();
              int rowCount = table.getRowCount() ;
              System.out.println ("Returned table has " + rowCount + " lines.");
          //Evaluating the table row by row:
              for (int i = 0; i < rowCount; i++)
                   Bapi0002_1TableRow row = table.getRow(i) ;
                   System.out.println("\t" + row.getCompCode() + "\t" + row.getCompName()) ;
              System.out.println() ;
         catch (Exception ex)     
              System.out.println("Exception in printList() : " + ex) ;
         return;
    Regards
    Neha

  • Replace the wait with java embedding thread.sleep() function

    Hi,
    How to replace the wait with java embedding thread.sleep() function. Can anyone help.
    Thanks.

    drag and drop the java embedding component
    include the following code in it.
    try{ 
    Thread.sleep(60000);
    }catch(Exception e)
    --Prasanna                                                                                                                                                                                                                                                                                                                           

  • On certain web sites(with java applets embedded or rich content),sometimes browser hotkeys are beeing used with other functionality (eg.: youtube uses ctrl + tab for sliding between player controls).How can I prevent this?

    On certain web sites(with java applets embedded or rich content),sometimes browser hotkeys are beeing used with other functionality (eg.: youtube uses ctrl + tab for sliding between player controls).How can I prevent this ?

    Thanks for posting this!
    I would only mention that your definition is incomplete for this -
    Contextual selector A type of Style Sheet Selector that
    and that it's most often referred to now as a Descendent selector, not a contextual selector.  It's basically the same as the Compound selector that you have already defined....

  • Recieving information from Explorer with Java

    Hi
    I don't know if this is possible but what I'm looking to do is create a java pplication the monitor the webpages being view by the user.
    Is there any way that I can pass the URL of the page being viewed in Explorer into my JAVA app.
    Cheers

    I'm not writing spyware. I'm creating a JITIR agent that will run on the users machine 'WITH THERE KNOWLEDGE'.
    I needs to know what page they are presently viewing to perform an analsys of the content.
    Thanks for the History suggestion file I may look into that.

  • How to call java function with parameter from javascript in adf mobile?

    how to call java function with parameter from javascript in adf mobile?

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • Access XI functionality with BAPI

    Hello,
    I'm new in XI theme. There two system: backend system at first and the XI. The problem is, that the backend system from the application need access to XI functionality with BAPI's. I not found for this. Can you get me a hint?
    Thanks and best regards
    Ritchie

    Hi Ritchi,
    in XI in Integration Directory, when you do a receiver determination, you can add multiple receivers and the condition on which reciever is to be selected.....so based on your condition in your source data, your target system will be selected.......
    So you dont need BAPI for this case in XI.
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

  • The troubles with creating SQL function in Java

    Hi!
    I use Oracle 10g and connect to it from Java application. I need in creating SQL functions from Java code.
    In Java I have:
    Statement stm = null; try{     stm = dbConnection.createStatement();     stm.executeUpdate( query ); }catch(SQLException ex){     throw ex; }finally{     try{ stm.close(); }catch(Exception ex){ stm.close(); } }
    And I'm passing the next SQL function:
    create or replace function get_me return number is
    result number;
    begin
    select 5 into result from dual;
    return result;
    end;
    This code is run successful, but I can't call this funtion, because it has status Invalid
    I'm looked the next error: PLS-00103: Encountered the symbol "" when expecting one of the following: . @ % ; is authid as cluster order using external character deterministic parallel_enable pipelined aggregate
    But I don't understand, What the matter? From Oracle Enterprise Manager I can create this function without problems. So, I wrote the wong Java code. Also, I can't find my error :(
    May be, do u have the some ideas?
    Thank you very much!

    Post the whole pl/sql code please.
    To run PL/SQL from within java you'll need callablestatement.
    [here |http://www.idevelopment.info/data/Programming/java/jdbc/PLSQL_and_JDBC/CallPLSQLFunc.java] an example : http://www.idevelopment.info/data/Programming/java/jdbc/PLSQL_and_JDBC/CallPLSQLFunc.java

  • In BAPI Explorer Create Webservice in Tools is missing

    Hello,
    I've exactly the same Problem posted here:
    Re: Unable to see Create Web Service option in Tools tab in BAPI Explorer
    >I am trying to create a Web service for existing BAPI (FlightBooking) in BAPI explorer. Go To BAPI Explorer-->Hierarchical>Basis Components>ABAP Workbench, Java IDE and Infrastructure--
    >FlightBooking After selecting FlightBooking, check the Tools tab Then you should be able to see Create Web Service option. But, I am unable to see the Create Web service option in Tools tab. What could be the problem. Did some one encounter a problem like this before?
    The post was marked as answered but like others mentioned before, this
    is still unresolved. Maybe some can help.
    Kind regards, Ute.
    [Attached Screenshot|http://i49.tinypic.com/14defcg.jpg]

    Hi,
    thanks, for this hint. Sorry but I installed fresh and to hack in the tables can't be the right solution. I don't think SAP suggest to access Database direct to enable or to have a feature.
    Also, with the other way to access the wizard its only possible to create web services for a single function, but not for a object.
    Or how to create for all Business Partners BAPI's / Methods one Service?
    Kind regards, Ute.
    I've added also a Screenshot of the BAPITOOLS Table, i guess first row is the Wizard. Is there something missing or wrong? At least it's not disabled.
    [BAPI Tools Table|http://img97.imageshack.us/img97/2508/bapitoos.jpg]

  • Problem with Java Script after upgrade from BW 3.5 to BI7

    Dear Colleagues,
    We're facing the issue with Java Script after upgrade of BW 3.5 to BI7.
    Just after update we checked the basic functionality and it occured that some of web templates that use Java Script don't work. They generate seelction screen, but after selection the screen becomes blank without any error messages.
    We're currently stucked since web templates weren't converted to BI7 version so they should work exactly as before the upgrade.
    We compared the Java code with other environment that was not upgraded - it's perfectly the same.
    The only explanation that comes to my mind is that some Java Script settings on the server level were changed during the upgrade but I have no idea where I can check that.
    Thanks in advance for any suggestions,
    Andrzej Bobula

    Hi Deepu,
    Thanks, it was great to read your reply and then few minutes later talk to you live on SDN Day!
    Unfortunately, http cache clean-up did not help. But there is another funny thing I found - for exactly the same 3.5 webtemplate html code returned from WebAS 3.5 was different then from 7.0.
    Unfortunately, this editor does not allow to paste complete code, even in CODE brackets, but here are main differences:
    <b>3.5</b>
       if (navigator.appName == "Microsoft Internet Explorer")
    <frame src="/sap/bw/BEx?SAP-LANGUAGE=E&PAGENO=1&REQUEST_NO=1&CMD=GET_TEMPLATE"
    name="Content">
    and
    <b>7.0</b>
       if (navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)
    <frame src="/sap/bw/BEx?SAP-LANGUAGE=E&PAGENO=8&REQUEST_NO=0&CMD=GET_TEMPLATE"
    name="Content" 0nLoad="javascript:loadTitle()">
    (I intentionaly put 0 i/o o in 0nLoad, otherwise Forum's editor does not accept the text.
    How about SAP's claim that technical upgrade from 3.x to 7.0 changes nothing?
    Regards,
    Vitaliy

Maybe you are looking for