How to run function

i created function to see output how should i
thanks in advance

you can
select myfunction(params) from dual
or if it inserts/updates/deletes then
DECLARE
  v_out  <type of output variable>
BEGIN
  v_out := myfunction(params);
  dbms_output.put_line(to_char(v_out) );
END;

Similar Messages

  • How to run function(s) on ANY program exit?

    I can easily do this when someone selects "Exit" from the program's menu, with this code:
    AllSortsOfExitCode()
    System.out.println("Ok, everything is wrapped up. Now we will end the program.");
    System.exit(0);
    BUT...how do you get this code to run when someone clicks the little X in the upper-right hand corner?
    I can't figure out how to do that.
    I need to override the class destructor or something, but I don't think Java has destructors in the classic sense. I found one 4-page thread about "Java destructors" but it was just an argument between a couple people -- I didn't learn anything from it.
    Thanks,
    Matthew

    CathInfo wrote:
    BUT...how do you get this code to run when someone clicks the little X in the upper-right hand corner?
    Thanks,
    MatthewThe earlier replies cover the case you described above. But your thread title says something else:
    How to run function(s) on ANY program exit?Answer - you can't. Power loss can't be handled. Shutdoen hooks can help with most other conditions, see
    http://www.google.com/search?num=100&hl=en&c2coff=1&q=java+shutdown+hook&btnG=Search

  • How to run functions when changing states?

    Hi everybody
    I want to run function when changin states
    For example I change my state and write something on Panels title and when this state appears i want to read my title and to do smth
    How can I do it. Where is my mistake?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle"
        width="340" height="250"
        layout="absolute"
    currentStateChange="StateChangez();">
    <mx:Script>
    <![CDATA[
    public function StateChangez():void
    if (currentState=='a')
    //Alert.show('a');
    if (Panel1.title=='New')
    Alert.show('New');
    else
    Alert.show('Edit');
    else
    Alert.show('b');
    ]]>
    </mx:Script>
    <mx:states>
      <mx:State name="a">
       <mx:RemoveChild target="{button1}"/>
       <mx:RemoveChild target="{button2}"/>
       <mx:AddChild position="lastChild">
        <mx:Panel x="0" y="40" width="340" height="210" layout="absolute" id="Panel1">
        </mx:Panel>
       </mx:AddChild>
       <mx:RemoveChild target="{button3}"/>
      </mx:State>
      <mx:State name="b">
       <mx:RemoveChild target="{button2}"/>
       <mx:RemoveChild target="{button1}"/>
       <mx:RemoveChild target="{button3}"/>
       <mx:AddChild position="lastChild">
        <mx:Label x="10" y="222" text="b"/>
       </mx:AddChild>
      </mx:State>
    </mx:states>
    <mx:Script>
      <![CDATA[
       import mx.controls.Alert;
      ]]>
    </mx:Script>
    <mx:Button label="New" x="10" y="10" id="button1" click="currentState='a';Panel1.title='New';"/>
    <mx:Button x="68" y="10" label="Edit" id="button2" click="currentState='a';Panel1.title='Edit';"/>
    <mx:Button x="10" y="218" label="b" click="currentState='b';" id="button3"/>
    <mx:Button x="265" y="10" label="Read" click="StateChangez()"/>
    </mx:Application> 
    Message was edited by: AtomicRussian

    Hi,
    I think your event handler "StageChangez()" is called before your Panel title is set. Try first change title, then change currentState.
    Oh yes my mistake, you are adding it when state changes. You can put your Panel's title change in StageChangez() and after that you can do some actions.
    Regards,
    Adrian
    Message was edited by: AdrianWiecek

  • How to Run Function Modules.

    Hi folks.
    How do you run function modules?
    e.g.
    The function module
    RSBB_URL_PREFIX_GET will show information on URL prefix, path and server name in order to configure for web reports.
    I am trying to figure out  how to carry out the task step by step on BW system.
    Thank you.
    Kara.

    Hi:
    Test run in BW -
    go to transaction SE37
    RSBB_URL_PREFIX_GET
    give this info when you hit Test/Execute
    Handler class: CL_RSR_WWW_HTTP
    Protocal:
    Message Server: X
    Hit execute again.
    Chamarthy

  • How to run ABAP Function Module in Background Wchich Takes Long Time to Run

    How to run ABAP Function Module in Background FOR LONG TIME
    I am not that experienced with ABAP. I am on SAP BI 7.0. I WANT TO RUN A FUNCTION MODULE
    RSDRT_INFOCUBE_DATA_COPY.
    I used SE37 and then executed the module, I supplied  the parameters on the form which opped-up and then  program started running. . Program was however interrupted after 10 minutes by ABAP. How can I run  it in background without interruption?
    THANKS A LOT.

    Hi,
    You can call this FM in a program and run that program in background.
    Regards,
    Raju

  • How to run ABAP Function Module in Background FOR LONG TIME?

    I am not that experienced with ABAP. I am on SAP BI 7.0. I WANT TO RUN A FUNCTION MODULE
    RSDRT_INFOCUBE_DATA_COPY.
    I used SE37 and then executed the module, I supplied  the parameters on the form which opped-up and then  program started running. . Program was however interrupted after 10 minutes by ABAP. How can I run  it in background without interruption?
    THANKS A LOT.

    Change parameter rdisp/max_wprun_time.
    Default value for this is 600 seconds (10minutes).Change it to a time which you think you need for copying infocube data.
    May be 5 hours.
    PS:You can not run Function Module in background directly,but you can create a Z* program and call that FM from within that program and then run the program in background.
    Hope this answers your query. Best of Luck!
    Thanks and Regards
    Anindya
    Edited by: Anindya Bose on Jun 30, 2009 1:24 PM

  • How to run the recursive function in jsp

    hi, can any body tell me how to run
    rrays.sort(files);
    for (int i = 0, n = files.length; i < n; i++) {
    for (int indent = 0; indent < indentLevel; indent++) {
    System.out.print(" ");
    if (files.toString().endsWith(".jsp"))
    System.out.println(files[i].toString());
    if (files[i].isDirectory()) {
    listPath(files[i]);
    indentLevel--;
    this code in jsp
    thanks in advance

    Why are you writing scriptlets and functions in JSPs?
    Functions are supposed to be written in the Java Application layer.
    JSPs are best suited only to display information.
    Also why are you using Scriptlets insted of JSTL ?
    Anyway, if you want to write in JSPs only , here's how to write a function in them: http://forum.java.sun.com/thread.jspa?threadID=496577&messageID=2341986 you can figure out the rest.

  • How to run a function

    Hi,
    can anyone tell me how to run this functions while generating reports for labels.
    please i need some guidance.
    create or replace function get_label_nextval(p_label varchar2) return integer
    is
    l_last_num integer;
    cursor c_label is
    select last_num from label_id where label = upper(trim(p_label)) for update wait 10;
    pragma autonomous_transaction;
    begin
    open c_label;
    fetch c_label into l_last_num;
    if l_last_num is not null then
    l_last_num := l_last_num + 1;
    update label_id set last_num = l_last_num where current of c_label;
    commit;
    end if;
    close c_label;
    return l_last_num;
    end;
    Thanks and Regards

    ORA-06519: active autonomous transaction detected and rolled back
    Cause: Before returning from an autonomous PL/SQL block, all autonomous transactions started within the block must be completed (either committed or rolled back). If not, the active autonomous transaction is implicitly rolled back and this error is raised.
    Action: Ensure that before returning from an autonomous PL/SQL block, any active autonomous transactions are explicitly committed or rolled back.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/e4100.htm#sthref2110
    I think your COMMIT should be moved outside your IF.
    Commit just before your RETURN, after your CLOSE CURSOR statement.
    Edited by: hoek on Jan 4, 2010 1:28 PM typo

  • Calculate how long a function takes to run

    I would like to know how to find out how long the function will take to run
    public int[][] MatrixMultiplication(int[][] MatrixA, boolean[][] MatrixB) {
            int result[][] = new int[number_positions + 2][number_positions + 2];
            int temp = 0;
            for (int j = 0; j < number_positions + 2; j++) {
                for (int i = 0; i < number_positions + 2; i++) {
                    for (int k = 0; k < number_positions + 2; k++) {
                        temp = (MatrixB[j][k])? 1 : 0; 
                        //result[i][k] += MatrixA[i][j] * MatrixB[j][k];
                        result[i][k] += MatrixA[i][j] * temp;
            return result;
        }

    gamewell wrote:
    I would like to know how to find out how long the function will take to runNote that you need to repeat the multiplication N times and clock that. Select N so the total time is at least 1 second. Then you divide the total time with N to get the average time per call.
    public int[][] MatrixMultiplication(int[][] MatrixA, boolean[][] MatrixB) {
    int result[][] = new int[number_positions + 2][number_positions + 2];
    int temp = 0;
    for (int j = 0; j < number_positions + 2; j++) {
    for (int i = 0; i < number_positions + 2; i++) {
    for (int k = 0; k < number_positions + 2; k++) {
    temp = (MatrixB[j][k])? 1 : 0; 
    //result[i][k] += MatrixA[i][j] * MatrixB[j][k];
    result[i][k] += MatrixA[i][j] * temp;
    return result;
    }If you care about efficiency you should remove invariants from the innermost loop. As you can see i and j don't change and because array accesses are expensive they should be removed. Also why perform the multiplication with 0 when you know it will have no effect? It's better to avoid that case.
    // innermost loop
    boolean[] mb = MatrixB[j];
    int[] res = result;
    int m = MatrixA[i][j];
    for (int k = 0; k < number_positions + 2; k++) {
    if (mb[k])
    res[k] += m;
    Now everything that's constant has been removed and only what depends on k is left. With very few iterations in the innermost loop this may not pay off but it's worth a try.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to run 'Get-AssignedAccess' or 'Set-AssignedAccess' power shell commands in c# Application

    Hi,
    I have console application using which i am trying to run power shell command  like 'Get-AssignedAccess' or 'Set-AssignedAccess'.
    i am using below code for this it is throwing exception 'Get-AssignedAccess' doesn't exist in cmdlet which is correct because these commands belongs to function category.
    using (PowerShell pwInstance = PowerShell.Create())
                            pwInstance .AddScript("Get-AssignedAccess");
                            var result = pwInstance .Invoke();
    How can we execute this kind of command using c#?
    Thanks,

    Hi prakashlight,
    Thank you for comming back and tell us the result. For more information about how to run PowerShell script in C# language, you can refer to this blogpost here:
    Executing PowerShell scripts from C#
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to run a job in background programatically after 10 sec

    Hi Forum,
    Can anyone tell me How to run a job in background programatically after 10 sec..
    Thanks in advance

    Hi,
    Here is the example code
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    * Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum    " You need to give the Date for execution the Job
                sdlstrttm        = sy-uzeit    " You need to give the Time for execution the Job
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    * Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    * Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Regards
    Sudheer

  • How to run a dialog's method from a button's event handler?

    I've created my first dialog from the samples, but I am having trouble figuring out how to run a method in my dialog from an button's event handler. Can anyone please point me in the right direction?
    function CreateDialog() 
        this.windowRef = null;
    CreateDialog.prototype.run = function()
        //...declare a bunch of vars
        // Create a window of type palette.
        var win = new Window("dialog", "Element Spray Generator",[iTop,iLeft,iTop + iWidth,iLeft + iHeight] );  // bounds = [left, top, right, bottom] 
        this.windowRef = win;
        // Add a frame for the contents.   
        win.btnPanel = win.add("panel", [iPadding,iPadding,iWidth-iPadding,iHeight-iPadding], "");
        .... add a bunch of other stuff ...
        win.btnAdd = win.btnPanel.add("button", [win.btnRemove.bounds.left - iPadding - iButtonWidth,win.lstImages.bounds.bottom + iSmPadding,win.btnRemove.bounds.left - iPadding,win.lstImages.bounds.bottom + iSmPadding +iTextHeight], "Add");
        win.btnAdd.onClick = function() {
           //todo implement this
           var f = File.openDialog("Open File") ;
           win.lstImages.add("item", f.displayName );
           this.EnableControls();    //<--- problem is on this line here!!
        this.EnableControls();  //<--- this works
        // Display the window
        win.show();
        return true;      
    CreateDialog.prototype.EnableControls = function (){
        var result = true;
        result = result && (this.windowRef.ddlPaths.selection != "");
        result = result && (this.windowRef.lstImages.items.length > 0);
        this.windowRef.btnOK.enabled = result;

    This may not be the reason, but when using the way I create dialogs 'this' inside of an onClick points to the control.
        win.btnAdd.onClick = function() {
           //todo implement this
           var f = File.openDialog("Open File") ;
           win.lstImages.add("item", f.displayName );
           this.EnableControls();    //<--- I would expect it to call another function of btnAdd
                                            // this.parent.EnableControls() might be what you want if the control is not in some other container

  • How to run JavaFX Jar with JRE 7 on MAC OS Lion 10.7.5 ?

    I had java 1.6 installed on my MAC OSX Lion 10.7.5. When I am trying to run that JavaFX application jar
    java -jar application.jar
    It always shows a dialog "The application require a newer version of Java Run-time" with download link. Even I have downloaded and successfully installed it on my MAC machine but it still shows me the same window.
    It installed jre-7u10-macosx-x64.dmg but java -version is always point to 1.6.
    Then I searched for Java Preferences to point the current JRE 1.7 but I could find Java Preferences at Applications -> Utilities -> Java -> Java Preferences.
    I found an Java Icon on System Preference. When I am trying to open that widow it's showing me error -- the java control panel opens in a separate window and nothing happens when we click on Re-open the Java Control Panel.
    http://avats.s3.amazonaws.com/JavaRunningError.txt
    I would like to know -- how to run JavaFX jar with JRE7 on MAC OS Loin 10.7.5? Is their any other way to run the JavaFX application JAR with JRE7?

    To find a copy of LP7 you would need to look for a copy on eBay.. However, the protection method used with LP7 no longer functions so you cannot register it and therefore you cannot use it. unless you have already registered LP7 yourself in the past using the security key dongle provided
    Any version of LP7 from a torrent would be an illegal (and most likely non working) version due to the protection that was used at that time... and so posting about it here, was not be wise.
    So.. thats why my previous answer was so brief... Simply put, you cannot use LP7 unless you already have a validated and registered security dongle... even if you found a copy of LP7 somewhere
    The only practical solution is to find some kind soul who already has a working version of LP7 installed, that you can send the projects to... for them to do the conversion for you.
    I would, but I no longer have LP7 installed here on any of my testbed Macs...

  • Urgent - How to Run a FM using CATT script tool,

    Hi All,
    How to Run a FM using CATT script tool,
    Thanks in advance,
    KSR

    choose  type as "Function module test" (if you are in release less than 6.4 abap) after entering into t.code SCAT.
    Pl. refer to this documentation for creating function module test cases
    <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCATTOL/CACATTOL.pdf">http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCATTOL/CACATTOL.pdf</a>
    reward if it helps
    Krishna

  • URGENT: How to run threads in sequence?

    Dear experts, I am new to writing threads. I would like to know how to run threads in sequence? How do I know when a thread finishes its task?
    In the following code, classes Process_A(), Process_B(), Process_C() and Process_D() are subclasses of Class Thread.
    I'd like to know if I am using the join() function correctly? My intention is to wait for the previous process to finish before running the current process.
    Could anyone kindly give me some solutions on how to run the processes in sequence?
    Thanks!!
    =============================================================
    Thread process;
    Vector process_names = new Vector();
    process_names.add("a");
    process_names.add("b");
    process_names.add("c");
    for(int i=0; i<process_names.size(); i++)
    String process_name = (String) process_names.elementAt(i);
    if(process_name.equals("a"))
    process = new Process_A();
    else if(process_name.equals("b"))
    process = new Process_B();
    else if(process_name.equals("c"))
    process = new Process_C();
    else if(process_name.equals("d"))
    process = new Process_D();
    timer = new javax.swing.Timer(1000, new ProcessListener());
    timer.start();
    // ProcessListener()
    class ProcessListener implements ActionListener {
    public void actionPerformed(ActionEvent evt) {
    if(process!=null)
    if(process.isAlive())
    try
    process.join();
    catch(Exception ex)
    ex.printStackTrace();
    process.start();

    just look at this simple example u will get to know how to use join method
    This does exactly what u want
    class callme
    void call(String msg)
    System.out.println("["+msg);
    Try
    Thread.sleep(1000);
    catch(InterruptedException e)
    System.out.println("interrupted");
    System.out.println("]");
    class caller implements Runnable
    String msg;
    Callme target;
    Thread t;
    Public Caller(Callme targ, String s)
    target=targ;
    msg=s;
    t=new Thread(this);
    t.start();
    public void run()
    target.call9msg);
    class Synch
    public static void main(String arg[])
    Callme target=new Callme();
    Caller ob1=new Caller(target,"hello");
    Caller ob2=new Caller(target,"Synchronized");
    Caller ob3=new Caller(target,"world");
    Try
    ob1.t.join();
    ob2.t.join();
    ob3.t.join();
    catch(InterruptedException e)
    System.out.println("interrupted");
    waiting for dukes

Maybe you are looking for