Need to start a program in Oracle System (External) from sap program

Hi guys,
     I need to start a program in another oracle based system from sap program by writing native sql statements.
Does anyone have idea how to do this.
Rgds,
Ram

Hi,
Here is another sample for procedures.Kindly reward points by clicking the star on the left of reply,if it is useful.
Code Sample for writing a procedure with input and output parameters
REPORT zzz_jaytest.
* Getting the regno and total as input parameters
PARAMETERS : p_regno(10) TYPE c DEFAULT 'R1000',
                           p_total     TYPE i.
data : v_total type i.
* In this procedure, we are updating the total of a regno given as input.
* Here two parameters used in the procedure are input parameters.
* We are updating the record of regno entered in selection screen and
* adding the total entered to the already existing total. We have to give semicolon
* for the statement inside procedure.
exec sql.
CREATE or replace PROCEDURE PROC1 ( p_regno in char, p_total in number )
IS
    BEGIN
      UPDATE stu_det SET total = total + p_total where regno = p_regno;
    END;
endexec.
* This is the code to execute the procedure for update.
* While executing the procedure, the parameter variable should be
* preceded with colon  :
EXEC SQL.
  EXECUTE PROCEDURE PROC1 ( in :p_regno, in :p_total )
ENDEXEC.
* In this procedure, we are selecting the details for the regno entered
* as input. Here p_regno is input parameter and v_total is used as output
* parameter. So that we can use the retrieved value of v_total in our
* ABAP program
exec sql.
CREATE or replace PROCEDURE PROC2 (p_regno in char, v_total out char)
IS
    BEGIN
      select total into v_total from stu_det
                         where regno = p_regno;
    END;
endexec.
* This is the code to execute second procedure.
EXEC SQL.
  EXECUTE PROCEDURE PROC2 ( in :p_regno, out :v_total )
ENDEXEC.
write : / 'Total of ', p_regno, ' is ', v_total.

Similar Messages

  • System copy from SAP R/3 47x110 with Oracle 10.2 to Oracle 11.2

    Hello,
    I want to do a system copy from SAP R/3 4.7 Enterprise 47x110 with Oracle 10.2 to a new machine with same SAP version but with oracle 11.2. (After this I will upgrade to ERP 6.0)
    I will do this with export/import but I don't find any documentation (manuals or notes).
    I only find this:
    Note 1499877 - Oracle 11.2 for R/3 Enterprise 4.7 Ext. Set 1.10
    but this note is only for a new installation, I don't know if this work with system copy
    Note 516246 - INST- System Copy for SAP Systems based on SAP Web AS 6.20
    This don't have information about oracle 11.2
    I read the manual "Homogeneous and Heterogeneous System Copy for SAP® Systems Based on SAP Web Application Server 6.20" but this also don't say nothing about oracle 11.2
    Can you help me? Where can I find this documentation and what DVDs (master and kernel) should I use?
    Best regards

    Hi Juan,
    Thanks for your answer.
    That is my doubt, what installation master shoud I use for export oracle 10.2 and import in oracle 11.2?
    Note "1499877 - Oracle 11.2 for R/3 Enterprise 4.7 Ext. Set 1.10" say that I can use installation master of R/3 4.7 Set 2 (47x200) to install a new system.
    I found this media:
    51033746_9 Installation Master 6.20/6.40 Linux on x86_64 64bit
    and
    51040087_7 NW 04 SR1 Inst. Mst. Linux x86_64 64bit f. Oracle 10.2/11.2
    I think this is the note that I need:
    Note 1478351 - Oracle 11g Support on UNIX: 6.40-Based SAP Systems

  • BASIS Configuration needed to send an external mail from SAP Program

    Can you please help me about the BASIS configuration needed to send an external mail from SAP Program?
    Regards,
    Subhasish

    Hi Subhasish,
    Please go thru the below link.
    Re: SCOT Configuration--for external mail
    Regards,
    Lakshman.

  • Calling Non SAP programe from SAP program

    Hi Experts...
    Can we cal Non SAP programs Like Windows EXE programs from ABAP programs ?
    If yes Then How .....
    Regards ...
    ..Ashish

    Hi Ashish ,
    Ya we can call a non SAP program from SAP program.
    For example we can call a EXE program from the SAP program using the RFC connection created in SM59.
    In Sm 59 you can create a TCP/IP connection and give the path of the executable there.

  • How to produce beep sound from sap program?

    Hello all,
    Can anybody help me to produce beep sound from sap program.
    I dont want to play a WAV file.
    I just want to produce a BEEP sound.
    Your help is highly appreciated.
    Thanks n Regards
    chandu

    Hi
    Thanks for the quick response.
    I tried the code in ur reply.
    Its not producing any beep sound.
    type-pools: ole2.
    data: return type i,
    sapinfo type ole2_object.
    data: begin of command,
    command(12) type c value 'cmd /c echo ',
    hex07(1) type x value '07',
    end of command.
    create object sapinfo 'SAPINFO' no flush.
    call method of sapinfo 'EXEC' = return
    exporting
    #1 = command
    #2 = 0.
    free sapinfo.
    Is there anyother way??
    Thanks

  • Calling oracle SQL Loader from java program

    Hi,
    I want to insert data into oracle tables from a text files containing fixed length fields. I am using SQLLoader to achieve this. The requirement is to call the SQLLoader within the java program.
    Does anyone know how to call SQL Loader from java program?
    Thanks,
    Varsha

    Simply "exec" the sqlldr program with the parameters you need to pass to it.
    Runtime.exec (........)
    Try to pass all parameters needed including the username and password, and use the option "silent" to avoid output, and the option "log" to have a log file of the modifications that sqlldr has done to the database.

  • How to access system calls from java program?

    i am having a doubt regarding accessing system calls from a Java program like accessing unix system calls from a c program.

    Runtime.getRuntime().exec("line command here");
    example:
    Runtime.getRuntime().exec("ls -la");

  • External Oracle Databse connection from SAP

    Dear all,
    I know that this question has been asked before, but as i am facing some primitive issues so i am again posting my query.
    My requirement is to connect to an external ORACLE db from SAP and read data from that server. That ORACLE db is located in a different m/c altogether. I was trying to connect by making settings in DBCON -
    CON NAME= ORA_TEST
    DBMS= ORA
    USER NAME= administrator
    PASSWORD= (some pwd)
    CON ENV= ????? (what is to be put here)
    And I know that we have to make some corrections in tnsnames.ora file, but I am unable to find that file in SAP system. Where can I find this file ???
    Do we have to make one RFC connection as the SAP and ORACLE servers are in diff m/c and then do the connection, but this is just my guess??
    And if any RFC is at all required then what should be the parameters for that connection.
    Kindly help me in resolving the issue.
    1. CON ENV ?
    2. tnsnames.ora ?
    3. Any RFC needed ?
    Points will definately be rewarded.
    Thanks,
    Saurabh.

    Hi,
    I have done the required settings everywhere but the connection is failing.
    The tnsname.ora file is located in my Oracle client directory and the settings done there are -
    LEVEL2 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST =  
                                192.167.40.54)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = level2)
    in DBCON i have made the following entry -
    1. DB Connection : NEWORA
    2. DBMS :             ORA
    3. User Name :       User Name external oracle database
    4. DB Password :   Password external oracle database
    5. Conn Info :         level2
    and my ABAP code looks like -
    DATA: BEGIN OF wa,
    ncli(20) TYPE c,
    num(20) TYPE c,
    END OF wa.
    DATA: dbs TYPE dbcon-con_name.
    DATA: con(20) TYPE c.
    DATA : ls_wa LIKE wa.
    dbs = 'NEWORA'. "DB Connection in DBCO
    EXEC SQL.
    connect to :dbs
    ENDEXEC.
    EXEC SQL.
    GET CONNECTION :dbs
    ENDEXEC.
    WRITE : dbs.
    EXEC SQL PERFORMING loop_output.
    select bundle_cnt, job_id from GHCBRMRT.RML_BUNDLE into :ls_wa
    ENDEXEC.
    FORM loop_output.
    WRITE: / ls_wa-ncli,
    ls_wa-num.
    now my dilemma is how SAP will recognize in DBCON what really "level2" means ?? as the settings are there in ORACLE directory and not inside SAP system.
    the dump error msg that I am getting is -
    Runtime Errors         DBIF_DSQL2_CONNECTERR
    Except.                   CX_SY_NATIVE_SQL_ERROR
    Date and Time          13.08.2008 10:20:47
    Short text
         Error setting up a secondary database connection
    What happened?
         Connection to database system not possible with 
          identifier "NEWORA".
    Missing Handling of System Exception
         Program                                 YY_NEW_CONN
    Kindly help in this regard as where I am going wrong.

  • PING Process :: Checking App System availability from SAP R/3

    Hi
    Our requirement is to check Whether Application System is UP or DOWN before sending the data from SAP Server like Pinging the  application system from SAP System.
    We are using the Web Service as Target Application System & SAP R/3 as Source System now SAP R/3 will call one RFC ( like <i>Z_Ping</i> ) before calling any other RFC to send data to WebService. Following is the configuration -->
    <b>SAP R/3 -- Sender RFC Adapter -- SAP XI -- Rec SOAP Adapter -- App System ( Web Service )</b>
    Now can you tell me what is the appropraite way to do this, because in case of System Error ( in case when WebService is down  or Server on which WS is installed is down ) XI is not receving any exception payload so no mapping is happening.
    Though I created the " <u><i>Error</i></u> " xsd & used it as a Fault message but the mapping is not getting initiated.
    Can you tell me how I can achieve this & suggest me the design specification.
    Best Regards
    - Lalit -

    hey
    u can do this using alerts,configure alerts so that it gets triggered whenever anythin wrong happens with Z_ping.and if response is negative then dont send subsequent messages.
    alerts will always work irrespective of mapping.
    but one thing is that triggering/not-triggering the subsequent message will be manual coz u need to check the alert before u send messages
    thanx
    ahmad
    Message was edited by:
            Ahmad

  • Source System changes from SAP System to BI Warehouse on ECC activation

    We are in the process of building a new development environment from an existing development environment.
    After copying from system backup in the new development environment we performed BDLS to map to new source systems. At this point of time the source system for ECC ("SAP System from Release 3.0E" was changed to type "SAP Business Information Warehouse".
    Why does this happen?
    How can we prevent this?
    Thanks for your help.

    Hello.
    Please check the following note if ti can be helpful to fix this issue.
    1087980-ECC Source systems appearing in BI folder
    Thanks,
    Walter Oliveira,

  • Getting exception whil calling an oracle stored procedure from java program

    Dear All,
    I encounter this error in my application when I call only the stored procedure but the view is executing fine from the application and my environment is as follow:
    Java 1.4
    oracle 10g
    oracle jdbc driver:9.2.0.8.0
    websphere portal 6.0.0.1
    this error is occur from time to time randomly, when it happens, the only workaround is to restart the server..Does anyone have any idea about this error?
    Unable to execute stored Procedure in Method
    java.lang.NullPointerException
    at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java(Compiled Code))
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1140)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3606)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:5267)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:632)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:427)
    And sometime I am getting this exception
    Unable to execute stored Procedure in Method
    java.lang.ArrayIndexOutOfBoundsException: 27787320
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java(Compiled Code))
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1134)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3606)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:5267)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:632)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:427)
    Thanks
    Jay

    spacetorrent escribi&oacute;:
    for (int x=0; x <result.size(); x++){
    System.out.println(result.get(x));
    I can't do this, because result object is a Map, and I need write the Key of the Value to obtain.
    So I can do:
    result.get("res");And I odtain a *$Proxy3* Object

  • How to execute system command from java program

    Hi all,
    I want to change directory path and then execute bash and other unix commands from a java program. When I execute them separately, it's working. Even in different try-catch block it's working but when I try to incorporate both of them in same try-catch block, I am not able to execute the commands. The change directory command works but it won't show me the effects of the bash and other commands.
    Suggestions??

    The code I am using is....
    try
    String str="cd D:\\Test";
    Process p=Runtime.getRuntime().exec("cmd /c cd
    "+str);your str string is already having cd in it but again you ar giving cd as part of this command also please check this,i will suggest you to remove cd from str
    Process p1=Runtime.getRuntime().exec("cmd /c mkdir
    "+str+"\\test_folder");you should say mkdir once you change your path,but here you are saying mkdir first and then cd D:\Test(this is because of str)..please check this
    Process p2=Runtime.getRuntime().exec("cmd /c bash");
    Process p3=Runtime.getRuntime().exec("cmd /c echo
    himanshu>name.txt");
    catch(IOException e)
    System.err.println("Error on exec() method");
    e.printStackTrace();
    Message was edited by:
    ragas

  • Invoking system utilities from java program

    Hi, I'm trying to write a program which will invoke system utilities when the user selects an appropriate option. The following code is a part of my app. But the problem is that I am not able invoke system utilities like chkdsk and disk defrag, which have specific exe's in system32 folder. I am able to invoke other exe's like Notepad.exe with the same code.
    import java.lang.*;
    public class Exec
    public static void main(String args[])
    try
    String [] st = {"C:\\WINDOWS\\system32\\chkdsk.exe"};
    Runtime var=Runtime.getRuntime();
    var.exec(st);
    catch(java.io.IOException e)
    Please tell me the problem and it's solution.

    Hi
    I am sending Class file .Call execute(String[] args) method in your class Exec file.
    it will print out put on screen .It works fine for me.
    I am using Windows NT .SO i used 'C:\\WINNT\\system32\\chkdsk.exe' execute command.
    Let me know any more infromation
    public class run {
         boolean flag = true;
         String message = "";
         String msg = "";
         String Error = "";
         Process p = null;
         public String execute(String[] args) {
                   try {
                        System.out.println("Please read it first here");
                        //run.getOutput(cmd,"call.txt");
                        StringBuffer sb = new StringBuffer();
                        StringBuffer sb1 = new StringBuffer();
                        p = Runtime.getRuntime().exec(args);
                        InputStream in = p.getInputStream();
                        InputStream in1 = p.getErrorStream();
                        int c;
                        while ((c = in.read()) != -1) {
                             //System.out.print("reached here---message ");
                             char ch = (char) c;
                             System.out.print(ch);
                             sb.append(ch);
                        System.out.println("Input String Buffer" + sb.toString());
                        msg = sb.toString();
                        int c1;
                        while ((c1 = in1.read()) != -1) {
                             flag = false;
                             //     System.out.println("reached here error ---message ");
                             char ch = (char) c1;
                             sb1.append(ch);
                        System.out.println("Error message is herr---" + sb1.toString());
                        Error = sb1.toString();
                        if(flag==false) message="EROOR :"+Error;else message="SUCCESS FULL:"+msg;
                        System.out.println("message value---"+message);                    
                   } catch (Exception ex) {
                        flag = false;
                        System.out.println("errror here" + ex);
                        return ex.getMessage();
                   System.out.println("message is here---" + message);
                   p.destroy();
              return message;
    Call
    public class Exec
    //import
    public static void main(String args[])
    try
    String [] st = {"C:\\WINNT\\system32\\chkdsk.exe"};
    System.out.println("Reached hefre ");
    run r=new run();
    r.execute(st);
    System.out.println("Reached after exect hefre ");
    catch(Exception e)
    System.out.println(" exception00---"+e);

  • Read Java System Property from another program

    I'm actually talking about the parameters you can set on the Java Control Panel when deploying applets.
    I have to check if one parameter is passed (-Dsun.java2d.noddraw=true) from a C++ program I'm writing.
    I can check the <%AppData%>\Sun\Java\Deployment\deployment.properties file for the entry sun.java2d.noddraw=true. But this doesn't guarantee anything, if it isn't there maybe is set in the console (which has to store settings somewhere).
    Is there a way of checking if DirectDraw is disabled for an already running Applet?
    Thanks

    renoraines wrote:
    Yes, I'm talking about two different processes.
    It'd be great if the Java Console stored everything in the registry, if it does, do you happen to know where?set the value and then use regedit to search for it.
    >
    But the property I have to check only has effect at startup of the VM, so it may have been set at startup and then "deleted from the registry", so i would go there and find nothing, but DirectDraw is disabled anyway.That of course is what I meant by restricting the space. What if there are two different browser types running? What if an update occurs after your C++ app has started?
    Given that you are going to run a C++ app on the client anyways why not just make the applet tell you, via a socket, what it is set to?

  • Getting hold of operating system windows from java program

    I want to make a java desktop application that is aware of other windows on the desktop. Targetted primarily for windows xp/vista.
    It should be able to "find" the current windows on the desktop (running from other applications) and draw a textual message ontop of them.
    Is this at all possible with java? And if so, can someone give me a point in the direction to take. What i would need first is a way to get hold of the windows, basically their size and x,y values somehow from within the java code...

    I want to make a java desktop application that is aware of other windows on the desktop. Targetted primarily for windows xp/vista.
    It should be able to "find" the current windows on the desktop (running from other applications) and draw a textual message ontop of them.
    Is this at all possible with java? And if so, can someone give me a point in the direction to take. What i would need first is a way to get hold of the windows, basically their size and x,y values somehow from within the java code...

Maybe you are looking for

  • I need an alert message if I press ctrl shift b

    Hi All, I Need an alert message if I Press "ctrl+shift+b"(to make the selected text bold). Is this possible? Regards, Chinna

  • ITunes reports "Apple Mobile Device" service error

    After much posting and messing around to find a solution to my service crash issues, I have some advice for others to share. PROBLEM: If you launch "iTunes" and receive a message indicating that: This i<device> cannot be used because the Apple Mobile

  • No default applications to open items with varied extentsions

    Not being the most technologicaly advanced human here...I repeeatedly am unable to open downloaded files with any extensions other than the basic ones. Right now there are desktop files with .asf, .exe,.wmv extensions that when I try to open them I g

  • System Recovery that worked for me.

    I've read soooooooo many complaints about Toshiba purchasers being unable to restore their laptops with their XP Recovery Discs.  The usual answer from the experts on this site is that you need a new disc or your DVD drive is defective.  Of course, y

  • How to make a multimeter in multisim using LabVIEW

    Hello there, I want to make a multimeter in Multisim using LabVIEW. And I have read this article http://zone.ni.com/devzone/cda/tut/p/id/5635#toc3 before. And now I have these questions: 1. How to measure a resistor? The Impedometer.llb in lvinstrume