Function does not return a value

CREATE OR REPLACE PACKAGE BODY Promo_Version_Logo_Pkg IS
  FUNCTION Promo_Version_Logo_Rule(Rc IN test.Ot_Rule_Context)
    RETURN Ot_Rule_Activation_Result
   IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    v_Result NUMBER;
    CURSOR Cur_Promo_Logos IS
      SELECT Pvlo.Promo_Id,
             Evt.On_Date,
             Evt.Channel_Id,
             Evt.Start_Time,
             Evt.Duration,
             Pvlo.Logo_Id
        FROM Event                  Evt,
             Event_Technical_Data   Etd,
             Promo_Version_Logo_Opt Pvlo,
             Promo_Timing           Pt
       WHERE Evt.Event_Technical_Data_Id = Etd.Event_Technical_Data_Id
             AND Etd.Promo_Timing_Id = Pt.Promo_Timing_Id
             AND Pt.Promo_Timing_Id = Pvlo.Promo_Timing_Id
             AND Evt.Channel_Id = Rc.Channelid
             AND Evt.On_Date >= Rc.Fromdate
             AND Evt.On_Date <= Rc.Todate
             AND Evt.Day_Type_Id = Rc.Daytype;
  BEGIN
    FOR Each_Record IN Cur_Promo_Logos LOOP
      v_Result := Testing_Pkg.Insert_Event(v_Channel_Id   => Each_Record.Channel_Id,
                                                       v_Tx_Time      => Each_Record.Start_Time,
                                                       v_Tx_Date      => Each_Record.On_Date,
                                                       v_Content_Id   => Each_Record.Logo_Id,
                                                       v_Duration     => Each_Record.Duration,
                                                       v_Event_Type   => Uktv_Tools_Pkg.c_Logo_Kind_Code,
                                                       v_Container_Id => Each_Record.Promo_Id);
      IF v_Result = -1
      THEN
        EXIT;
      END IF;
    END LOOP;
  END Promo_Version_Logo_Rule;
END Promo_Version_Logo_Pkg;why do I get this "Hint: Function 'Promo_Version_Logo_Rule' does not return a value" after I compile it? The Testing_Pkg.Insert_Event should insert some values somewhere...I just want to try to test it before I move on onto the next bit of it, but I do not understand what I am doing wrong...
Thanks

You need something like:
    END LOOP;
    RETURN v_Result;  -- if this is what you are trying to get the function to do
    EXCEPTION
      WHEN OTHERS THEN
      <exception handling/logging - whatever you want>
      RAISE;  --this with then raise an error back to the calling process
  END Promo_Version_Logo_Rule;This way the function either returns a value, or an exception which can be handled in the calling procedure

Similar Messages

  • Function Does Not Return any value .

    Hi ,
    I am wrtting the below funtion without using any cursor to return any message if the value enters by parameters
    does not match with the value reterived by the function select statement or it does not reterive any value that
    for the parameters entered .
    E.g:
    CREATE OR REPLACE FUNCTION TEST_DNAME
    (p_empno IN NUMBER,p_deptno IN NUMBER)
    RETURN VARCHAR2
    IS
    v_dname varchar2(50);
    v_empno varchar2(50);
    V_err varchar2(100);
    v_cnt NUMBER := 0;
    BEGIN
    SELECT d.dname,e.empno
    INTO v_dname ,v_empno
    FROM scott.emp e , scott.dept d
    WHERE e.empno=p_empno
    AND d.deptno=p_deptno;
    --RETURN v_dname;
    IF p_empno IS NOT NULL AND p_deptno IS NOT NULL
    THEN IF v_dname is NULL THEN
    v_err :='Not Valid';
    RETURN v_err;END IF;
    ELSIF p_empno IS NOT NULL AND p_deptno IS NOT NULL
    THEN IF v_dname is NOT NULL THEN
    RETURN v_dname; END IF;
    ELSE
    RETURN v_dname;
    END IF;
    END;
    Sql Statement
    SELECT TEST_DNAME(1234,30) FROM dual
    AND IF I enter a valid combination of parameter then I get the below error :
    e.g:
    SQL> SELECT TEST_DNAME(7369,20) FROM dual
    2 .
    SQL> /
    SELECT TEST_DNAME(7369,20) FROM dual
    ERROR at line 1:
    ORA-06503: PL/SQL: Function returned without value
    ORA-06512: at "SCOTT.TEST_DNAME", line 24
    Where I am missing .
    Thanks,

    Format you code properly and look at it:
    CREATE OR REPLACE
       FUNCTION TEST_DNAME(
                           p_empno IN NUMBER,
                           p_deptno IN NUMBER
        RETURN VARCHAR2
        IS
            v_dname varchar2(50);
            v_empno varchar2(50);
            V_err varchar2(100);
            v_cnt NUMBER := 0;
        BEGIN
            SELECT  d.dname,
                    e.empno
              INTO  v_dname,
                    v_empno
              FROM  scott.emp e,
                    scott.dept d
              WHERE e.deptno=d.deptno
                AND e.empno=p_empno
                AND d.deptno=p_deptno;
            --RETURN v_dname;
            IF p_empno IS NOT NULL AND p_deptno IS NOT NULL
              THEN
                IF v_dname is NULL
                  THEN
                    v_err :='Not Valid';
                    RETURN v_err;
                END IF;
            ELSIF p_empno IS NOT NULL AND p_deptno IS NOT NULL
              THEN
                IF v_dname is NOT NULL
                  THEN
                    RETURN v_dname;
                END IF;
             ELSE
               RETURN v_dname;
           END IF;
    END;
    /Both p_empno and p_deptno in
    SELECT TEST_DNAME(7369,20) FROM dualare not null. So SELECT will fetch some v_dname and v_empno. Since p_empno and p_deptno iare not null your code will go inside outer IF stmt and will execute its THEN branch. That branch consist of nothing but inner IF statement. And since v_dname is NOT NULL it will bypass that inner IF and exit the outer IF. And there is no RETURN stmt after that outer IF. As a result you get what you get - ORA-06503. Also, both if and elsif in your code check same set of conditions which makes no sense.
    SY.

  • LOV does not return the value (2)

    PPR in general does not work correctly if invalid HTML is generated. One example of an invalid HTML is having an opening <TD> tag immediately following another opening <TD> tag.
    After checking everything else, if LOV still does not return the value, test whether it's not a problem with the invalid HTML by placing the messageLovInput outside of the complicated layout nestings you may have. If it works outside of the layout nestings, look for the possible problems in the layout nestings.

    Hi RamKumar,
    Thanks for your reply.. I have already done that but no luck :(
    Regards,
    Hemanth J

  • Why is the giving me this error (method does not return a value) PLEASE !!

    I have this code and it is giving me this error and I don't know how to fix it
    can anyone out there tell me why
    I have included the next line of code as I have had problems in the curly brackets in the past.
    The error is
    "Client.java": Error #: 466 : method does not return a value at line 941, column 3
    Please help
    THX TO ALL
    private Date DOBFormat()
        try
          if
            (MonthjComboBox.getSelectedItem().equals("") || 
             DayjComboBox.getSelectedItem().equals("") ||
             YearjComboBox.getSelectedItem().equals("")){
          else
            String dateString = StringFromDateFields();
            SimpleDateFormat df = new SimpleDateFormat("dd/mm/yyyy");
            Date d = df.parse(StringFromDateFields());
            System.out.println("date="+d);
            return d;
        catch (ParseException pe)
          String d= System.getProperty("line.separator");
          JOptionPane.showMessageDialog( this,
           "Date format needs to be DD/MM/YYYY,"+ d +
           "You have enterd: "+ StringFromDateFields()   + d +
           "Please change the Date", "Date Format Error",
           JOptionPane.WARNING_MESSAGE);
          return  null;
      //File | Exit action performed
    public void jMenuFileExit_actionPerformed(ActionEvent e) {
      System.exit(0);
      }

    Fixed it needed to have a return null;
    this is the code
    if
            (MonthjComboBox.getSelectedItem().equals("") ||
             DayjComboBox.getSelectedItem().equals("") ||
             YearjComboBox.getSelectedItem().equals("")){
            return null;

  • UPDATE ... RETURNING does not return new value

    Hi all,
    I've created the following objects in Oracle DB 10.2.0.3.0:
    CREATE TABLE TAB1
         ID          NUMBER          PRIMARY KEY,
         EDITED_AT     DATE,
         VALUE          VARCHAR2(64)
    CREATE SEQUENCE S_TAB1
         INCREMENT BY 1
         START WITH 1;
    CREATE TRIGGER T_TAB1_BIE
    BEFORE INSERT OR UPDATE ON TAB1
    FOR EACH ROW
    BEGIN
         IF INSERTING THEN
              SELECT S_TAB1.NEXTVAL INTO :NEW.ID FROM DUAL;
         END IF;
         :NEW.EDITED_AT := SYSDATE;
    END;
    /Then I tried to do the following in SQL Plus:
    SQL> insert into tab1(value) values('ddd');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select * from tab1;
            ID EDITED_AT           VALUE
             1 27.03.2008 17:01:24 ddd
    SQL>
    SQL> declare dt date; val varchar2(64);
      2  begin update tab1 set value = 'ddd' where id = 1 returning edited_at, value into dt, val;
      3  dbms_output.put_line('txt = ' || dt || ', ' || val);
      4  end;
      5  /
    txt = 27.03.2008 17:01:24, ddd
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from tab1;
            ID EDITED_AT           VALUE
             1 27.03.2008 17:02:12 ddd
    SQL>As it can be seen Returning clause of an Update statement does not return a new date, i.e. 27.03.2008 17:02:12, that was updated by the trigger, it returns an old one - 27.03.2008 17:01:24. Please advise me why Database returns an old value? I do believe that UPDATE ... RETURNING ... statement should return new, generated by the trigger, value.
    Thanks in advance.
    Regards,
    Yerzhan.

    you need to explicitly include the column in your UPDATE statement SET clause that you expect to return the result you want it to be. here's what i think what happened even though you have a trigger the first statement that was processed was your update statement. at the time of the update it has to return the current values to the returning clause that is the values on the table. now comes next the trigger which gives edited_at column a new value. when the trigger got fired the process don't return anymore to the UPDATE RETURNING statement. it's like each sequence of codes does not executes in parallel.
      SQL> CREATE TABLE TAB_1
        2  (
        3   ID  NUMBER  PRIMARY KEY,
        4   EDITED_AT DATE,
        5   VALUE  VARCHAR2(64)
        6  );
      Table created.
      SQL> CREATE SEQUENCE S_TAB1
        2   INCREMENT BY 1
        3   START WITH 1;
      Sequence created.
      SQL> CREATE TRIGGER T_TAB1_BIE
        2  BEFORE INSERT OR UPDATE ON TAB_1
        3  FOR EACH ROW
        4  BEGIN
        5   IF INSERTING THEN
        6    SELECT S_TAB1.NEXTVAL INTO :NEW.ID FROM DUAL;
        7   END IF;
        8   :NEW.EDITED_AT := SYSDATE;
        9  END;
       10  /
      Trigger created.
      SQL> insert into tab_1(value) values('ddd');
      1 row created.
      SQL> commit;
      SQL> select * from tab_1;
              ID EDITED_AT            VALUE
               1 28-mar-2008 10:31:18 ddd
      SQL> declare dt date; val varchar2(64);
        2  begin update tab_1 set value = 'ddd', edited_at = sysdate
        3        where id = 1 returning edited_at, value into dt, val;
        4  dbms_output.put_line('txt = ' || dt || ', ' || val);
        5  end;
        6  /
      txt = 28-mar-2008 10:32:39, ddd
      PL/SQL procedure successfully completed.
      SQL> select * from tab_1;
              ID EDITED_AT            VALUE
               1 28-mar-2008 10:32:39 ddd
      SQL>

  • MessageChoice does not return correct value

    Hi
    I am problem with MessgeChoiceBean's improver beharior
    For the first time it retunrs blank and subsequently In one page if I select Yes, it returns No.
    In another page it does not return any thing for the first two selections. And I reciev flip values.
    I ran VO outside, VO is returning correct values.
    MessageChoice attributes and associated PPR:
    Data Type: Varchar2
    Initial Value: N
    Pick List view Definition: oracle.apps.xxx.docs.common.lov.server.YesNoVO
    Pick List View Instance: YesNoVO3
    Pick List Display Attribute: Meaning
    Pick List Value AttributeL LookupCode
    ActionType: firePartialAction
    Event: handleNewLocationFlagChange
    Parameter Name: newLocationFlag
    Parameter Value: ${oa.CustomerInfoVO1.NewShipToLocationFlag}
    ProcessParameterForm Code:
    if ("handleNewLocationFlagChange".equals(event))
    String newLocationFlag = pageContext.getParameter("newLocationFlag");
    Serializable[] parameters = { ""+newLocationFlag};
    Class[] paramTypes = { String.class};
    am.invokeMethod("handleNewLocationFlagChange", parameters, paramTypes);
    VO definition:
    select LOOKUP_CODE,MEANING
    FROM ONLINE_DOCS_LOOKUPS
    WHERE ONLINE_DOCUMENT_CODE = 'ALL'
    AND LOOKUP_TYPE = 'YESNO'
    ORDER BY ATTRIBUTE1
    View output:
    LOOKUP_CODE     MEANING
    N     No
    Y     Yes
    I have quite a bit number of columns to change render property.
    Any help will be appreciated.
    Thanks
    Prasad

    Your question is not clear, are you saying the values in the messageChoiceBean is not displayed properly. As far as I can see from the definition the poplist picks the values from a lookup(Yes, No) values and has a PPR action associated with it. Did you check what this method handleNewLocationFlagChange is doing in the AM ?

  • When LOV does not return the value

    Check that you are not calling setText(String) on the web bean to set the default value. It causes your bean to no longer draw the value from the underlying VO. One of the symptoms is that selecting a value from the LOV modal window will not return that value to the base page. (The value from the LOV will actually be set on the VO, but the UI won't reflect it.)
    Setting the default value in the model layer is prefered. You can do this by overriding the create(AttributeList nameValuePair) method of OAEntityImpl or OAViewRowImpl.
    If, for some reason, you need to set the default value from the client side, you need to call setText with the pageContext, e.g., setText(pageContext, "myDefault");

    Hello
    Upon giving your question further thought I think that you would be better off if you added an 'id' column to table T1 and referenced this 'id' column in table T2 . Something like
    Table_T1(id number, c1 varchar2(100)
    and
    Table_T2(.other_columns.. ,t1_id)
    Your LOV will now be select c1 display,id return from table_t1The column t1_id will be defined to use this LOV.
    You will need no other modifications to the form on table_t2
    Varad

  • LOV does not return the value (1)

    Avoid calling setText on the web bean to set the default value. It causes your bean to no longer draw the value from the underlying VO. One of the symptoms is that selecting a value from the LOV modal window will not return that value to the base page. (The value from the LOV will actually be set on the VO, but the UI won't reflect it.)
    Setting the default value in the model layer is prefered. You can do this by overriding the create(AttributeList nameValuePair) method of OAEntityImpl or OAViewRowImpl.
    If, for some reason, you need to set the default value from the client side, you need to call setText with the pageContext, e.g., setText(pageContext, "myDefault");

    Hi RamKumar,
    Thanks for your reply.. I have already done that but no luck :(
    Regards,
    Hemanth J

  • FM SPE_CALCULATE_PRICE - Java Call does not return Net Value of Sales Order

    Dear Experts,
    we want to make a call of FM SPE_CALCULATE_PRICE from the SAP NetWeaver Developer Studio to achieve that we receive the Net Value of a Sales Order. When we try to test the Scenario in SAP CRM (Creation of a Sales Order) Itself all is working fine. But if we try to make the call from Developer Studio it does not work for some reason. We have applied SAP Note 1936255.
    I am attaching:
    - the Pricing Trace we receive as a result from SAP.
    The Java Code we use is the following:
    Code JAVA
    import com.sap.mw.jco.*;
    import com.sap.mw.jco.JCO.ParameterList;
    import com.sap.mw.jco.JCO.Structure;
    import com.sap.mw.jco.JCO.Table;
    public class callIPCDemo {
    public static void main(String[] args) {
      System.out.println("--- START ---");
      // connect to SAP system
      JCO.Client client = null;
      try {
      client = JCO.createClient(
        "400", // SAP client
        "XXXX", // User ID
        "XXXXXXXX", // Password
        "EN", // Language
        "XXX.XXX.XX.XXX", // IP des hosts
        //"QPMR-CR20", // Hostname
              "00"); // System number
      client.connect();
      System.out.println("Connection OK\n");
      catch (Exception ex) {
      System.out.println(ex);
      return;
      // print RFC attributes
      System.out.println(client.getAttributes());
      // create JCo repository
      JCO.Repository repository = new JCO.Repository("testIPCcall", client);
      // Function Module SPE_CALCULATE_PRICE
      IFunctionTemplate ft = repository.getFunctionTemplate("SPE_CALCULATE_PRICE");
      JCO.Function function = null;
      try {
      function = ft.getFunction();
      } catch (Exception ex) {
      System.out.println(ex);
      return;
      // IS_HEADER_INPUT
      ParameterList importParameterList = function.getImportParameterList();
      Structure HeaderInput = importParameterList.getStructure("IS_HEADER_INPUT");
      HeaderInput.setValue("005056A7005E1ED3A7AD22549B279B91", "DOCUMENT_ID");
      HeaderInput.setValue("CRM", "APPLICATION");
      HeaderInput.setValue("ZCRM02", "PRC_PROCEDURE_NAME");
      HeaderInput.setValue("EUR", "DOCUMENT_CURRENCY_UNIT");
      HeaderInput.setValue("EUR", "LOCAL_CURRENCY_UNIT");
      HeaderInput.setValue("X", "PERFORM_TRACE");
      // IS_HEADER_INPUT-ATTRIBUTES (substructure/table)
      Table HeaderInputAttributes = HeaderInput.getTable("ATTRIBUTES");
      HeaderInputAttributes.appendRows(3);
      Table valuesTable = null;
      HeaderInputAttributes.setRow(0);
      HeaderInputAttributes.setValue("DIS_CHANNEL", "FIELDNAME");
      valuesTable = HeaderInputAttributes.getTable("VALUES");
      valuesTable.appendRows(1);
      valuesTable.setValue("01", 0);
      HeaderInputAttributes.setRow(1);
      HeaderInputAttributes.setValue("SALES_ORG", "FIELDNAME");
      valuesTable = HeaderInputAttributes.getTable("VALUES");
      valuesTable.appendRows(1);
      valuesTable.setValue("O 50000151", 0);
      HeaderInputAttributes.setRow(2);
      HeaderInputAttributes.setValue("SOLD_TO_PARTY", "FIELDNAME");
      valuesTable = HeaderInputAttributes.getTable("VALUES");
      valuesTable.appendRows(1);
      valuesTable.setValue("005056A7005E1ED3A7ACEFCAD95FBB91", 0);
      importParameterList.setValue(HeaderInput, "IS_HEADER_INPUT");
      // IT_ITEM_MAIN_INPUT
      String itemGuid = "005056A7005E1ED3A7AD3F004CD85B91";
      ParameterList tableParameterList = function.getTableParameterList();
      Table tableItems = tableParameterList.getTable("IT_ITEM_MAIN_INPUT");
      tableItems.appendRows(1);
      tableItems.setValue(itemGuid, "ITEM_ID");
      tableItems.setValue("005056A7005E1EE39289A0FB457C9D8A", "PRODUCT_ID");
      tableItems.setValue("M", "EXCH_RATE_TYPE");
      tableItems.setValue("10", "QUANTITY");
      tableItems.setValue("PC", "QUANTITY_UNIT");
      // IT_ITEM_ATTRIB_INPUT
      Table tableItemAttributes = tableParameterList.getTable("IT_ITEM_ATTRIB_INPUT");
      tableItemAttributes.appendRows(2);
      tableItemAttributes.setValue(itemGuid, "ITEM_ID");
      tableItemAttributes.setValue("PRODUCT", "FIELDNAME");
      tableItemAttributes.setValue("005056A7005E1EE39289A0FB457C9D8A", "FIELDVALUE");
      tableItemAttributes.nextRow();
      tableItemAttributes.setValue(itemGuid, "ITEM_ID");
      tableItemAttributes.setValue("PRC_INDICATOR", "FIELDNAME");
      tableItemAttributes.setValue("X", "FIELDVALUE"); 
      // IT_ITEM_TIMESTMP_INPUT
      Table tableTimestamps = tableParameterList.getTable("IT_ITEM_TIMESTMP_INPUT");
      tableTimestamps.appendRows(3);
      tableTimestamps.setValue(itemGuid, "ITEM_ID");
      tableTimestamps.setValue("PRICE_DATE", "FIELDNAME");
      tableTimestamps.setValue("20140225000000", "TIMESTAMP");
      tableTimestamps.nextRow();
      tableTimestamps.setValue(itemGuid, "ITEM_ID");
      tableTimestamps.setValue("PRT_DELIVERYDATE", "FIELDNAME");
      tableTimestamps.setValue("20140225000000", "TIMESTAMP");
      tableTimestamps.nextRow();
      tableTimestamps.setValue(itemGuid, "ITEM_ID");
      tableTimestamps.setValue("PRT_ORDERDATE", "FIELDNAME");
      tableTimestamps.setValue("20140225000000", "TIMESTAMP");
      // execute function module
      try {
      client.execute(function);
      } catch (Exception ex) {
      System.out.println(ex);
      return;
      // check result
      JCO.Structure structureHeaderResult = function.getExportParameterList().getStructure("ES_HEADER_RESULT");
      System.out.println("Net Value: " +
        structureHeaderResult.getValue("NET_VALUE"));
      JCO.Table tableHeaderResult = function.getExportParameterList().getTable("ET_TRACE");
      System.out.println(tableHeaderResult.getNumRows());
      for(int x = tableHeaderResult.getNumRows(); x <= tableHeaderResult.getNumRows(); x = x + 1) {
      tableHeaderResult.setRow(x);
      System.out.println("Trace: " + x + tableHeaderResult.getValue("ACCESS_TRACE_XML"));
      // disconnect from SAP system
      client.disconnect();
      System.out.println("--- END ---");

    Thanks.
    I'll have to discuss VTAA pricing types with the Business Analyst, since there are many records and I'm not sure what I'm looking at.
    In regards to your second point, it's not in calculation. It'll stay at that number until you save, check the conditions tab in the header or reprice the document.
    What's interesting is that it doesn't do this for all materials.
    For example:
    Material 1 - priced $25
    Material 2 - priced $25
    Net price would be $50, which is correct.
    But say we use Material 3 - priced $25 as well. For this one, the total net price could show up as $30.
    Can pricing types be specific to materials or material groups? What is the pricing type exactly and why 'A'?

  • DATE type returned from function does not return the time component

    Hi,
    I'm dealing with a strange problem. I have a PL/SQL function (running on Oracle 8.1.4.7) which returns a DATE value. Like we all know the DATE datatype includes a date component and a time component.
    The function I used for testing is like this:
    FUNCTION ReturnDate return Date is
    dReturn Date;
    Begin
    select sysdate into dReturn from dual;
    return dReturn;
    end ReturnDate;
    When I call this function from .NET using ODP.NET the date value I get does not have the time component included only the day-month-year components.
    This is a code-snippet that calls the function :
    command.CommandText="Schema.ReturnDate";
    command.CommandType=CommandType.StoredProcedure;
    command.Parameters.Add("Return_Value",
    OracleDbType.Date,0,ParameterDirection.ReturnValue);
    command.ExecuteNonQuery();
    I use the OracleDbType.Date type which I think is the most logical choice, because the type in the Database is after all DATE.
    However this does not include the time componet. But if I change the OracleDbType.Date to OracleDbType.TimeStamp I get the time component. I'm not happy with this "hack" because I'm not sure what will happen when we upgrade our version of the Database to Oracle 9i which uses the new TimeStamp datatype.
    Is this a bug that the OracleDbType.Date does not include the time component??

    How do you examine the output Date value?
    If it is from the string, then the time components will
    not show because the NLS_DATE format in the client
    machine does not contain the time components.
    In American, the Date format is 'DD-MON-RR' by default whereas, the TimeStamp format is 'DD-MON-RR HH.MI.SSXFF AM' by default.
    Can you take a look at the time components from the OracleDate by accessing the time properties, eg. OracleDate.Hour, OracleDate.Minute..etc to see if the time values are there?
    Thanks
    Martha

  • P_session.get_value call does not return the value

    I have a form on a table.
    After the doInsert call in the pl/sql event handler section of the insert button, I have the sql statement
    "insert into temp
    values(56,p_session.get_value_as_varchar2('DEFAULT','A_FIRST_NAME'));"
    However, the value the call p_session.get_value_as_varchar2('DEFAULT','A_FIRST_NAME') returns is always null.
    Any comments?
    Thanks in advance.
    null

    When I user get_value_as_varchar2
    function then i get following error
    Anybody knows about solving a problem
    code works fine for number data.
    if i try to access varchar2 column then i get error.
    An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)
    An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)
    (WWV-00000)
    The preference path does not exist: ORACLE.WEBVIEW.PARAMETERS.8723279877 (WWC-51000)
    (WWC-00000)
    anybody knows please give reply its urgent..
    thanks in advance
    Yogesh
    null

  • APEX_ITEM.POPUP_FROM_QUERY does not open nw window, does not return a value

    Hi.
    I am trying to use APEX_ITEM.POPUP_FROM_QUERY:
    SELECT
    APEX_ITEM.POPUP_FROM_QUERY
    1,
    ftdpr.POWNUMBER,
    'SELECT DISTINCT ftp1.POWNUMBER AS "DISPLAY", ftp1.POWNUMBER AS "RETURN" FROM CBI.FT_POW ftp1 WHERE ftp1.EXCHANGE=133 AND ftp1.FLOOR_NUMBER=1'
    ) PowerID
    FROM CBI.FT_DECOMM_POWNUMBER_READINGS ftdpr WHERE ftdpr.REFERENCE_ID = 'AD13312880DC';
    The box and link icon appear but when I click on the link icon:
    * firstly it does not open in a new window but opens in the original window - not much of a popup !!
    * secondly, in the existing window (which has been overwritten by the "popup"), it shows the results of the query (apparently as hyperlinks) ok but when I click on a returned value hyperlink nothing happens i.e. there is no "return".
    What am I doing wrong ?
    I have been able to get the other apex_item api procedures (e.g. SELECT_LIST_FROM_QUERY) to work ok but not APEX_ITEM.POPUP_FROM_QUERY.
    I can write what I want in Javascript but APEX_ITEM.POPUP_FROM_QUERY was perfect for what I was asked to do.
    Thanks,
    Brett Morgan

    Sorry forgot version I am using:
    Application Express 3.1.0.00.32
    Oracle 10g

  • RUN_REPORT_OBJECT does not return  a value

    I am using Reports 6i (via web browser) on an Oracle 8 database.
    We have just recreated our entire development database. When running a report from a form, the web browser pops up with a blank screen. No changes has been done to the code. None of the reports now work on our dev environment.
    However, I have now found that RUN_REPORT_OBJECT is not retirning a value. What would cause RUN_REPORT_OBJECT not to return a value?
    My code behind the button on the form that calls the report is as follows:
              report_id := find_report_object('nl4689');
              f_file_name := :illprint.report_number||'.lis';
              html_file_name := :illprint.report_number||'.html';
              set_report_object_property(report_id,report_execution_mode,batch);
              set_report_object_property(report_id,report_comm_mode,synchronous);
              set_report_object_property(report_id,report_destype,file);
              set_report_object_property(report_id,report_desname,:global.user_home_dir||f_file_name);
              set_report_object_property(report_id, report_other,
              'p_branch='||:b1.branch_code||
              ' p_class='||:b1.p_class);
         report_job_id := RUN_REPORT_OBJECT(report_id);
              host('txt2htmlhpux '||:global.user_home_dir||f_file_name||' > '||:global.user_home_dir||html_file_name);
              web.show_document(:global.user_home_dir||html_file_name,'_BLANK');
    Thanks

    That is set correctly. All these applications were working fine. We only have this issue after re-building our development environment.
    I have personally run the application and noticed that there are error messages as well.
    When getting the report id from RUN_REPORT_OBJECT, the following error appears
    REP-0004: Warning: Unable to open user preference file.
    Immeditely followed by:
    REP-3002: Error initializing printer. Please make sure a printer is installed.
    Edited by: Rick777 on 20-Jan-2010 03:34
    Edited by: Rick777 on 20-Jan-2010 03:39

  • PIE Graph does not return when values = 0

    I use this code to create a PIE Chart
    select null LINK
    ,'E0' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E0'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    union
    select null LINK
    ,'E1' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E1'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    union
    select null LINK
    ,'E2' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E2'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    union
    select null LINK
    ,'E3' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E3'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    union
    select null LINK
    ,'E4' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E4'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    It works beautifully, except when each of the values returned equate to zero.
    When this is the case the svg chart is not returned. Any ideas?

    That will come in handy. I have some line graphs to do as well. I am using version 2.2 so i don't think they fixed it. However, i have some good news i have found a work around to my problem. With my set of data i am always going to be bringing back at max 5 values for the data, so i created an item type for each one and set a value in a temporary table. e.g.
    declare
    l_id number;
    begin
    delete from graph_temp where name like 'E0' and graph_name like 'P1_GEOM';
    select count(*) into l_id
    from parts
    where om_geometry like 'E0'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid;
    if l_id > 0 then
    insert into graph_temp (name,value, graph_name) values ('E0',l_id,'P1_GEOM');
    end if;
    return l_id;
    end;
    As you can see the table only gets populated when the value is greater than zero. My graph then becomes a simple select from the graph_temp table. The only change i now need to make is to have a session id column in the graph_temp table so i only remove the correct session info each time.

  • SSRS report with tabular model – MDX query CoalesceEmpty function does not return the provided string value

    Hello everyone,
    I created following calculated member in MDX query. I am using it in one of the report parameter in dataset (single select dropdown list as report parameter).
    WITH MEMBER [Measures].[ParameterCaption] AS
    CoalesceEmpty([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION,'None')
    I would like to display 'None' text at the top of the dropdown list values. So that when user selects 'None' then this parameter will not considered in MDX query else the selected National Account Code will be considered to filter report data. But,
    the above return blank/empty value for  [Customer].[National Account Code].&  member though I specified 'None' as text in CoalesceEmpty function. Any advice would be appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hi Ankit,
    It seems that you issue had been solved in your another thread.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5a5becac-226f-428a-95b0-aaaa22733818/ssrs-report-with-tabular-model-create-a-dropdown-report-parameter-with-none-option-as-the-top?forum=sqlanalysisservices#0e51bf8c-a66c-4df5-a244-0147728fdfdb
    iif([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION="","None",[Customer].[National
    Account Code].CURRENTMEMBER.MEMBER_CAPTION)
    I marked this reply as answer, it will benefit to other members who have the similar issue.
    Regards,
    Charlie Liao
    TechNet Community Support

Maybe you are looking for

  • Enable disk use to load songs from ipod to computer?

    I have music from a desktop and am trying to put all of that music onto my laptop by enableing the disk use. All of the songs are already stored on my ipod. I tried to press "enable disk use" but it is gray and already checked. Plus I already have "m

  • Unsharp text in menu bar and other various places

    After upgrading to Yosemite the text and icons of the menu bar is pretty unsharp. Other text such as on websites and filenames remain sharp. Anyone else experiencing the same issue? Any way to solve this? I'm on a 27" late 2009 iMac.

  • FCP won't play Keynote QT movie

    Just converted a Keynote presentation into a QT movie but it refuse to playin FCP, it plays ok in Quick Time. When I try and play it in FCP it brings up the message 'general error' and 'File Error'. The Keynote QT movie of the music plays ok in FCP t

  • Iphoto is 'damaged or unreadable' and I can't re-create!

    I searched the board and found a link to manually rebuild the Library but when I tried to manually recreate, the 'Originals" or "modified" folders did not show up in the Content folder.  I do have a backup on an external drive but b/c of some Iphoto

  • Jagged edges because of oversaturated colors with XDCAM EX

    Hi, i want to export a movie created in after effects as XDCAM EX 1080i50. My problem is, that i get jagged edges in the output file because of the oversaturated color im using in my After Effects composition. In the picture below you can see the sta