Calling java program in bipublisher

Hi,
Like we have datamodel types in BIPublisher as SQL Query, Webservice, Answers, File etc,, Can we call java program through bipublisher.
The requirement is:
A java program will generate BARCODE image based on the customer number given.
We need to create a template in bipublisher which shows the customer name and that barcode image and other details.
We have calling javaprograms in ibots in analytics, is there any such thing in bipublisher.
Thanks.

You can call PL/SQL programs from OWB either by defining transformations or as expressions. From PL/SQL you can call a java stored procedures in the database as follows:
1. Define the java stored procedure. For example, let's suppose that you store the following Java class in the database:
import java.sql.*;
import oracle.jdbc.driver.*;
public class Adjuster {
public static void raiseSalary (int empNo, float percent)
throws SQLException {
Connection conn = new OracleDriver().defaultConnection();
String sql = "UPDATE emp SET sal = sal * ? WHERE empno = ?";
try {
PreparedStatement pstmt = conn.prepareStatement(sql);
pstmt.setFloat(1, (1 + percent / 100));
pstmt.setInt(2, empNo);
pstmt.executeUpdate();
pstmt.close();
} catch (SQLException e) {System.err.println(e.getMessage());}
2. The class Adjuster has one method, which raises the salary of an employee by a given percentage. Because raiseSalary is a void method, you publish it as a procedure using this call spec:
CREATE PROCEDURE raise_salary (empno NUMBER, pct NUMBER)
AS LANGUAGE JAVA
NAME 'Adjuster.raiseSalary(int, float)';
3. Call procedure raise_salary from an anonymous PL/SQL block, as follows:Long postings are being truncated to ~1 kB at this time.

Similar Messages

  • Error while calling java program from ABAP

    Hi Experts,
    We are trying for RFC inbound scenario.
    We followed the below blog
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    We are working with SAP JCO 3.0.2
    We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
    After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
    If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
    But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
    'STFC_CONNECTION' could not be found in the server repository.
    If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
    'RFCPING' could not be found in the server repository.
    We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
    Please help us in resolving this issue.
    Thanks
    Prince

    Pabi,
    Using the RFC connection,we can establish a link between Java and SAP.
    Afterwards,hope we can call Java program from ABAP.
    Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
    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 = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
    CALL FUNCTION 'STFC_CONNECTION'
       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.
    Regards,
    Sree

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • Calling Java program from ABAP

    Hi All,
    my ABAP program downloads one file to one folder. Then one Java program is running to Encrypt the file.
    Now , they want to call the JAVA program in ABAP, so that they can encrypt the file before downloading.
    Is it possible to call a Java program from ABAP ? If Yes, please give me the detailed procedure.
    Thanks
    pabi

    Pabi,
    Using the RFC connection,we can establish a link between Java and SAP.
    Afterwards,hope we can call Java program from ABAP.
    Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
    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 = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
    CALL FUNCTION 'STFC_CONNECTION'
       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.
    Regards,
    Sree

  • How to call java program by HTML page

    Hi guys,
    I'm new java programer and want to build an HTML page to access to ORACLE database on NT server by JDBC, Can anyone give me a sample?
    I already know how to access database by JDBC, but I don't know how to call java program by HTML page.
    If you have small sample,pls send to me. [email protected], thanks in advance
    Jian

    This code goes with the tutorial from this web page
    http://java.sun.com/docs/books/tutorial/jdbc/basics/applet.html
    good luck.
    * This is a demonstration JDBC applet.
    * It displays some simple standard output from the Coffee database.
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.util.Vector;
    import java.sql.*;
    public class OutputApplet extends Applet implements Runnable {
    private Thread worker;
    private Vector queryResults;
    private String message = "Initializing";
    public synchronized void start() {
         // Every time "start" is called we create a worker thread to
         // re-evaluate the database query.
         if (worker == null) {     
         message = "Connecting to database";
    worker = new Thread(this);
         worker.start();
    * The "run" method is called from the worker thread. Notice that
    * because this method is doing potentially slow databases accesses
    * we avoid making it a synchronized method.
    public void run() {
         String url = "jdbc:mySubprotocol:myDataSource";
         String query = "select COF_NAME, PRICE from COFFEES";
         try {
         Class.forName("myDriver.ClassName");
         } catch(Exception ex) {
         setError("Can't find Database driver class: " + ex);
         return;
         try {
         Vector results = new Vector();
         Connection con = DriverManager.getConnection(url,
                                  "myLogin", "myPassword");
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);
         while (rs.next()) {
              String s = rs.getString("COF_NAME");
              float f = rs.getFloat("PRICE");
              String text = s + " " + f;
              results.addElement(text);
         stmt.close();
         con.close();
         setResults(results);
         } catch(SQLException ex) {
         setError("SQLException: " + ex);
    * The "paint" method is called by AWT when it wants us to
    * display our current state on the screen.
    public synchronized void paint(Graphics g) {
         // If there are no results available, display the current message.
         if (queryResults == null) {
         g.drawString(message, 5, 50);
         return;
         // Display the results.
         g.drawString("Prices of coffee per pound: ", 5, 10);
         int y = 30;
         java.util.Enumeration enum = queryResults.elements();
         while (enum.hasMoreElements()) {
         String text = (String)enum.nextElement();
         g.drawString(text, 5, y);
         y = y + 15;
    * This private method is used to record an error message for
    * later display.
    private synchronized void setError(String mess) {
         queryResults = null;     
         message = mess;     
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();
    * This private method is used to record the results of a query, for
    * later display.
    private synchronized void setResults(Vector results) {
         queryResults = results;
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();

  • How i can call java program in VB2005 ?

    Hi members...
    Please...please...please...
    If any one now how i can call java program in VB.net program and open it ,please i want now the way to do it by details and by examples and step step to do it ,,..
    thanks ...

    If your server does not return to the command prompt, write a java programm which starts your server and returns to the command prompt.
    An example for an application like this:
    import java.io.IOException;
    public class StartApp
    public static void main(String[] args)
    if (args.length > 0)
    StringBuffer cmd = new StringBuffer();
    for (int index = 0; index < args.length; index++)
    cmd.append(args[index] + " ");
    try
    Runtime.getRuntime().exec(cmd.toString());
    catch (IOException ioe)
    System.out.println("Error: command not found: " + cmd.toString());
    else
    System.out.println("Error: missing arguments");
    An example for starting your server with that programm:
    /usr/bin/java -jar ./StartApp.jar /usr/bin/java -jar ./myServer.jar
    It works. Have fun.

  • Is there any way to call java program whenever i login to R3 System.?

    Hi Experts
    Is there any way to call java program whenever i login to R3 System.
    Means Whenever the user login to R3 system i should trigger one java program.. Is there any way
    Please help me
    Thanks & Regards
    Ravi Shankar B

    If you want to access to the Windows Taskbar, you should call some Win32 APIs and JNI. Refer to Win32 references.

  • Calling Java programs from Oracle Stored Procedure

    Is it possible to call Java programs from Oracle stored procs? If possible Can this be used to exchange data from other applications? Is there a better method/feature in oracle for doing data exchange with other apps?

    If what you mean by Oracle stored procedures is pl/sql then yes.
    You can create a "wrapper" this way:
    CREATE OR REPLACE FUNCTION xmlXform
    in_mapUrl IN VARCHAR2,
    in_inputUrl IN VARCHAR2
    RETURN VARCHAR2
    AS
    LANGUAGE JAVA NAME
    'com.yourcompany.xml2any.xform(java.lang.String,java.lang.String)
    RETURN java.lang.String';
    Then load the java as:
    loadjava -user youruser/youruserpasswd -resolve -verbose lib/xmlparserv2.jar classes/com/yourcompany/xform.class classes/com/yourcompany/xml2any.class
    The java, given the correct permissions, can do anything java can do including communicate with outside applications.
    Is this the "best" way... depends on what you are trying to accomplish.

  • Double-click any file on desktop, calling JAVA PROGRAM

    hi guys,
    i'm breakin my head on doin this prog....when we double click a file icon of any file extension, my another
    java program should be called.
    how to do this???
    pls send a sample code........asap!!!!!!!!!
    regards,
    Sam...

    If you are using windows you could probably make a file association (for all extension types) to a batch file that in turn fires off 'java YourClass params_here'
    - but if you (can) do this, won't you screw up your desktop - ie doubleclicking on an .xls or .doc will never fire up Excel or Word, unless you change the file extension associations back to what they were before? This would make your pc kind of strange to use...??!!
    hi guys,
    i'm breakin my head on doin this
    doin this prog....when we double click a file icon of
    any file extension, my another
    java program should be called.
    how to do this???
    pls send a sample code........asap!!!!!!!!!
    regards,
    Sam...

  • Call Java program in APEX

    Hi, I am an APEX newbie... I need to call a Java program (.JAR file) from a PL/SQL script inside an APEX application. My question is, does the JAR file need to be in a particular place (and if so, what's the best way to get it there)?
    - somewhere in the APEX database?
    - somewhere in the production database (9i)?
    - could it be called if it resides on a shared network drive?
    Any help would be appreciated... everything I've found thus far tells me to use the loadjava tool to get it onto the prod. database, but I want to make sure that there isn't an easier option as I've had some trouble with that.
    Thanks in advance...
    Kenny

    Hi,
    If you want to call the method of the java class that is stored in the jar you have to make this jar file accessible to the client.
    1/ The jar file can be stored in the database by using loadjava utility
    E.g. loadjava -u scott/tiger -resolve yourjavapackage.jar
    More details on http://www.oracleutilities.com/OSUtil/loadjava.html
    and http://www.csee.umbc.edu/help/oracle8/java.815/a64683/tools1.htm
    1.1/ Once the jar file is in the database you can access it's object methods by defining the pl/sql function that is able to call particular java method
    E.g.
    FUNCTION jCreateDir (dir varchar2, checkExistsOnly number, grantRootDir varchar2)
    RETURN NUMBER as LANGUAGE java
    NAME 'mypkg.Utils.createDirectory(java.lang.String, int, java.lang.String) return int';
    Above function then calls the java method defined in the class included in the jar file (jar file is just an archive of the java classes - to bundle several classes, images... in one file)
    The example contents of the java class
    package mypkg;
    import java.io.File;
    public class Utils {
    public static int createDirectory(String dir, int checkExistsOnly, String grantScriptDir)
    ///some code here
    1.3/ So if you know what method to call, what are the input parameters and return value you can create your calling procedure/function in pl/sql
    I am not very sure if you can load jar files containing the classes that render some user interface items(buttons,panels etc - items from awt or swing package) so basicaly load just the code that performs actions like computation/ xml transformation/ file I/O so anything that does not require GUI items.
    2/ If your jar file contains the objects that display some user interface control or you need to call the java from the javascript then you need to embed your jar file in the html code by using <OBJECT > or <APPLET> tag
    Re: Open program in FF
    Rado

  • How to call JAVA program having input & output parameter

    Hi Experts,
    Require ur help in calling a java program in ODI which has input parameter & I need to also get the output of the java program.
    I have a java program which I execute through command prompt with input parameters required for the program.
    Also I need to get the output of the same java program & need to pass it as input to another Java program.
    kindly help...how to implement the java program in ODI as I have not worked on Java.

    Hi experts,
    kindly help...

  • Call Java Program from ABAP Program

    Dear all,
    In our scenario, we need to let ABAP call services provided by a standalone Java program. From online help I found some overview introduction and I'd make the called program a registered program in a RFC with type "T" (TCP/IP Connection). Can anybody give some concrete documentation? A step-by-step guide would be greatly appreciated.
    Best Regards
    Jerome

    check this thread
    Re: Calling Java API from ABAP using JCo

  • How to call java program from javascript

    Hi,
    I have an java program which will transform one xml to another xml using XSLT.
    I want to call this java program from Javascript? Is this possible? Please suggest me.
    Thanks,
    Gopal

    is it not possible?
    do i have to refresh the page and read in the values like...
    <%
    String ename = request.getParameter( "EmployeeName");
         session.setAttribute( "ename", ename);
    %>and then call the class from here?
    looking around ive come across ajax but i dont know how to use it and what you need to install and if its compatable with tomcat and jsp?
    is ajax better or not really worth it?
    i have anything up to 100 fields that need saving at one save click

  • Can i call java program from VC++ code...... Urgent!

    hi,
    I have VC++ code.
    I want to run java program from VC++ (SDK).
    Can I call it?
    plz help it's urgent....
    thanks in advance...

    We do it all the time using the JNI invocation API (this is actually how the java.exe application works).
    Here's a tutorial I just found (not sure how good it is, but it should get you going):
    http://www.inonit.com/cygwin/jni/invocationApi/
    One note: If you are going to be invoking the JVM from different threads in your native app, there is some special handling you will have to do - the above tutorial doesn't address this scenario (a dig through the JNI docs should help with that one, though).
    Cheers,
    - K

  • Calling java program from PL/SQL code

    Dear,
    How to develop and call a java program from PL/SQL code?
    What about if this program will call other java programs?

    Perhaps the Java Developer's Guide would be a good place to start
    http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/toc.htm
    Justin

Maybe you are looking for

  • CreatePDF Plug-in Not Loaded

    When I downloaded Acrobat XI Pro, it appears that the CreatePDF feature was certified for the product, but not loaded. I was under the impression that it was a part of the download, and now need to load the plug-in. I am unaware as to how to obtain t

  • ALV list out by microsoft excel

    when I use mirosoft excel to output some standard ALV list (CtrlShiftF7) , there will be something lost in the last line. Why does it happen and how can I resolve it?

  • PICTURES DIS-COLOURATION

    HIYA...I HAVE A NOKIA LUMIA 710.....I HAD THE SCREEN REPLACED AND EVERYTHING ELSE WORKS PERFECT APART FROM THE PICTURES THAT WERE ONCE OK ARE NOW VERY PIXELATING AND BULKEY COLOURS...SORRY ABOUT THE DISCRIPTION BUT THATS THE BEST WAY I CAN DESCRIBE I

  • Publishing Dreamweaver page through iWeb?

    I have a website that I've designed through Dreamweaver. I actually have designed the basic look - is there an easy way to past the html into iWeb so that I can use the desgin/layout I have come up with? Thanks

  • Importing a purchased itune into FCP

    Having some stange trouble with importing an itune I purchased through the music store into final cut pro. It imports but with no sound. The file has a little padlock sign on it wondered if that was the reason - also thought it maybe the wrong type o