Wrong code being executed in 10g

Hi all,
I'm having a problem where my form is picking up the wrong source code.
I have formA which calls formB. FormA and formB both have an application library attached with common code. In the pre-form trigger of both forms they call a procedure eaq$event_form which in turn calls a procedure ma$pre_form. These procedures are both contained in the application_library and a local copy of ma$pre_form which does something other than the generic code is placed in formA (but not formB).
When the forms are run, the local copy of ma$pre_form in formA fires instead of the application_library version which is what I want, but when formA calls formB using call_form(formB,NO_HIDE,DO_REPLACE,NO_QUERY_ONLY,NO_SHARE_LIBRARY_DATA), formB's pre-form trigger fires and picks up the application library version of eaq$event_form, but then picks up formA's version of ma$pre_form instead of the application library version! How can this be???
Incidentally if I call ma$pre_form directly from formB in the pre-form trigger it picks up the application library version correctly, but indirectly calling it via eaq$event_form does not work (even if I put a local copy of the procedure in formB!)
Now this all works in client server as I'd expect, but since migrating to 10g it doesn't.
Does anyone have any ideas?

Hi,
Sorry for the late reply, but I was off for the Holidays. Anyway.
I have tested your scenario step by step. and it works just the way you're saying.
But, what's happening here is just as Steve have mentioned in his second post.
<quote>All the codes are in the same "bucket"</quote>
And as I mentioned in my first post the local unit precedes the library, and that's why you are seeing the message from the local unit.
I changed the name of the local unit from MY_PRE_FROM to MY_PRE_FORM_LOCAL, and it worked just fine with me.
I suggest you try it, it should work.
So when we run formA we should see the following messages
'in generic call'
'in formA local'
Here what you are seeing the the precedences of the local unit over the library unit whenever they share the same name.
but logically you should see the library code MY_GENERIC_CALL being executed and showing a message of
PROCEDURE MY_GENERIC_CALL IS
BEGIN
     message('in generic call');
     my_pre_form;
END;and in turn calling to MY_PRE_FORM and the latter shows the message
PROCEDURE my_pre_form IS
BEGIN
message('in lib my pre-form');
END;so you should see:
in generic call
in lib my pre-form
and what's happening with you is the local unit is being preceded from forma over the library unit. As if you are calling the local unit from the library. or at least this is what seems to be happening.
Changing the local unit's name is making the difference.
Regards,
Tony Garabedian

Similar Messages

  • Wrong portions of code being executed in standard transactions

    Hi guys,
    I've recently come accross some weird errors in a standard transaction in a system and thought you might have a clue. I was getting an ugly dump in F110 in a fresh system that it can't do a READ TABLE with index 0. After investigating it and debugging it for a while, I got in the PAI of a screen, where two procedures were important:
    1) WERTE_PRUEFEN was being executed in a loop...endloop (that's where the error supposedly occurred). The thing is in the debugger it didn't go into this module inside the loop, as it should if there are no entries.
    2) After that, WERTE_LOESCHEN. When I got here and pressed F5 to see what's going wrong in it, guess where the debugger redirected me: you're right, to the WERTE_PRUEFEN thingy. So a statement like MODULE WERTE_LOESCHEN. gets me to a completely different procedure. This is crazy!
    I'm not at my first experience with this. BEx applications would do this if you'd change the ABAP source code and the people wouldn't reconnect again. Even if in the debugger I'd see the new code, the system would execute the old one, probably some caching issues. Always worked when people disconnected / reconnected.
    However, in the actual situation, no matter how many times I log on/off, the dump is there.
    This is not the only example of this kind, there are more module statements gone crazy in F110 in this system, but only this one dumps instantly.
    What do you think it could be the cause of that/ what is a good solution for this?
    I was thinking it has something to do with the program's generation and I asked the Basis guys to run an SGEN, hopefully that would help.
    Thanks in advance,
    George

    Hi Vikranth,
    Nope, just pressing F5 trying to get into WERTE_LOESCHEN and being redirected to that module inside the LOOP...ENDLOOP, WERTE_PRUEFEN. Well, I didn't say this happens in every system, only in that specific one. Of course, if I logon in another system, everything looks fine.
    Another person suggested that it's the GUI to blame and that I should get the newest version. Still, the error was reported by a person that has the latest version of the GUI. I still think it's a generation/ installation issue but got no reply from the Basis admin so far.
    Regards,
    George

  • Wrong map being executed in Process Flow

    I created a Process Flow that executes 3 maps and a PL/SQL procedure.
    The process flow functions to write data to a Unix file system.
    The first map when executed by itself writes the correct string as the first header within the file. But when I execute the same map, named HC_ENTHDR_TEMP_MAP, within the Process Flow the wrong header is written to the file.
    I've tried droppping the map and redeploying it. I've tried dropping the map within the Process Flow reinserting it and redeploying the Process Flow. These actions do not solve the problem. When the map is executed within the Process Flow, the wrong header is written. When the map is executed outside the process flow the correct header is written.
    Any help would be appreciated. It's as if the WorkFlow schema has the an invalid pointer to a map that I can't get rid of.

    Hi,
    Sorry for the late reply, but I was off for the Holidays. Anyway.
    I have tested your scenario step by step. and it works just the way you're saying.
    But, what's happening here is just as Steve have mentioned in his second post.
    <quote>All the codes are in the same "bucket"</quote>
    And as I mentioned in my first post the local unit precedes the library, and that's why you are seeing the message from the local unit.
    I changed the name of the local unit from MY_PRE_FROM to MY_PRE_FORM_LOCAL, and it worked just fine with me.
    I suggest you try it, it should work.
    So when we run formA we should see the following messages
    'in generic call'
    'in formA local'
    Here what you are seeing the the precedences of the local unit over the library unit whenever they share the same name.
    but logically you should see the library code MY_GENERIC_CALL being executed and showing a message of
    PROCEDURE MY_GENERIC_CALL IS
    BEGIN
         message('in generic call');
         my_pre_form;
    END;and in turn calling to MY_PRE_FORM and the latter shows the message
    PROCEDURE my_pre_form IS
    BEGIN
    message('in lib my pre-form');
    END;so you should see:
    in generic call
    in lib my pre-form
    and what's happening with you is the local unit is being preceded from forma over the library unit. As if you are calling the local unit from the library. or at least this is what seems to be happening.
    Changing the local unit's name is making the difference.
    Regards,
    Tony Garabedian

  • Call to java bean but code not being executed.

    Making a call to my javabean class called ch06_03.java from a jsp program shown below:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Using a java package.</title>
    </head>
    <body>
    <% beans.ch06_03 messager = new beans.ch06_03(); %>
    The message is: <%= messager.msg() %>
    </body>
    </html>
    The call from jsp to javabean program is only returning the hello from java and NOT EXECUTING ANY OF THE CODE in the msg() method. I am checking my table landings_hold and nothing is there, my log file shows nothing. Why is the code not being executed except for the return statement?
    My javabean program is shown below:
    package beans;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    import java.sql.*;
    public class ch06_03 {
    StringTokenizer st1;
              String val1, val3, val4, val5, val9, val10, val11, val12, val13, val14, val16;
              String val2, val6, val7, val8, val15, val17, val18, val19, val20;
              int cnt;
              String filetext = "Starting RIFIS Upload";
              java.util.Date d = new java.util.Date();
              SimpleDateFormat form = new SimpleDateFormat("dd/MMM/yyyy hh:mm:ss");
              String dateString = form.format(d);
    public String msg() throws Exception {
         try {
         Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@xxxxx.xxxx.xxx:1521:xx","xxxxxx","xxxx");
              Statement st = conn.createStatement();
         File f = new File("C://upload");
              FileWriter outFile = new FileWriter("C://RIFIS/log/logfile.txt", true);
              outFile.write(System.getProperty("line.separator"));
              outFile.write(filetext+" - "+dateString);
              if (f.isDirectory())
              { String [] s = f.list();
              for (int i=0; i<s.length; i++)
              { outFile.write(System.getProperty("line.separator"));
                   outFile.write("Found file - "+f+"/"+s);
              FileReader file = new FileReader(f+"/"+s[i]);
                   File inputFile = new File(f+"/"+s[i]);
                        File outputFile = new File("C://RIFIS/archive/"+s[i]);
                   BufferedReader buff = new BufferedReader(file);
                   boolean eof = false;
                   String val0="";
                   ResultSet rec = st.executeQuery("SELECT landings_hold_batch_seq.nextval FROM dual");
                        while(rec.next())
                        { val0 = rec.getString(1); }
                        cnt=0;
                        while (!eof)
                        { String line = buff.readLine();
                        if (line == null)
                        { eof = true; }
                             else
                             { cnt = cnt+1;
                                  st1 = new StringTokenizer(line,",");
                                  val1 = st1.nextToken();
                                  val2 = st1.nextToken();
                                  val3 = st1.nextToken();
                                  val4 = st1.nextToken();
                                  val5 = st1.nextToken();
                                  val6 = st1.nextToken();
                                  val7 = st1.nextToken();
                                  val8 = st1.nextToken();
                                  val9 = st1.nextToken();
                                  val10 = st1.nextToken();
                                  val11 = st1.nextToken();
                                  val12 = st1.nextToken();
                                  val13 = st1.nextToken();
                                  val14 = st1.nextToken();
                                  val15 = st1.nextToken();
                                  val16 = st1.nextToken();
                                  val17 = st1.nextToken();
                                  val18 = st1.nextToken();
                                  val19 = st1.nextToken();
                                  val20 = st1.nextToken();
                                  st.executeUpdate("INSERT INTO LANDINGS_HOLD (lh_id, lh_batch, supplier_dr_id, supplier_unique_id, supplier_dealer_id, supplier_cf_id, supplier_vessel_id, unload_year, unload_month, unload_day, state_code, county_code, port_code, itis_code, market, grade, reported_quantity, unit_measure, dollars, lh_loaddt, lh_loadlive, purch_year, purch_month, purch_day)" +
                        "VALUES (0,'"+val0+"','"+val1+"',"+val2+",'"+val3+"','"+val4+"','"+val5+"',"+val6+","+val7+","+val8+",'"+val9+"','"+val10+"','"+val11+"','"+val12+"','"+val13+"','"+val14+"',"+val15+",'"+val16+"',"+val17+",SYSDATE,NULL,"+val18+","+val19+","+val20+")");
                             } // while else end
                        } // parent while end
                        FileReader in = new FileReader(inputFile);
                        FileWriter out = new FileWriter(outputFile);
    int c;
                        while ((c = in.read()) != -1)
                        { out.write((char)c); }
                        in.close();
                        out.close();
                        outFile.write(System.getProperty("line.separator"));
                        outFile.write("Number of records inserted - "+cnt);
                        outFile.write(System.getProperty("line.separator"));
                        outFile.write("Copied upload file to archive directory");
                        outFile.write(System.getProperty("line.separator"));
                        outFile.write(f+"/"+s[i]+" - Has been removed from upload directory");
                        buff.close();
                        inputFile.delete();
                   } // for end
                   outFile.write(System.getProperty("line.separator"));
                   outFile.write("Upload Complete...NO ERRORS");
                   outFile.write(System.getProperty("line.separator"));
                   outFile.write("*************************************************************");
                   outFile.write(System.getProperty("line.separator"));
                   conn.close();
              } // if end
              else
              { outFile.write("No files to process"); }
              outFile.flush();
              outFile.close();
              } // try end.
              catch(Exception e)
              { FileWriter errFile = new FileWriter("C://RIFIS/log/errfile.txt", true);
              errFile.write(System.getProperty("line.separator"));
              errFile.write("ALERT....ALERT....ALERT");
              errFile.write(System.getProperty("line.separator"));
              errFile.write("Error Occurred in ReadSource.java - RIFIS Upload");
              errFile.write(System.getProperty("line.separator"));
              errFile.write("My Error: " + e);
              errFile.write(System.getProperty("line.separator"));
              errFile.write("*************************************************************");
                   errFile.flush();
                   errFile.close();
              } // catch exception end.
         return "Hello from java";
         } //public msg block
         public ch06_03()

    Since you didn't use code-formatting tags ([ code ] and [ /code ] without the spaces) it's kinda hard to look at it. But I'm sure it DID execute much more than just the return statement - maybe you're not closing a file or db connection, or maybe you're seeing a cached page, so it actually isn't executing ANYTHING on the server (is your browser set to never check for newer pages so it (almost) always returns from cache, for example?)

  • Code not being executed????

    Am using a session varible to test an if statement, if true then statement is executed, else nothing. The session variable appears to be false but the statement is still being executed, any suggestions. Possibly a browser specific problem?
    The code in question is as follows....
    if((session.getAttribute("accessrights")!=null)&&(session.getAttribute("accessrights").equals("3"))) { %>
    <html statement >
    <html statement>
    <% } %>
    The value of accessrights prior to the If statement is '1' and it is still being executed. Any suggestions very gratefully recieved!!!!!

    Correction: the code should be as follows. It always displays the class and value of that attribute. So you can see if that is what you expect. If it is, then the problem is fixed. Could you also show what you see on your browser when using the following code?
    <html>
    <p> attribute class is <% = session.getAttribute("accessrights").getClass().getName() %> value is <% = session.getAttribute("accessrights").toString() %> </p>
    if (session.getAttribute("accessrights")!=null) {accessRights = (String)session.getAttribute("accessrights"); }
    <% if(accessRights.equals("3")) {%>
    <% } %>
    </html>

  • Why is keyPressed() not being executed in this code..??

    HI,
    I am trying to develop a simple game program but what is banging my head is the keyPressed(KeyEvent evnt) is not being executed, i.e. the System.out.println("XXXX") inside this method is not being reached and hence shows no any output. Any suggestion would be appriciated. The code goes like this....
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    import javax.swing.Timer;
    import java.awt.event.*;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import java.awt.geom.*;
    public class ArrowGame
      static GameField gfield;
      private static void createGUI()
        JFrame.setDefaultLookAndFeelDecorated(true);
         JFrame frame=new JFrame("Arrow Game");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        gfield=new GameField();
         frame.getContentPane().add(gfield,BorderLayout.CENTER);
         frame.setVisible(true);
         frame.pack();
      public static void main(String args[])
        SwingUtilities.invokeLater(new Runnable()
           public void run()
             createGUI();
      static class GameField extends JPanel implements ActionListener, KeyListener, MouseListener
        Timer timer;
        int w,h;
         int arrowPos;
         double dynamicX=1.5;
         double ovalX;
         final double ovalY=2.0;
         final double ovalW=45.0;
         final double ovalH=45.0;
         double ovalXX=(ovalX+10);
         final double ovalYY=(ovalY+10);
         double ovalXXX=(ovalXX+10);
         final double ovalYYY=(ovalYY+10);
         private boolean shotTriggered=false;
        GameField()
           setPreferredSize(new Dimension(525,450));
           addMouseListener(this);
           addKeyListener(this);
         public void paintComponent(Graphics g)
           super.paintComponent(g);
          w=getWidth();
           h=getHeight();
           Graphics2D g2=(Graphics2D)g;
          g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
           g2.setRenderingHint(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
           g2.setColor(Color.darkGray);
           g2.fillRect(0,0,w,h);
           drawTarget(g2,w,h);
           drawArrow(g2,w,h);
         private void drawTarget(Graphics2D g2,int w,int h)
           ovalX+=dynamicX;
           ovalXX+=dynamicX;
           ovalXXX+=dynamicX;
           if (ovalX < 0 && ovalXX < 10 && ovalXXX < 20)
             ovalX=0;
              ovalXX=10;
              ovalXXX=20;
             dynamicX=1.5;
           else if (ovalX > (w-45) && ovalXX > (w-35) && ovalXXX > (w-25))
              ovalX=(w-45);
              ovalXX=(w-35);
              ovalXXX=(w-25);
              dynamicX=-1.5;
           g2.setColor(Color.green);
           g2.fill(new Ellipse2D.Double(ovalX,ovalY,ovalW,ovalH));
           g2.setColor(Color.blue);
           g2.fill(new Ellipse2D.Double(ovalXX,ovalYY,(ovalW-20),(ovalH-20)));
           g2.setColor(Color.red);
           g2.fill(new Ellipse2D.Double(ovalXXX,ovalYYY,(ovalW-40),(ovalH-40)));
         private void drawArrow(Graphics2D g2,int w,int h)
           arrowPos=w/2;
           g2.setColor(Color.white);
           g2.drawLine(arrowPos,((h/2)+175),arrowPos,h);
         public void keyPressed(KeyEvent evnt)
           int code=evnt.getKeyCode();
           System.out.println(code);
         public void keyTyped(KeyEvent evnt){}
         public void keyReleased(KeyEvent evnt){}
         public void mousePressed(MouseEvent evt)
           if (timer!=null)
             timer.stop();
              timer=null;
           else
             timer=new Timer(75,this);
             timer.start();
         public void mouseReleased(MouseEvent evt){}
         public void mouseEntered(MouseEvent evt){}
         public void mouseExited(MouseEvent evt){}
         public void mouseClicked(MouseEvent evt){}
         public void actionPerformed(ActionEvent event)
           repaint();
    };regards,
    Jay

      GameField()
        setPreferredSize(new Dimension(525,450));
        setFocusable(true); //<-----------------------------------------
        addMouseListener(this);
        addKeyListener(this);
      }

  • Running Oracle 9i client code against an Oracle 10g install on PC

    On Unix I am able to run Oracle 9i client code against an Oracle 10g install by setting ORACLE_HOME to the Oracle 10g install location and then creating a symbolic link (example: ln -fs libclntsh.so.10.1 libclntsh.so.9.0).
    On PC (in particular XP SP2) I want to do something similar without using "junctions" or "junction points". Is there a way to set an environment variable or ini file to have my 9i client code point to the right libraries? I keep getting an error saying that my client code will not run due to "orasql9.dll" not being found. The "orasql10.dll" is installed on my machine.
    Any assistance would be appreciated.

    You might want to check metalink doc,
    Client / Server / Interoperability Support Between Different Oracle Versions
    Doc ID: Note:207303.1
    Even your application built on 9i, doesn't mean it will not work with 10g database. From what I can see, running 9i executable under 10g installation to create mixed blood breed will do more harm than good. Not only it's not supported but also the outcome is unpredictable.

  • Backup not being executed

    Hi everybody.
    In Oracle 10g, Windows, I have a problem: the backup I've scheduled to execute everyday at 2 AM, is not executed if dbconsole is not running.
    I thought that scheduling via EM dbconsole was simply an interface to different programs, in this case, for RMAN.
    What I'm doing now is to schedule another different job, and then stop dbconsole, although I think it's not going to execute. I have also to check this problem in another 10g DB, but over Linux.
    Is it possible to solve this issue?
    Thanks.

    user8676543 wrote:
    Hi,
    I am working on AIX with an Oracle Database 9i I have been trying to use the rman but it seems that it is not working;
    The executable seems corrupted
    test01-/dev01/app/oracle/product/9.2.1.0/bin>ls -al rman*
    -rwxr-x--x 1 oracle oinstall 0 Nov 01 17:06 rman
    -rwxr-x--x 1 oracle oinstall 22974515 Mar 01 2009 rmanO
    I know that I will have to relink the executable but I am trying to look for the reason that it got corrupted in the first place. Additionally the backup jobs are being executed through a software and not through crontab.
    Please any indicators or pointers will be of great help.
    Thanks.The output is most telling, though it would have been easier to read if you had enclosed it in code tags:
    test01-/dev01/app/oracle/product/9.2.1.0/bin>ls -al rman*
    -rwxr-x--x 1 oracle oinstall        0 Nov 01 17:06 rman
    -rwxr-x--x 1 oracle oinstall 22974515 Mar 01 2009 rmanOSo we see that the rman executable file has a length of zero. We can safely dismiss any suggestions of "supported" or "PATH" issues.

  • SubQuerry Not being executed

    Hi Gentelmen;
    I have posted this question in the Test and Playground Forum but no one has responded.
    Any of you experts in this forum may be able to help me please...
    I have this problem where I am selecting records to display on the report from table customer and trying to count how many booking are there for each customer in booking table based on the customer id from booking table.
    here is my query code below...
    select id name city custtype discount into (wa-scid, wa-scname, wa-sccity, wa-scctype, wa-scdisc) from customer
      where city = 'CityName' and
      country = 'CountryName' and exists (
      select count( distinct custid ) as wa-cnt from bookings group by custid ).
      WRITE: /1 wa-scid, 11 wa-scname, 40 wa-sccity, 70 wa-scctype, 78 wa-scdisc,'%', 90 wa-cnt.
      endselect.
    I have tried to debug the issue and seems like the sub query is not being executed. The reason i say that because the value  of wa-cnt which is a counter of type i is not changing.
    Any one can shed some light in this matter/problem please...
    Many Thanks.
    -hisheeraz

    You are using AS addition in the subquery to determine whether the subquery is being executed or not, and I think this is wrong. AS addition has only meaning when your using wither INTO or APPENDING, it wouldn't change the value of wa-cnt.
    I suggest you to try to change the subquery to
    and exists ( select count( * ) from bookings ).
    As you're using only the COUNT aggregation expression int the subquery, a GROUPING is not necessary.
    Regards

  • XSLT for adding Namespace is not being executed at runtime

    Hi Gurus,
    I am trying to add a Namespace to inbound xml and I wrote a simple XSLT mapping as below, when I execute this using XML spy or in Operation mapping manually it is working fine and giving me output as expected but at runtime it is not executing, I am getting same input xml as output xml and receiver agreement is failing...
    Appreciate your thoughts..
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" encoding="UTF-8"/>
            <xsl:template match="*">
              <ns0:SalesXmlExtended xmlns:ns0="urn:/company.com/H/sndr">
              <xsl:copy-of select="//SalesReportInfo"/>
         </ns0:SalesXmlExtended>
         </xsl:template>
    </xsl:stylesheet>
    input xml is as below....
    <?xml version="1.0" encoding="UTF-8"?>
    <SalesXmlExtended>
         <SalesReportInfo>
              <SalesReport>
                   <Detail>
                        <deptNum>0270</deptNum> etc...
    output I am getting in XMLSpy and OM is as below, this is exactly what I need...
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:SalesXmlExtended xmlns:ns0="urn:/company.com/H/sndr">
         <SalesReportInfo>
              <SalesReport>
                   <Detail>
                        <deptNum>0270</deptNum>
    Thanks...
    Sukarna...

    Hi Baskar,
    Yeah, that is what my issue is , it shouldn't be failing but it is...
    I tried by manipulating the required namespace in the input file and it is working fine with out any errors....so I am guessing the XSLT is not being executed...
    I am getting below error which is valid because the transformation is not happening
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Technical Routing --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
    <SAP:Category>XIServer</SAP:Category>
    <SAP:Code area="OUTBINDING">CO_TXT_OUTBINDING_ERROR</SAP:Code>
    <SAP:P1>-BS_HOUSE_OF_FRASER_DEV</SAP:P1><SAP:P2>-BD1_100,urn:.com/HoF/POS/EOD/sndr.SI_Out_HoFSales_XML</SAP:P2>
    <SAP:P3/>
    <SAP:P4/>
    <SAP:AdditionalText>No standard agreement found for , BS_HOUSE_OF_FRASER_DEV, , BD1_100, urn:/HoF/POS/EOD/sndr, SI_Out_HoFSales_XML</SAP:AdditionalText
    ><SAP:Stack>Problem occurred in receiver agreement for sender -BS_HOUSE_OF_FRASER_DEV to receiver -

  • Code encountered error in 10g, but ok in 9i

    What is the problem with this code ?
    It works fine in Oracle 9i (9.2.0.4.0)
    But it encountered an error when run in Oracle 10g (10.2.0.4.0 - 64bi), at
    "{color:#0000ff}ave_rec(g_average_var).rec_1 := ave_rec(g_average_var).rec_1 + '12';{color}".
    {color:#ff0000}ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 40{color}
    Thanks/Rgds
    tsp
    &lt;quote&gt;
    {color:#0000ff}Declare
    Type averagerec is record
    (rec_1 number := 0,
    rec_1_cnt number := 0,
    rec_2 number := 0,
    rec_2_cnt number := 0,
    rec_3 number := 0,
    rec_3_cnt number := 0,
    rec_4 number := 0,
    rec_4_cnt number := 0,
    rec_5 number := 0,
    rec_5_cnt number := 0,
    rec_6 number := 0,
    rec_6_cnt number := 0,
    rec_7 number := 0,
    rec_7_cnt number := 0,
    rec_8 number := 0,
    rec_8_cnt number := 0,
    rec_9 number := 0,
    rec_9_cnt number := 0,
    rec_10 number := 0,
    rec_10_cnt number := 0,
    rec_11 number := 0,
    rec_11_cnt number := 0,
    rec_12 number := 0,
    rec_12_cnt number := 0,
    rec_13 number := 0,
    rec_13_cnt number := 0);
    g_average_var number := 1;
    Type averagerec_tab is table of averagerec index by PLS_INTEGER;
    {color}
    {color:#0000ff}
    ave_rec averagerec_tab;
    begin
    {color}
    {color:#0000ff}
    ave_rec(g_average_var).rec_1 := ave_rec(g_average_var).rec_1 + '12';
    dbms_output.put_line('ave_rec(g_average_var).rec_1 '||ave_rec(g_average_var).rec_1);
    end;{color}
    &lt;un-quote&gt;
    Edited by: user6469330 on Jan 7, 2009 11:39 PM
    Edited by: user6469330 on Jan 8, 2009 1:14 AM
    Edited by: no one on Jan 8, 2009 5:45 PM
    Edited by: no one on Jan 8, 2009 5:46 PM

    Try the below:
    Sybrand is right 10g is more fussy about your code being 'right'. 9i is doing an implicit initialisation for you where 10g does not.
    Regards,
    Harry
    Declare
    Type averagerec is record
    (rec_1 number := 0,
    rec_1_cnt number := 0,
    rec_2 number := 0,
    rec_2_cnt number := 0,
    rec_3 number := 0,
    rec_3_cnt number := 0,
    rec_4 number := 0,
    rec_4_cnt number := 0,
    rec_5 number := 0,
    rec_5_cnt number := 0,
    rec_6 number := 0,
    rec_6_cnt number := 0,
    rec_7 number := 0,
    rec_7_cnt number := 0,
    rec_8 number := 0,
    rec_8_cnt number := 0,
    rec_9 number := 0,
    rec_9_cnt number := 0,
    rec_10 number := 0,
    rec_10_cnt number := 0,
    rec_11 number := 0,
    rec_11_cnt number := 0,
    rec_12 number := 0,
    rec_12_cnt number := 0,
    rec_13 number := 0,
    rec_13_cnt number := 0);
    g_average_var number := 1;
    fred averagerec;
    Type averagerec_tab is table of averagerec index by PLS_INTEGER;
    ave_rec averagerec_tab;
    begin
    ave_rec(g_average_var):=fred;
    ave_rec(g_average_var).rec_1 := ave_rec(g_average_var).rec_1 + '12';
    dbms_output.put_line('ave_rec(g_average_var).rec_1 '||ave_rec(g_average_var).rec_1);
    end;

  • Business Rules - how to stop when being executed in background?

    Hello,
    I have a very simple BR that is supposed to copy data from one version to another, however the BR timeouted and now is being executed in the background.
    The thing is that it is being executed for two hours now. I can see the BR in the Job window with 'Processing' status.
    I've set two system options HBR_MAX_WAIT_FOR_RULE and HBR_MONITOR_DELAY to 600000, and restarted the application and essbase, however the BR's status in Job window is still 'processing'.
    Is there any way to:
    1. Stop the execution of the business rule?
    2. Verify what causes the BR to run for so long?
    3. Does dense/sparse settings have the impact on BRs' execution time?
    Kind regards
    Marcin Stawny

    Hi,
    I take it we are talking classic planning.
    You can terminate rules from within EAS, if you right click the analytic server and select edit sessions, you should see the rule running.
    I am not sure why it says it still running maybe it has cached that it is running and still believes it is, have you restarted EAS?
    Lots of different elements can be makinh a business rule run for a long time, the code/cube might need optimizing, it might be trying to copy a lot of data.....
    Maybe worth posting more details on your database, number/name of dimensions, number of members, dense/sparse
    Also the business rule code.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Validation function, PL/SQL is not being executed

    Hello there,
    In one of my APEX listener setups I want to give access to only one application and block the rest. Basically I am following this nice post from Kris Rice: http://krisrice.blogspot.com.ar/2013/01/apex-listener-plsql-validations.html
    My problem is that my validation function is not being executed:
    - In ${config.dir}/apex/conf/apex.xml
    <entry key="security.requestValidationFunction">MY_SCHEMA.MY_PACKAGES.is_allowed(flow_id=>:P_FLOW_ID,page_id=>:P_FLOW_STEP_ID)</entry>- The function code:
    FUNCTION is_allowed(
        flow_id IN VARCHAR2,
        page_id IN VARCHAR2)
      RETURN BOOLEAN
    AS
    BEGIN
      insert into MY_SCHEMA.logs values (sysdate, flow_id);
      IF ( flow_id = 141 ) THEN
        RETURN true;
      END IF;
      RETURN false;
    END;But the logs table remains empty, snif...
    Any ideas?
    Thanks in advance,
    Luis

    Upgrade to APEX Listener 2.0.3 solves the issue:
      http://www.oracle.com/technetwork/developer-tools/apex-listener/downloads/index.html
    Thanks!
    Luis

  • Per account workflow not being executed

    I am trying to run a per account workflow,
    so that when a user in a Resouce(Authoritative source) gets deleted,
    during reconciliation the per account workflow should get executed there by disabling all the resource accounts for the user .
    I added the following workflow int the 'Per account workflow' tab of my reconciliation policy
    my reconciliation runs sucessfully however i do not see any changes in the users account , it seems the Workflow is not getting executed..
    The code for the workflow is as below
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <!--  MemberObjectGroups="#ID#Top" createDate="Fri Feb 24 18:31:31 PST 2006" id="#ID#BC7431C56D947D4E:194DF96:1099F0627CB:-7FFB" name="Custom Workflow" visibility="runschedule"-->
    <TaskDefinition id='#ID#BC7431C56D947D4E:194DF96:1099F0627CB:-7FFB' name='Custom Workflow' lock='Configurator#1141081471234' creator='Configurator' createDate='1140834691093' lastModifier='Configurator' lastModDate='1140843754062' lastMod='96' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='delete' visibility='runschedule' progressInterval='0'>
      <Extension>
        <WFProcess name='Custom Workflow' maxSteps='0'>
          <Variable name='userName' input='true'/>
          <Variable name='accountId' input='true'/>
          <Variable name='loginApplication' input='true'/>
          <Variable name='resource' input='true'/>
          <Activity id='0' name='start'>
            <Transition to='Disable User'>
              <eq>
                <ref>initialSituation</ref>
                <s>AR_SITUATION_NAME_DELETED</s>
              </eq>
            </Transition>
            <WorkflowEditor x='56' y='225'/>
          </Activity>
          <Activity id='1' name='Disable User'>
            <Variable name='WF_ACTION_ERROR'/>
            <Variable name='user'/>
            <Action id='0'>
              <expression>
                <set name='user.resourceAccounts.selectAll'>
                  <Boolean>true</Boolean>
                </set>
              </expression>
              <Argument name='op' value='disableUser'/>
              <Argument name='accountId' value='$(accountId)'/>
              <Argument name='doWaveset' value='true'/>
            </Action>
            <Transition to='Clear Task Results'>
              <isnull>
                <ref>WF_ACTION_ERROR</ref>
              </isnull>
            </Transition>
            <Transition to='end'/>
            <WorkflowEditor x='362' y='23'/>
          </Activity>
          <Activity id='2' name='Clear Task Results'>
            <Action id='0' application='SET_RESULT_LIMIT'>
              <Argument name='limit' value='0'/>
            </Action>
            <Transition to='end'/>
            <WorkflowEditor x='373' y='224'/>
          </Activity>
          <Activity id='3' name='end'>
            <WorkflowEditor x='564' y='171'/>
          </Activity>
        </WFProcess>
      </Extension>
      <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
      </MemberObjectGroups>
    </TaskDefinition>Can anyone help me with this?

    Hi,
    It could be that the workflow is being executed
    but it is not doing the correct thing.
    Why dont you load the workflow into the debugger,
    set a breakpoint on it and then run reconcilliation.
    That way you will know for sure if the workflow
    is being executed.
    John I

  • Dinamic Configuration not being executed

    Hi All,
       I'm working on a new interface, file2file. The new file name is not known because it depends on the mapping process so I have configured the FileName options in the Sender and Receiver channels and I can see the new
    <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">XXXXXXXXX</SAP:Record>
       and it uses it to write the file.
       In the mapping process, a new User-Defines function is called, it is the very same as all the posts about this option.
       The messate type is something like this:
                   label1
                        RECORD
                              LINE_ITEM
                                     DATA
        If I place the new function during the DATA mapping, it works but, if I move it to the label1 it seems that it is not being called. Is there any reason for this? Due to the number of boxes for the filename calculation I moved to label1.
        Help would be appreciated for this.
        Thanks and kind regards,
           Encinas.

    Hi,
    it means that you're label mapping is not being executed
    try adding a trance in your user defined function
    and you'll be able to see it this will be executed during the mapping
    (in the test tab)
    how to add trace:
    /people/michal.krawczyk2/blog/2005/02/25/simple-java-code-in-graphical-mapping--xi
    basically you can put it anywhere in your mapping as long as the user defined function will be executed
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for

  • Can a Servlet be used for Storing Objects with both JSP and JSF used on it?

    Hi, Pages I have: SearchEmployee.jsp This page has a search engine that search out the Employee. This Employee Object will be stored inside a Servlet(controller) for future references by other pages. I used JSP, html tags for forms, and request.getPa

  • How to open Mail attachment in different spaces

    With Snow Leopard Mail attachment stopped to open in the space to witch I assigned the related application, but keep on opening in the Mail space. I have Mail assigned to space #1 and, for example, iWork assigned to space #3. With Leopard iWork attac

  • Reading A String at a random location in a file

    Question: Given a file of English words (a dictionary file I guess�), delimited by commas, I want to know if it is possible to write a java program that can read a random word from the dictionary file and store it into a String. If this is possible,

  • Error PLS-00428: an INTO clause is expected in this SELECT statement

    Dear Experts, I am new PL/SQL Programming I am trying to run the following query i am getting Error. Please help me to solve the error. declare     var_cd number(20); begin if :P1_TYP_CAT is not null  then    select max(CAT_cd + 1) as var_cd from IM_

  • Logitech Harmony One with Mac OS Lion

    Recently purchased a new Harmony One remote and have yet to set it up.  I am running a macbook pro that was purchased last summer right after thunderbolt was introduced on the macbook pro's.  I have since upgraded to Lion.  The question is that I hav