Validating input parameters using exception handlers

Hi
I have a procedure which works in a similar way to the following:
PROCEDURE main (p_date_from times.id%TYPE)
l_time_from varchar2(40);
BEGIN
l_time_from:=p_date_from
IF l_time_from IS NULL THEN
    l_time_from:='23:59';
ELSIF NOT regexp_replace(l_time_from,'.[0-9]{2}:.[0-9]{2}') THEN
    RAISE invalid_time
END IF;
EXCEPTIONS
  WHEN invalid_time THEN
    dbms_output.put_line('Not a valid time');
END main;I want to validate p_time_from parameter so that it only accepts the following format 'NN:NN' i.e. '22:31'. I've thought that using a regular expression would work within an IF statement, however as you can see my syntax is poorly constructed at best and doesn't actually work. Is there a better way of doing this??
Many thanks
Edited by: tri_harder on Dec 4, 2008 11:50 AM

Hi,
A better solution...
CREATE OR REPLACE PROCEDURE proc_main(p_date_from IN times.id%TYPE,
                                      p_code      OUT NUMBER,
                                      p_message   OUT VARCHAR2) IS
    v_date_from times.id%TYPE := '23:59';
    v_date      DATE;
    invalid_minute EXCEPTION;
    PRAGMA EXCEPTION_INIT(invalid_minute, -1851);
    invalid_hour EXCEPTION;
    PRAGMA EXCEPTION_INIT(invalid_hour, -1850);
    invalid_format EXCEPTION;
    PRAGMA EXCEPTION_INIT(invalid_format, -1858);
BEGIN
    -- Initialization
    p_code    := 0;
    p_message := 'Succesful';
    IF p_date_from IS NOT NULL THEN
        v_date_from := p_date_from;
    END IF;
    -- This raises exception
    v_date := TO_DATE(v_date_from, 'HH24:MI');
EXCEPTION
    WHEN invalid_minute
         OR invalid_hour
         OR invalid_format THEN
        -- You must handle the exception
        p_code    := SQLCODE;
        p_message := SQLERRM;
END proc_main;Regards,

Similar Messages

  • Validating Input characteristics using other characteristics value in PI sh

    Hi,
    I am currently working with PI sheet, the requirement is to validate the input characteristics using some other characteristics values, like
    Char Name | Value | Input |
    Acids     | 2-3   | 2.5   |
    CONC      | 10-40 | 20    |
    in this case consider the characteristic value from character Value to validate Input.
    Please suggest.
    Anmol.

    Hi,
    I got the solution clossing the threat, by using variables in PI sheet to create validation formula.
    Thanks,
    Anmol

  • Input parameters from process

    Hi,
    I have a scenario where the user enters the process id as the input and once he submits it
    I have to retrieve the input parameters of that process
    Is it possible to get the input parameters using the GP API
    Please give me a lead on how to achieve this
    Thanks
    Padmaja

    Hi
    You can achieve this using wd api, you need to create the webdynpro application
    IGPProcess process = null;
         String message = "";
         String processName = "Cab Booking Process";
         try {
               IWDClientUser wdUser = WDClientUser.getCurrentUser();
               IUser user = wdUser.getSAPUser();
              // wdComponentAPI.getMessageManager().reportSuccess("current user is : " + user.getFirstName());
               IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(user);//, user.getLocale());
               process =GPProcessFactory.getDesigntimeManager().getActiveTemplate("7031AF6B877511DCBBB60016353AC84F",userContext);
               IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
               IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
               int rolenum = process.getRoleInfoCount();
               //wdComponentAPI.getMessageManager().reportSuccess("dyn user is : " + user.getFirstName());
               IGPProcessRoleInstance roleInstance=null;
               IGPStructure params = null;
              // wdComponentAPI.getMessageManager().reportSuccess("Title is "+ process.getTitle());
    //           if (process.getTitle().equals("Cab Booking Process"))
    //               wdComponentAPI.getMessageManager().reportSuccess("get process instance "user.getFirstName()"  "user.getLastName()rtm.getRunningInstances(0, new Date(2007,1,1), new Date(System.currentTimeMillis()), user));
               try {
                    params = GPStructureFactory.getStructure(process.getInputParameters());
                         if (process.getTitle().equals("Cab Booking Process")) {
                             params.setAttributeValue("RequestId.4",wdContext.currentContextElement().getRequestId());
                             params.setAttributeValue("EmployeeId.4",wdContext.currentContextElement().getEmployeeId());
                             params.setAttributeValue("ApproverId.4",wdContext.nodeZhr_Emp_Sup_Info_Input().nodeOutput_Approver().node_Output().current_OutputElement().getUser_Id());
                             params.setAttributeValue("ApproverName.4",wdContext.nodeZhr_Emp_Sup_Info_Input().nodeOutput_Approver().node_Output().current_OutputElement().getName());
                             params.setAttributeValue("Name.4",wdContext.currentOrg_AssignmentElement().getName());
                             params.setAttributeValue("Grade.4",wdContext.currentOrg_AssignmentElement().getEsubgroup());
                             params.setAttributeValue("Department.4",wdContext.currentOrg_AssignmentElement().getOrgtxt());
                             params.setAttributeValue("PersonalArea.4",wdContext.currentContextElement().getPersonalSubAreaText());
                             params.setAttributeValue("CostCenter.4",wdContext.currentContextElement().getCostCenter_GuestText());
                             //params.setAttributeValue("ActionName.4","Test Cab Request From Reddy");
                             if(wdContext.currentContextElement().getResultState().equalsIgnoreCase("Submit")){
                                  //setting the Action name dynamically(UWL Task Name)
                                  wdContext.currentContextElement().setActionName("Approve Cab Request Of " + wdContext.currentOrg_AssignmentElement().getName());
                                  params.setAttributeValue("ActionName.4", wdContext.currentContextElement().getActionName());
                                  wdComponentAPI.getMessageManager().reportSuccess("Your Request Form has been sumbited for the Approval.");
                                  message = "Your Request has been sumbited for the Approval.\n\tRequest ID : " + wdContext.currentContextElement().getRequestId();
                             } else {
                                  //setting the Action name dynamically(UWL Task Name)
                                  wdContext.currentContextElement().setActionName("Cab Booking Request from " + wdContext.currentOrg_AssignmentElement().getName());
                                  params.setAttributeValue("ActionName.4", wdContext.currentContextElement().getActionName());
                                  params.setAttributeValue("Extra.4",getTravelDeskPortalId());//Travel Desk Id
                                  wdComponentAPI.getMessageManager().reportSuccess("Your Request has been sent to Travel Desk.");
                                  message = "Your Request has been sumbited to the Travel Desk.\n\tRequest ID : " + wdContext.currentContextElement().getRequestId();
                    }catch(Exception e){
                         wdComponentAPI.getMessageManager().reportSuccess("Exception in Parameter Set "+e);
               IGPProcessInstance prInstance = rtm.startProcess(process,processName,"This process has been started using the GP public API",user,roles,params,user);
               catch(Exception e){
                    wdComponentAPI.getMessageManager().reportSuccess("Exception Main Try Block "+e);
               try{
               catch (Exception e){
                   wdComponentAPI.getMessageManager().reportSuccess("Error in Calling Complete" +e.getMessage());

  • Variant Input Parameters with ActiveX Objects

    I've created an ActiveX library that exports a variety of objects using Visual C++ Version 6.0. I'm testing the methods and properties of these objects using both LabVIEW and Visual Basic clients. The problem I'm facing is that when testing under LabVIEW, I can't access methods that expect a VARIANT input parameter. The declaration in C++ of one object's such method looks like this:
    void CChassis::Configure (VARIANT config, int rate);
    I can create the ActiveX object with both LabVIEW and Visual Basic. I can invoke methods that do not use VARIANT input parameters using both as well; but, when I create a second ActiveX Object (a CConfiguration) and use the LabVIEW Variant operator, my attempt to invoke Configure fails with a "No Such Interface (E_NOINTERFACE)" error. The invocation fails identically if I wire the CConfiguration directly to the Variant input, as well. If I instead create a constant VARIANT as an input parameter, my Configure method gets called, although the method recognizes that I passed an invalid object.
    Using Visual Basic I can invoke the Configure method without problems while encapsulating a CConfiguration object within a Variant.
    So my question is, have I found a LabVIEW error, or is my approach flawed? If my approach is flawed, where have I gone wrong? Thanks in advance! I'm using LabVIEW version 7.0.

    Hi,
    Have you tried to put in plain data or an object reference into your variant parameter?
    I think plain data should work... for object references i don't know.
    Some time ago, i also coded a small activex library, where i passed object references by parameters in delphi. I did not use variant parameters, but the real interfacedeclaration types (like IMyObject**). This worked fine. I also uses "dual" interfaces for the objects, which get passed by parameter. But i don't really know if this is helpfull for vb.
    Finally, you can also use a workaround:
    For each of your Objects, that you want to use from LabView and which you want to pass by a parameter, you
    insert an new Property "int32 Object_Handle".
    When an Object gets created, it ask a "ObjectHandleManager" (gets written by you) to get an own unique Object_Handle which it stores into its property "Object_Handle".
    The ObjectHandleManager generates an new Object Handle and memorizes the Handle assoziated with the calling object's reference.
    Now, at each time, when you want to pass a object reference to a library function of your self, you can pass the Object_handle as an integer value. In the called function, you can ask your ObjectHandleManager for the real ObjectReference.
    But thats not a very comfortable workaround.

  • Strange behaviour when passing many input parameters to web service

    Hello!!!
    I developed a web service with 52 input parameters using tomcat+axis!
    While testing it in my development enviroment everything was working fine
    (LAN consisted of three windows 2000 server machines!!!)
    When i deployed it in my customer enviroment (VPN with 200 isdn connections) i get a very strange error:
    AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (0)null
    faultActor:
    faultNode:
    faultDetail:
    {}string: return code: 0
    (0)null
    when i used tcptracer in order to understand what is going on,
    I realised that the error occurs when the http request is more than 1350 bytes.
    Can someone explain this behaviour?
    thanks in advance!
    sarantos

    Hi Sarantos,
    I think, there is nothing wrong in the axis engine nor the http request limits as you said. I tried the same passing a 60 kb String as an argument to an operation , getting the results perfectly.
    So problem could be with the method capacity size of your implementation. (I think default it is 64kb)
    bye
    Charlie

  • Validation of input parameters in Oracle BI Publisher reports

    Hi
    I am new to Oracle Bi Publisher.
    In my project i am using oracle BIPfor generating simple reports.
    here i need validation for input parameters (Date field) and i want to make it (Date field) disable, so that user can select the date through the Calendar component only.
    Can anyone please provide me the solution in detail, it is urgent.

    I have the same task to validate input parameters with Oracle BI Publisher 5.6.3 running under Oracle eBS 10.5.10.2. My validation goes beyond of what I can do during parameter registration. I am using Data Templates.
    My first logical place was the before report trigger. So, I built a report trigger which returns 'false' in case the parameters are not proper. Guess what... XMLP just returns a hard-coded message
    !!Error : trigger '" + datatrigger.getName() + "' returns status as 'false'
    First of all, this is a bad style to hardcode messages visible by the user (especially during French implementation). Second of all, it is not informative at all. It would be nice to change oracle.apps.xdo.dataengine.XMLPGEN.executeTrigger() to read, for example, a message from the message stack when the trigger returns 'false' and let the user read it.
    Anyway, what I did was I built a special data group, decalred before any other data group, query like
    select my_package.my_validation fro dual
    If parameters fail the validation my PL/SQL package throws an application exception with a message. At least, in this case the error message gets available as the description of the concurrent request.
    I wish the before report trigger worked!!!

  • Error while creating a BO Universe (using IDT) on top of SAP HANA Calculation View with Input Parameters

    Hi All..
          We are trying to create a Universe (using IDT-Version4.0) on top of the HANA Calculation view. The Calculation view has 4 input parameters, So
    in Universe side we have created the respective prompts. For the creation of derived table we have used the following code
    SELECT *
    FROM "_SYS_BIC"."<schema_name>.<CV_Calculation_View_test>"
    'PLACEHOLDER'=('$$IP_A$$','@Prompt(A)'),
    'PLACEHOLDER'=('$$IP_B$$','@Prompt(B)'),
    'PLACEHOLDER'=('$$IP_C$$','@Prompt(C)'),
    'PLACEHOLDER'=('$$IP_D$$','@Prompt(D)')
    While validating the above code we are getting an error.
    I have attached the snapshot of that error for your reference. Please find the attachment and help me in resolving it.
    Thanks in advance.

    Hello George,
    I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
    Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
    Thanks,

  • Error when using Analytic view with Input Parameters

    Hi,
    I am trying to create an info space based on my Analytic view which has input parameters. The infospace is validated and indexed without any issue. However when I ran the view, I get an error (50011) as it is unable to fetch any results. I tried using an infospace based on Calculation view with input parameters and the explorer view works without any issue.
    Has anyone faced similar issues?
    We are using HANA SP 6 rev 67 and BI 4.0 SP 4.
    Also is there a way to enable input prompts for the users when they refresh the BO Explorer view? If not currently available is there any work around ?
    Thanks

    Hello George,
    I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
    Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
    Thanks,

  • Shoukd the 'final' keyword should be used on all input parameters?

    In my very limited experience as a java programmer have never seen this done any where. Except in the java.lang.Math class which has a final variable, of type double, called PI. As pi is not a value that should change during the execution of a program, though this is not passed in as a parameter.
    However, on a new project, a co-worker is proposing the use of the 'final' keyword on all input parameters as a standard. He has about 5 years experience of maintaining java systems and is putting this suggestion forward as in the past people have overwritten values passed in as parameters causing confusion. Personally I don't see why this is such a major issue if one reads the code of the called programs.
    I would be grateful if anyone has seen this done before, or has any views on the advantages or disadvantages of this.
    Thanks in advance,
    LS

    Lord_Sidcup wrote:
    In my very limited experience as a java programmer have never seen this done any where. Except in the java.lang.Math class which has a final variable, of type double, called PI. As pi is not a value that should change during the execution of a program, though this is not passed in as a parameter.
    I'm sorry, but this point is irrelevant. There are lots of final fields (but not that many final parameters) in Java, BTW. Every field you declare in an interface is automatically final, for example.
    However, on a new project, a co-worker is proposing the use of the 'final' keyword on all input parameters as a standard. He has about 5 years experience of maintaining java systems and is putting this suggestion forward as in the past people have overwritten values passed in as parameters causing confusion. Personally I don't see why this is such a major issue if one reads the code of the called programs.
    IMHO, it's definately not a major issue. It is simply being restrictive, to be restrictive. The guy may have "five years experience", but he sounds lazy, to me. Besides, the first thing I would do in that case (if final were the default), would be something like this:
    public void myMethod (final String a, final int b) {
      String myA = a;
      String myB = b;
    }And now, what has he won by making it final? It simply added some up front work for some people, with no real added value. Also, if I had to retroactively change my code, I would change it as follows:
    //Original Code
    public void myMethod (String myA, int myB) {
      String myA = a;
      String myB = b;
    // New code
    public void myMethod (final String a, final int b) {
      String myA = a;
      String myB = b;
    }That way, you wouldn't even have to worry about changing anything else about your method, as the variables actually used in the rest of the body will remain the same.
    I would be grateful if anyone has seen this done before, or has any views on the advantages or disadvantages of this.The only thing declaring the parameter final does, is it prevents you from assigning a new value to the variable. The instance that parameter references (as long as it is not immutable to begin with) can still be manipulated. I.E. except in some very narrow, and specific, cases, no value added, simply a restriction that exists to be restrictive.
    >
    Thanks in advance,
    LSEdit: And man, am I slow and long-winded.

  • ORA-22275 inserting into the CLOB column using ODBC input parameters

    Hi all,
    I'm having problem with INSERT into the CLOB column via bound input parameters.
    After calling SQLExecDirect() I'm getting following error:
    [Oracle][ODBC][Ora]ORA-22275: invalid LOB locator specified
    Adding defaults to the table definitions does not help. If I embed parameter values into the SQL statement - everything works just fine.
    I use Oracle 9.2 with latest Oracle ODBC driver 9.2.0.4 under Windows XP.
    Any ideas appreciated...
    Vlad
    Code looks like this:
    SQLBindParameter(hstmt,1,...);
    SQLBindParameter(hstmt,2,...);
    SQLBindParameter(hstmt,3,...);
    SQLExecDirect(hstmt,...);
    SQL statement looks like this:
    insert into tst_table (id,str_fld,clob_fld1,clob_fld2) values (50, ? , ? , ?)
    Table looks like this:
    CREATE TABLE tst_table (
         id          number (10,0)     NOT NULL ,
         str_fld          nvarchar2 (50)     NOT NULL ,
         clob_fld1     nclob          NOT NULL ,
         clob_fld2     nclob          NOT NULL ,
         CONSTRAINT PK_tst_table PRIMARY KEY
              id
    I tried to add defaults to the table, but result is the same:
    CREATE TABLE tst_table (
         id          number (10,0)               NOT NULL ,
         str_fld          nvarchar2 (50)               NOT NULL ,
         clob_fld1     nclob     default EMPTY_CLOB()     NOT NULL ,
         clob_fld2     nclob     default EMPTY_CLOB()     NOT NULL ,
         CONSTRAINT PK_tst_table PRIMARY KEY
              id

    You need to provide the data at execution time (i.e. SQL_LEN_DATA_AT_EXEC(0) in the SQLBindParameter followed by a series of SQLPutData calls). If you go to Metalink
    Top Tech Docs | Oracle ODBC Driver | Scripts & Sample Code
    has some sample code that shows you how to do this.
    Justin

  • Is it possible to use a case statement when joining different tables based on input parameters?

    Hi,
    I have a scenario where my stored procedure takes 5 parameters and the users can pass NULL or some value to these parameters and based on the parameters, I need to pull data from various tables.
    Is it possible to use a case statement in the join, similar the one in the below example. I'm getting error when I use the below type of statement.
    select a.*
    from a
    case
    when parameter1=1 then
    inner join a on a.id = b.id
    when parameter1=2 then
    inner join a on a.id = c.id
    end;
    Please let me know, if this type of statement works, and if it works will it create any performance issues?. If the above doesn't work, could you please give me some alternate solutions?
    Thanks.

    Here's a technique for joining A to B or C depending on the input parameters. In theory, you are joining to both tables but the execution plan includes filters to skip whichever join is not appropriate. The drawback is that you have to do outer joins, not inner ones.
    CREATE TABLE A AS SELECT LEVEL ak FROM dual CONNECT BY LEVEL <= 100;
    CREATE TABLE b AS SELECT ak, bk
    FROM A, (SELECT LEVEL bk FROM dual CONNECT BY LEVEL <= 10);
    CREATE TABLE c(ak, ck) AS SELECT ak, bk*10 FROM b;
    variable p1 NUMBER;
    variable p2 NUMBER;
    exec :p1 := 1;
    exec :p2 := 20;
    SELECT /*+ gather_plan_statistics */ A.ak, nvl(b.bk, c.ck) otherk FROM A
    LEFT JOIN b ON A.ak = b.ak AND :p1 IS NOT NULL AND b.bk = :p1
    LEFT JOIN c ON A.ak = c.ak AND :p1 is null and :p2 IS NOT NULL and c.ck = :p2
    WHERE A.ak <= 9;
    SELECT * FROM TABLE(dbms_xplan.display_cursor(NULL,NULL,'IOSTATS LAST'));
    | Id  | Operation             | Name            | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |   0 | SELECT STATEMENT      |                 |      1 |        |      9 |00:00:00.01 |       7 |
    |*  1 |  HASH JOIN OUTER      |                 |      1 |      9 |      9 |00:00:00.01 |       7 |
    |*  2 |   HASH JOIN OUTER     |                 |      1 |      9 |      9 |00:00:00.01 |       7 |
    |*  3 |    TABLE ACCESS FULL  | A               |      1 |      9 |      9 |00:00:00.01 |       3 |
    |   4 |    VIEW               | VW_DCL_5532A50F |      1 |      9 |      9 |00:00:00.01 |       4 |
    |*  5 |     FILTER            |                 |      1 |        |      9 |00:00:00.01 |       4 |
    |*  6 |      TABLE ACCESS FULL| B               |      1 |      9 |      9 |00:00:00.01 |       4 |
    |   7 |   VIEW                | VW_DCL_5532A50F |      1 |      9 |      0 |00:00:00.01 |       0 |
    |*  8 |    FILTER             |                 |      1 |        |      0 |00:00:00.01 |       0 |
    |*  9 |     TABLE ACCESS FULL | C               |      0 |      9 |      0 |00:00:00.01 |       0 |
    Predicate Information (identified by operation id):
       1 - access("A"."AK"="ITEM_0")
       2 - access("A"."AK"="ITEM_1")
       3 - filter("A"."AK"<=9)
      5 - filter(:P1 IS NOT NULL)
       6 - filter(("B"."AK"<=9 AND "B"."BK"=:P1))
       8 - filter((:P2 IS NOT NULL AND :P1 IS NULL))
       9 - filter(("C"."AK"<=9 AND "C"."CK"=:P2))
    You can see that table C was not really accessed: the buffer count is 0.
    exec :p1 := NULL;
    SELECT /*+ gather_plan_statistics */ A.ak, nvl(b.bk, c.ck) otherk FROM A
    LEFT JOIN b ON A.ak = b.ak AND :p1 IS NOT NULL AND b.bk = :p1
    LEFT JOIN c ON A.ak = c.ak AND :p1 is null and :p2 IS NOT NULL and c.ck = :p2
    WHERE A.ak <= 9;
    SELECT * FROM TABLE(dbms_xplan.display_cursor(NULL,NULL,'IOSTATS LAST'));
    Now table B is not accessed.
    | Id  | Operation             | Name            | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT      |                 |      1 |        |      9 |00:00:00.02 |       7 |      2 |
    |*  1 |  HASH JOIN OUTER      |                 |      1 |      9 |      9 |00:00:00.02 |       7 |      2 |
    |*  2 |   HASH JOIN OUTER     |                 |      1 |      9 |      9 |00:00:00.01 |       3 |      0 |
    |*  3 |    TABLE ACCESS FULL  | A               |      1 |      9 |      9 |00:00:00.01 |       3 |      0 |
    |   4 |    VIEW               | VW_DCL_5532A50F |      1 |      9 |      0 |00:00:00.01 |       0 |      0 |
    |*  5 |     FILTER            |                 |      1 |        |      0 |00:00:00.01 |       0 |      0 |
    |*  6 |      TABLE ACCESS FULL| B               |      0 |      9 |      0 |00:00:00.01 |       0 |      0 |
    |   7 |   VIEW                | VW_DCL_5532A50F |      1 |      9 |      9 |00:00:00.01 |       4 |      2 |
    |*  8 |    FILTER             |                 |      1 |        |      9 |00:00:00.01 |       4 |      2 |
    |*  9 |     TABLE ACCESS FULL | C               |      1 |      9 |      9 |00:00:00.01 |       4 |      2 |

  • May I use Exception Handling for validation ?

    Hello All,
    Can any one know about that may i use exception handling for validation in my report program.
    Please if its possible then give me some Example...
    Thanks.

    Hi Niraj,
    Exception is not at all raised or handled in the given example.
    There are so many document available in the SCN regarding OO ABAP you can read that.
    As far as validation of a field ( Selection screen ) of course we can do that but I don't see any advantage more over it will make your code unnecessarily complex.
    Regards
    Bikas

  • Using calculation view in excel with input parameters

    Hello
    I have a calculation view which receives 2 input parameters for a range of dates, when i create the connecction with Excel i get the error "sql processing error: Hierarchy source query: SQL: column store error: search table error: [34092] search on calculation model requires parameters: Required variable $$MyVariable$$ is not set"
    I would like to know how can i pass the parameteres from excel to my calculation view??
    Thanks

    I doubt this can be achieved with a native Excel connection. Try SAP Advanced Analysis for Office. (I believe it may now just be called Analysis for Office).

  • How to validate the input parameters in Oracle BI Publisher reports

    Hi
    i am new to Oracle BI Publisher
    I am using OBI for generating simple reports.
    here i need validation for input parameters (Date Parameter) and also want to disable the Date filed so that user can select through the calendar component.
    Here validation in the sense, the system must validate the date and alert the user with an appropriate message
    Can anyone please provide me the solution in detail.
    Thanks in advance
    Edited by: user10185520 on Aug 26, 2008 6:15 AM

    I have the same task to validate input parameters with Oracle BI Publisher 5.6.3 running under Oracle eBS 10.5.10.2. My validation goes beyond of what I can do during parameter registration. I am using Data Templates.
    My first logical place was the before report trigger. So, I built a report trigger which returns 'false' in case the parameters are not proper. Guess what... XMLP just returns a hard-coded message
    !!Error : trigger '" + datatrigger.getName() + "' returns status as 'false'
    First of all, this is a bad style to hardcode messages visible by the user (especially during French implementation). Second of all, it is not informative at all. It would be nice to change oracle.apps.xdo.dataengine.XMLPGEN.executeTrigger() to read, for example, a message from the message stack when the trigger returns 'false' and let the user read it.
    Anyway, what I did was I built a special data group, decalred before any other data group, query like
    select my_package.my_validation fro dual
    If parameters fail the validation my PL/SQL package throws an application exception with a message. At least, in this case the error message gets available as the description of the concurrent request.
    I wish the before report trigger worked!!!

  • Two questions: Scanner and exception handlers

    Extreme Newbie Alert: I took a single college semester involving Java, almost five years ago, and haven't really touched it since until recently when I decided to try to get back into it. I am now working on building a program while reading the Java 5.0 Tutorial downloadable from Sun.
    Okay, now that the faint of heart have left us, here are the two questions I want to ask:
    1) I am trying to use the Scanner tool ( http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html ) on a FileReader wrapped in a BufferedReader. I have installed JDK 5.0 and I am importing java.util.*, but when I try to compile I get this error:
    Wishlist.java:71: cannot resolve symbol
    symbol : class Scanner
    location: class Wishlist
    Scanner readFromMe = new Scanner(new BufferedReader(new FileReader("wishlist.txt")));
    ^
    ...and then another one pointing to the other appearance of "Scanner" in the same line, followed by six more in places where I use the readFromMe variable that line was supposed to declare and initialize. Any idea why the compiler doesn't recognize Scanner even though I'm importing its package?
    2) Is there anything preventing you from nesting exception handlers? As you've seen, in this program I open a file...if that attempt produces a FileNotFoundException, I want the error handling to create a new, empty file to use in place of the one that should have been there. Since this could throw an IOException of its own, I would need to put a try | catch block into the other catch block. Is the compiler going to stand for that? Alternatively, is there any input stream that creates a file with the specified filename if there is none already? Probably not, since a newly created file will be empty and there's no point in having an input stream on it...

    1) Are you sure you installed and are invoking jdk
    1.5? Maybe you have an earlier version ahead of it
    on your path.Hm. I did use 1.3 back in college...I checked the contents of PATH and the User Variables version of it was set correctly but the System Variables version of it was set to 1.3. I corrected the System Variables version of it and now the compiler doesn't complain about Scanner...but I'm still getting errors that it doesn't recognize readFromMe even after I initialized it. Odd...
    2) yeah you can nest try/catch blocks like that.
    However, in this case, exceptions sound like the
    wrong way to go. A missing file sounds like a real,
    regular possibility -- it's not that exceptional as
    you describe it. A better thing would be to create
    a File object, see if the file exists, and then if
    it doesn't go ahead and immediately handle that
    case. Don't even try to open the file that may not
    exist.Okay, I'll try rewriting the file read like that, and hopefully the readFromMe errors will go away. If they don't I'll make a new post...probably with the entirety of the code because I can't even guess at what part of the code is causing that. Thanks for the help!

Maybe you are looking for

  • Java.lang.NullPointerException in webstarterappII application.log

    Hi, all, When I try WebStarter Application II (WSA II), I find many java.lang.NullPointerException in application.log, like this: 03/10/20 06:41:42 webstarterappII: Version: 1.0 LOGGING: DocServlet:service(), request to show document 03/10/20 06:41:4

  • Finder not working well-folders empty, icons disappearing...

    Since i updated to yosemite from mavericks, finder has been extremely annoying, making my mac almost unusable at times: When i open a folder, sometimes non of what's in it appears (although the items are there, if i click randomly it'll open some) Al

  • File size shrinkage when renaming pictures?

    I notice that when I use Lightroom 5 to rename the pictures contained in a folder, the folder size is reduced afterward. For example, a folder containing 349 jpg files was 1.52 GB but after renaming them, the folder size was redusce to 1.30 GB. Why i

  • Deactivate standard objects in BI content

    Hi guyz, Just want to ask if I can deactivate objects I have already activated in BI content? If so, how will I do it? For example, how will I deactive 0CALMONTH or 0TCT_C01 cube? Thank you! Loeda

  • Can't update to iOS 8.01, says I'm not connected to Internet when I am connected

    just download iOS 8.01 for my iPhone 5 and iPad air, it won't let me install it because when it tries to verify it it says I'm not connected to the Internet when I am, clearly because I'm able to post here.