How can I pass a Presentation Variable (Date) into a prompt

Hello
How can I pass a Presentation Variable (date) into a prompt? I seem to be able to do this successfully for a non-date value but have had no luck with a Date variable.
Here's a simplistic version of what I'm trying to do:
1. I have a Presentation Variable called startDate which is a Date that defaults to this SQL - SELECT "Reporting Dates"."Measure Date" FROM Trading WHERE "Reporting Dates"."Date Name" = 'Current'.
2. I now want to pass this variable into a prompt with SQL like this: SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date'@{startDate}{2009-04-24}'
I get this error: Datetime value @{startDate}{2009-04-24} from @{startDate}{2009-04-24} does not match the specified format.
Now I can use the exact same syntax in a filter. For example, a simple Answers request where I pick Position Date with a filter saying "Position Date"."Position Date" = date'@{startDate}{2009-04-24}' works fine.
What am I doing wrong?
Thanks!

Can you provide more information please?
1. What is the format of the first date prompt, is it YYYY-MM-DD or?
2. Which data type is Position Date."Position Date" in the physical layer, date or date time?
3. What is the column formula in the first prompt?
4. The first prompt is set to drop-down or?
5. If you are using this SQL Results in the second prompt:
SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date '@{startDate}{2009-04-24}'
then @{startDate} must be in YYYY-MM-DD format to work properly, otherwise (for example):
datetime value 01/01/2000 from 01/01/2000 does not match the specified format.
This doesn't work for example:
SELECT Times.time_id FROM "Normal model" where Times.time_id =date '01/01/2000'
Regards
Goran
http://108obiee.blogspot.com

Similar Messages

  • We are not able to pass the presentation variables(date & Date1) to the det

    Hi,
    We have followed the below link to use the date between prompt and passed the presentation variables in the filter condition of the report criteria.
    http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
    But we are not able to pass the presentation variables(date & Date1) to the detail report.
    Any suggestions are highly appreciated.
    Thanks in Advance
    Siva.

    Yes,I think it wont pass the parameters from one parent report to child report.one thing you can do is put the detailed report on a page in the same dashboard as that of prompt.Put the same between condition on that report also.Give navigation link to this page instead of report.You can hide this page as well so that it will be available only on navigation.
    i have not tried it.Give it a try.
    Regards,
    Sandeep

  • How can i display the presentation variable in my reports

    Was facing a problem to display the Presentation variable on my report, however i managed to display it on answers, but when i try to display it on my Publisher report it doesnt shows any data.
    I use to Select the Values From my prompt, and it shows the Reflection of Presentation Variable on my Answers Report. but i cannot see the Reflection of data on my Publisher Report Please any One Can help me with this.

    Removing '' does not work it given the following error
    "State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <@>: Syntax error [nQSError: 26012] . (HY000)"
    and by adding space you mean that I use it as '@{ BbranchCode}'?
    What I am doing at the moment is
    1. Write the given query in oracle BI Answers.
    2. Made a dashboard prompt in Answers.
    3. Made a report in dashboard using the Answers report and the dashboard prompt.
    Up till this step it works perfectly fine and the data displayed in manipulated on the basis of the values selected in the prompt.
    4. Now what I want is to display this report in Dashboards using oracle BI publisher. For that I use the template builder provided for microsoft word.
    5. I login to that add-on, open the answers report where I can see the field in the rowset. I select that field and save the template.
    6. I open the oracle BI publisher and make a new reprt with data model of the answer's report and Layout of the one I just created.
    7. I open the dashboard and put in the BI publisher report in the same page in which the asnwers report and the prompt was.
    8. Upon changing the values of the prompt the report in the answers is still getting manipulated but I am not able to see its reflection of the BI publisher report.
    The thing is that I am currently using this presentation variable to manipulate my reports in dashbords using dashboard prompts. The report is built in oracle BI Answers and it is working perfectly fine with it. Now when I use the template builder for Microsoft Word and open the template with the answers's report of this query I see the field in the row set but when I display the template in the dason the bases of this presentation variable the report in the oracle BI Answers is getting updated when I change values but when I use the template builder for microsoft word the the field is being shown in the row set.

  • In OBIEE 11g, how can you set a presentation variable value from javascript ?

    I want to set up presentation variable from a javascript variable. Does anyone knows the workaround for this ?

    SriniVEERAVALLI,
    Thanks for your suggestions. I want to make a custom prompt that is only my requirement. From JS I have made a custom slider prompt now I want to use this slider prompt to pass selected value in presentation variable. Since, we have slider prompt only for numbers, I have to use it for other values.
    I just want to make my post looks simple and focus on the specific problem.
    Anyways, thanks a lot for taking time to reply. Appreciate your help.

  • How can i get pr header note data into po while creating a po using pr no

    Hi all,
    Can any one tell me how can i get the PR header note's data in PO when i am creating a PO using that PR.
    and what is the name of table in which the header note's data is copied.
    Thanks
    Edited by: Saurabh.Shrivastava on Jan 17, 2012 3:54 PM

    Hi,
    Unfortunately I have to tell you that the described behaviour is not
    an Error but SAP Standard behaviour.
    Please see note 448814 question 7.
    In SAP Standard it is not foreseen to take over the header text of a
    PREQ to a PO !
    You can try to use BADI ME_REQ_HEADER_TEXT .
    I have found a document which gives coding for Purchase Requisition Header Long Text using Badi - ME_PROCESS_REQ_CUST:
    http://wiki.sdn.sap.com/wiki/display/ABAP/PurchaseReq.HeaderLongTextusingBadi-ME_PROCESS_REQ_CUST
    I hope it can help you!
    Best Regards,
    Arminda Jack

  • How can I write the name of data into Excel?

    Now, I write T1 T2 T3 and so on into an excel file and each is in one column. How can I insert the data name such as " T1 T2 T3" on the top row by programming? 
    I am using "write to spreadsheet file. vi" now and wire the data with "build array".

    How can you creat the "red box" (linked to append report text.vi)  with name as Pressure, temperature, operator ?  
    Actually, I use much simpler way. Could you please have a look at it?
    I attach an vi file to express my meaning.
    附件:
    save try.vi ‏40 KB

  • How Can I Pass a Bash Variable to AppleScript?

    Here's the deal. I'm used to just using sudo to edit files I don't have write access to, but the mate command doesn't work with sudo, so I end up entering my password twice (once with sudo and again when I want to save the file). To get around this I decided to sidestep the mate command completely and write my own script that will let me open TextMate either normally or as root using sudo. Here's what I have so far:
    #!/usr/bin/env bash
    tm=`ps ax | grep '[T]extMate'`
    if [ "$tm" = ""]; then
    /Applications/TextMate.app/Contents/MacOS/TextMate &
    fi
    osascript << EOT
    tell application "TextMate"
    activate
    open "$@"
    end tell
    EOT
    I originally tried just passing the files as arguments directly to the TextMate executable, but for some reason it opens them all as blank files instead of opening the existing files, so I figured I'd use AppleScript to open them once the application is open. The problem is that "$@" doesn't return all the arguments passed to the script, and I don't know what the AppleScript equivalent is (if there is one), so I need a way of passing that value directly to my AppleScript so I can tell it which files to open. I have no idea how to do that, though. Any ideas?

    That's exactly what the mate command does, and as I said, that's not what I want. I can't run TextMate with sudo and get root privileges that way because open will be run as root but the actual application itself will still be run normally. The only way I can open an app with root privileges (that I know of) is to use sudo to run the executable inside the app directly (sudo /Applications/SomeApp.app/Contents/MacOS/SomeApp). Opening it that way lets me open multiple instances of the same app, though, so I have to check if it's already open, and it doesn't bring the app to the front, so I use AppleScript to do that. Then once the app is running, I open the files in it. This way I can run the script with sudo and edit files that I don't have write privileges for without TextMate asking me for my password when I want to save them.

  • How can i pass a value in array into .setText()?

    i want to display a value in an array into a JTextField. May i know how to do it?
    eg:
    JTextField UserName;
    UserName.setText(s);
    but it doesn't display the value into the JTextfield.

    ok... is s an array?
    String[] s = {"s1", "s2"};Either you expect 1 value...
    username.setText(s[0]);
    // or
    username.setText(s[1]);Or you expect both:
    StringBuffer sb = new StringBuffer("");
    for(int x = 0; x < s.length; x++) {
       if(x != 0) sb.append(", ");
       sb.append(s[x])
    username.setText(sb.toString());

  • How can use a script to separate data into separate sheets?

    For example sake, I have three columns: Food Eaten (lbs), Date, and Pet (Fido, Penny, Whiskers). I'd like to tease the data apart such that the data for the first two columns for Penny, Fido, and Whiskers all appear on different sheets.
    Thanks in advance
    Solved!
    Go to Solution.

    Hi FCW,
    I created a DataPlugin to read in your Excel data file-- if you happen to have DIAdem 2010 (11.2) or later you'll be able to use it.  Otherwise just load the file however you were loading it before so that your 4 data channels are the only ones in the Data Portal, then run the "DataFileWhisperer.VBS" script in DIAdem SCRIPT.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    FuelCellWhisperer.zip ‏7 KB

  • How can I pass data generated in a SubVI inside a Case Structure out of the Case Structure?

    Hello,
    I am using a USB 2701 to control a heater.  I have three SubVIs that are all working properly on their own.  I'd like to use an Enum to select which of the SubVIs is running at a given time.  The problem is that no data is passing out of the case structure.  How can I pass the temperatures and heater outputs acquired by the SubVIs to the main VI?  I've attached my some of my code below.  I can't attach more than 3 files, but you can see how the main VI is configured.  Like I said, the SubVIs are working individually, so you shouldn't really need to look at them.
    Thank you,
    CJones581
    Attachments:
    RampHeater6-21-07.vi ‏305 KB
    69_Heater_Case.vi ‏23 KB
    HeaterTCD6-21-07.vi ‏210 KB

    CJones,
    You might check a couple of things.
    Your HeaterTCD... VI has a While loop with a stop button condition.  HeaterTCD pass out values only when it finishes running.  If it doesn't pop open the front panel (which usually doesn't happen when running a SubVI) you could run into a stuck loop because you don't have access to the Stop button.  This could appear in the form of no data being passed out (because the SubVI never stops running).  The primary VI opens the HeaterTCD VI, starts it, and waits for the VI to finish and pass final values .
    Secondary note: Unless you want your SubVI panel (which probably isn't open when running the main VI) to update continuously, consider moving your Temperature Graph and Temperature oC indicators outside the while loop.  Pass final values to them via a tunnel, since the main VI will only read their values after the loop finishes running, anyway.
    It might help to add error management to HeaterTCD like you have for RampHeater.  If you connect error lines with Error Outs to your main VI, that will help tell if there is an error somewhere that is preventing info output.
    RampHeater SubVI has the same issue with the stop button.  It is also probably getting stuck in the While loop waiting for a manual push of that SubVI's Stop button.
    An easy way to test this would be to set up a logic circuit so that when the While loop iteration counter reaches a certain number, it registers True and sends it to the conditional.  I know this isn't what you want to do long-term, but if that lets your SubVI return outputs it means that the SubVI was just never stopping.
    Hope that helps.
    David C, Applications Engineering
    David C
    Applications Engineering

  • I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    Hi Abdul,
    Sorry for my unprecise answer, but you talk about a tcode, but you're using a BAPI Call. Maybe you want to call the transaction in batch mode?
    http://help.sap.com/saphelp_erp60_sp/helpdata/de/fa/09715a543b11d1898e0000e8322d00/content.htm
    Regards,
    Franz

  • How to pass a presentation variable to new window?

    Hi Experts,
    I need to give a link on Dashboard1 which opens Dashboard2 in new window. Is there any way that I can pass a presentation variable value of Dashboard2 from Dashboard1's link??
    Thanks.

    Yeah, that's been a problem. If you use Link or Image, you can open the link in a new window, but Presentation Variables won't pass. If you use Guided Navigation, you can pass Presentation Variables, but you don't have the option of opening the link in a new window. One or the other unless someone else has a workaround... I haven't discovered one yet. Sorry.

  • How can i pass a variable instead of a table name in the Select statement.

    Dear all
    how can i pass a variable instead of a table name in a select statement ?
    Example :-
    Begin
    P_get_procedure_tname (aap_name,otable_name);--It will take an application name and will return a table name
    Select col1 into ocol1
    from  ---- here i want to pass the variable OTABLE_NAME
    End;How can i pass this ?

    Hi,
    You can use dynamic sql.
    EXECUTE IMMEDIATE 'SELECT COL1 INTO ' || OCOL1 || ' FROM " || OTABLE_NAME;
    {code}
    cheers
    VT                                                                                                                                                                                                                                                                                                   

  • How can I pass environment variables to the child process?

    How can I pass environment variables to the child process? This is what I tried and it didn't work.
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("The value of custom.property is : " + System.getProperty("custom.property"));
         }and the result is:
    The value of custom.property is : null

    Complete test:
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-Dcustom.property=my property value", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my environment value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("Property value of custom.property is : " + System.getProperty("custom.property"));
              System.out.println("Environment value of custom.property is : " + System.getenv("custom.property"));          
         }

  • How can i call another view variables in another view

    how can i call another view variables in another view and pass that variables to the function
    my situation is i have a view FAC which i need to pass par_id_fac TO THE VIEW AGR.AFTER THAT i what to take start_dt in agr view and par_id_fac from Fac and pass this variables to the function i have check the documentation but does not do what i what,the doc simply talk about creating variables and pass then to function.i what to pass variables from the views and return value to my contractno Variables value
    something like if :agr.contract_no is null
    and :agr.agr_start_dt is not null then
         :agr.contract_no := sms_fapp.get_contract_no(:fac.par_id_fac,:agr.agr_start_dt);
    end if;     
    y view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="AGR"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1405.AGRRowImpl"
      ComponentClass="sms1405.AGRImpl"
      DefClass="sms1405.AGRDefImpl">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Def|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
    <SQLQuery><![CDATA[SELECT SmsAgreements.ID,
           SmsAgreements.FAPP_ID,
           SmsAgreements.PAR_ID,
           SmsAgreements.SSCH_ID,
           SmsAgreements.COSERV_ID,
           SmsAgreements.IREA_ID_TERMINATED,
           SmsAgreements.IREA_ID_SUSPENDED,
           SmsAgreements.SPTYP_ID,
           SmsAgreements.CLAIM_BASED_YN,
           SmsAgreements.NOTES,
           SmsAgreements.SUSPENSION_DT,
           SmsAgreements.TERMINATION_DT,
           SmsAgreements.SPECIAL_PROJECT_END_DT,
           SmsAgreements.CAPITAL_FUNDING_APPROVED,
           SmsAgreements.PERIODICAL_PAYMENT_AMOUNT,
           SmsAgreements.DATE_CREATED,
           SmsAgreements.DATE_MODIFIED,
           SmsAgreements.MODIFIED_BY,
           SmsAgreements.CREATED_BY,
           SmsAgreements.CONTRACT_NO,
           SmsAgreements.OFF_ID,
           SmsAgreements.DATE_APPROVED,
           SmsAgreements.AGR_START_DT,
           SmsAgreements.AGR_END_DT,
           SmsAgreements.MONTHS_FUNDED,
           SmsAgreements.PFRE_ANNUAL_FREQUENCY,
           SmsAgreements.FUNDED_NO,
           SmsAgreements.REGISTERED_NO,
           SmsAgreements.CONTRACT_NAME,
           SmsAgreements.OPEX_ALLOCATION,
           SmsAgreements.EMERG_ORG_YN,
           SmsAgreements.SCHEDULE,
           SmsAgreements.PERIODICAL_PAYMENT_AVERAGE,
           SmsAgreements.NO_OF_PAYMENTS,
           SmsAgreements.ADVANCE_PAYMENT_PERCENT,
           SmsAgreements.QUALIFY_NO,
           SmsAgreements.ENROLLED_NO,
           SmsAgreements.MULTI_YEAR_ALLOCATION,
           SmsAgreements.AGR_ID_SOURCE,
           SmsAgreements.FYEA_YEAR_ACTIVE,
           SmsAgreements.PTYPE_CODE,
           SmsAgreements.CONTRACT_VALUE,
           SmsAgreements.MAGR_ID,
           SmsAgreements.PROG_ID,
           SmsAgreements.EMERGENCY_BED_#,
           SmsAgreements.drep_id,
           SmsAgreements.srep_id,
           (select name from sms_offices off where off.id = SmsAgreements.off_id)officeName,
           (SELECT  PROG.NAME FROM   sms_programmes prog where PROG.ID = SMSAGREEMENTS.PROG_ID)programe,
           (select prog.code || '.' || bvspro.code || '  ' || bvspro.NAME budget_vote   from sms_subsidy_schemes ssch,
              sms_budget_vote_sub_programs bvspro,
              sms_programmes prog
              WHERE bvspro_id = bvspro.ID AND prog.ID = prog_id
              and prog.id = SMSAGREEMENTS.PROG_ID)Sub_programme,
             (select  ssch.NAME from sms_subsidy_schemes ssch where SSCH.ID = SMSAGREEMENTS.SSCH_ID)subsidy,
           (SELECT master_contract FROM  sms_master_agreements magr WHERE MAGR.ID = SmsAgreements.magr_id)masterContract
    FROM SMS_AGREEMENTS SmsAgreements]]></SQLQuery>
      <ViewAttribute
        Name="ContractNo"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="CONTRACT_NO"
        SQLType="VARCHAR">
        <TransientExpression><![CDATA[CONTRACT_NO]]></TransientExpression>
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
    <ViewAttribute
        Name="AgrStartDt"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.sql.Timestamp"
        ColumnType="DATE"
        AliasName="AGR_START_DT"
        SQLType="DATE">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[adf.currentDate]]></TransientExpression>
      </ViewAttribute>
    </ViewObject>and my FAC view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="FAC"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
      </DesignTime>
      <SQLQuery><![CDATA[SELECT SmsFacilityVw.PAR_ID_ORG,
           SmsFacilityVw.ORGANISATION,
           SmsFacilityVw.ORG_KEY,
           SmsFacilityVw.C_CODE,
           SmsFacilityVw.FACILITY,
           SmsFacilityVw.PAR_ID_FAC,
           SmsFacilityVw.NPO_REGISTRATION_NO,
           SmsFacilityVw.ADDRESS,
           SmsFacilityVw.TELNR_WORK,
           SmsFacilityVw.ADDRESSLINE,
           SmsFacilityVw.Town,
           SmsFacilityVw.Suburb,
           SmsFacilityVw.PostalCode,
           SmsFacilityVw.DSD_REGION,
           SmsFacilityVw.SERVICE_DELIVERY_AREA,
           SmsFacilityVw.FAXNR,
           SmsFacilityVw.EMAIL,
           SmsFacilityVw.PAR_TYPE_DEF
    FROM SMS_FACILITY_VW SmsFacilityVw]]></SQLQuery>
      <ViewAttribute
        Name="ParIdOrg"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="PAR_ID_ORG"
        Expression="PAR_ID_ORG"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Organisation"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ORGANISATION"
        Expression="ORGANISATION"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="OrgKey"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="10"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ORG_KEY"
        Expression="ORG_KEY"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="10"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="CCode"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="30"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="C_CODE"
        Expression="C_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="30"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Facility"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="FACILITY"
        Expression="FACILITY"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="ParIdFac"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="PAR_ID_FAC"
        Expression="PAR_ID_FAC"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="NpoRegistrationNo"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="30"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="NPO_REGISTRATION_NO"
        Expression="NPO_REGISTRATION_NO"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="30"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Address"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="227"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS"
        Expression="ADDRESS"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="227"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="TelnrWork"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="150"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TELNR_WORK"
        Expression="TELNR_WORK"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="150"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Addressline"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="120"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESSLINE"
        Expression="ADDRESSLINE"
        SQLType="VARCHAR"
        IsUpdateable="false">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="120"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        IsUpdateable="false">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR"
        IsUpdateable="false">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Postalcode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTALCODE"
        Expression="POSTALCODE"
        SQLType="VARCHAR"
        IsUpdateable="false">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="DsdRegion"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="40"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="DSD_REGION"
        Expression="DSD_REGION"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="40"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="ServiceDeliveryArea"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="50"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SERVICE_DELIVERY_AREA"
        Expression="SERVICE_DELIVERY_AREA"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="50"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Faxnr"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="50"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="FAXNR"
        Expression="FAXNR"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="50"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Email"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="80"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="EMAIL"
        Expression="EMAIL"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="80"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="ParTypeDef"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="12"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="PAR_TYPE_DEF"
        Expression="PAR_TYPE_DEF"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="12"/>
        </DesignTime>
      </ViewAttribute>
      <ViewLinkAccessor
        Name="AGR"
        ViewLink="sms1405.par_facfkViewLink"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
      <ViewLinkAccessor
        Name="SmsParAddrVwView"
        ViewLink="sms1405.parLink"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
      <ViewLinkAccessor
        Name="DOC"
        ViewLink="sms1405.FAC_DOC"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
    </ViewObject>Edited by: ADF007 on 2012/08/23 6:10 PM

    i try this
    public class SMS_AGREEMENTSImpl extends EntityImpl {
    RowSet newContractNoBeforePost = null;
        public static int NUMBER = Types.NUMERIC;
        public static int DATE = Types.DATE;
        public static int VARCHAR2 = Types.VARCHAR;
      protected Object callStoredFunction(int sqlReturnType, String stmt,
            Object[] bindVars) {
            CallableStatement st = null;
            try {
            // 1. Create a JDBC CallabledStatement
            st = getDBTransaction().createCallableStatement(
            "begin ? := "+stmt+";end;",0);
            // 2. Register the first bind variable for the return value
            st.registerOutParameter(1, sqlReturnType);
            if (bindVars != null) {
            // 3. Loop over values for the bind variables passed in, if any
            for (int z = 0; z < bindVars.length; z++) {
            // 4. Set the value of user-supplied bind vars in the stmt
            st.setObject(z + 2, bindVars[z]);
            // 5. Set the value of user-supplied bind vars in the stmt
            st.executeUpdate();
            // 6. Return the value of the first bind variable
            return st.getObject(1);
            catch (SQLException e) {
            throw new JboException(e);
            finally {
            if (st != null) {
            try {
            // 7. Close the statement
            st.close();
            catch (SQLException e) {}
        protected void doDML(int operation, TransactionEvent e) {
           String amDef = "sms1405.sms1405Module";
           String config = "sms1405ModuleShared";
              String NewContract = null;                 
            ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
            ViewObjectImpl vo = (ViewObjectImpl) am.findViewObject("AGR1");
            vo.executeQuery();
            Row row = vo.first();
            // NewContract = (String)vo
            NewContract = (String)row.getAttribute("ContractNo");
            SMS_AGREEMENTSImpl newcont = new SMS_AGREEMENTSImpl();
           //AGRRowImpl res = new  AGRRowImpl();
           // NewContract = NewContractNo();
            if (operation == 1)  {
                         newcont.setContractNo(NewContractNo());
                         //res.setContractNo( NewContractNo());   
                        //NewContractNo();
            super.doDML(operation, e);
            public void postChanges(TransactionEvent TransactionEvent) {
            /* Only bother to update references if contractno is a NEW one */
            if (getPostState() == STATUS_NEW) {
            * Get a rowset of contract related
            * to this new partyaddress before calling super
             newContractNoBeforePost  = (RowSet)getSMS_AGREEMENTS();
            super.postChanges(TransactionEvent);
        public Date getAgrStartDt() {
            return (Date)getAttributeInternal(AGRSTARTDT);
         * Sets <code>value</code> as the attribute value for AgrStartDt.
         * @param value value to set the AgrStartDt
        public void setAgrStartDt(Date value) {
            setAttributeInternal(AGRSTARTDT, value);
        public String NewContractNo() {
               String amDef = "sms1405.sms1405Module";
               String config = "sms1405ModuleShared";
               String NewContract = null;                 
               ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
               ViewObjectImpl vo = (ViewObjectImpl) am.findViewObject("FAC1");
               // vo.setWhereClause("ParIdFac = 38844");
                vo.executeQuery();
                Row row = vo.first();
               Integer par_id = null;
               //oracle.jbo.domain.Date today = new oracle.jbo.domain.Date(oracle.jbo.domain.Date.getCurrentDate());
               oracle.jbo.domain.Date today = new oracle.jbo.domain.Date();
               //FACRowImpl res = new FACRowImpl();
               //res.setParIdFac(par_id);
               par_id = (Integer)row.getAttribute("ParIdFac");
               today = this.getAgrStartDt();
           return (String)callStoredFunction(VARCHAR2,
           "sms_fapp.get_contract_no(?,?)",
           new Object[]{par_id,today});
    }at the moment am geting this error
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
         at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:415)
         at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:477)
         at oracle.adf.model.binding.DCControlBinding.reportException(DCControlBinding.java:201)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.reportException(JUCtrlActionBinding.java:2007)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1659)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
         at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:112)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.NullPointerException
         at oracle.jbo.server.EntityImpl.getEntityCache(EntityImpl.java:4665)
         at oracle.jbo.server.EntityImpl.saveEventOrigTransAttrVals(EntityImpl.java:729)
         at oracle.jbo.server.EntityImpl.saveEventOrigAttrVals(EntityImpl.java:719)
         at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:1935)
         at sms1405.SMS_AGREEMENTSImpl.setContractNo(SMS_AGREEMENTSImpl.java:998)
         at sms1405.SMS_AGREEMENTSImpl.doDML(SMS_AGREEMENTSImpl.java:1628)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6751)
         at sms1405.SMS_AGREEMENTSImpl.postChanges(SMS_AGREEMENTSImpl.java:1645)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3264)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3067)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2071)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1415)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
         ... 43 more
    ## Detail 0 ##
    java.lang.NullPointerException
         at oracle.jbo.server.EntityImpl.getEntityCache(EntityImpl.java:4665)
         at oracle.jbo.server.EntityImpl.saveEventOrigTransAttrVals(EntityImpl.java:729)
         at oracle.jbo.server.EntityImpl.saveEventOrigAttrVals(EntityImpl.java:719)
         at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:1935)
         at sms1405.SMS_AGREEMENTSImpl.setContractNo(SMS_AGREEMENTSImpl.java:998)
         at sms1405.SMS_AGREEMENTSImpl.doDML(SMS_AGREEMENTSImpl.java:1628)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6751)
         at sms1405.SMS_AGREEMENTSImpl.postChanges(SMS_AGREEMENTSImpl.java:1645)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3264)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3067)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2071)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1415)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
         at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:112)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Maybe you are looking for

  • Saving files for metro apps in Windows 8/8.1 when printing

    Hi, I have a query regarding saving files for metro apps Windows 8/8.1. Metro apps saves the file automatically  to the Document folder when we print. But I would like to save the files into a recommened folder like C:\users\tmp\ Please suggest me, i

  • Install Arch on hard disk connected via USB

    Hi, anyone tried this? I had Arch Linux installed on hdd in my desktop, now I've connected this hdd to laptop via USB and I want to start system from it. I need to reinstall lilo, because I get kernel panic after booting from USB. I don't know how to

  • Sites are not where they used to be in DW, nav bar problem

    Hi everyone I hope its ok to post 2 probs in one post but they might be related?, first off I have cs4 trial and am using dreamweaver, I had not opened the program for a week or so and when I do my site files have changed/moved, I used to have the fi

  • Selecting nodes using an XPath expression

    Assuming that I have a DOM Document object containing a valid XML file, what is the quickest way to select a subset of nodes from the document using an XPath expression. I would like the results in either a NodeList object or another Document object.

  • What is the transaction code to set the download directory?

    What is the transaction code to set the download directory?