Bug or DUE attempting navigation to Date field in query

I am encountering trouble executing a query that involves
navigating a one-way one-to-one relationship
(persistent reference to PC object) to use a Date field.
The query is the following: "period.endingDate <=
p.endingDate" with a query class of Vote. The right side of the
query has been varied and varying it yields different errors,
but the query will not execute. The parameter is defined as:
"VotingPeriod p". The import string is present and appears
okay.
For the current form, the error is:
javax.jdo.JDOUserException: The given filter/ordering String
"period.endingDate <= p.endingDate" is not valid.
Make sure all parentheses are properly matched and that the filter uses
proper Java syntax.
     at com.solarmetric.kodo.query.FilterParser.evaluate(FilterParser.java:536)
     at com.solarmetric.kodo.query.QueryImpl.getExpression(QueryImpl.java:371)
     at com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.getExpression(JDBCQuery.java:49)
     at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:312)
     at com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:393)
     at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:285)
The Vote class is defined as:
public class Vote
// The pair (topic, period) is unique for all votes
private Topic topic;
private VotingPeriod period;
private int count;
The VotingPeriod class is defined as:
public class VotingPeriod
// the pair (startingDate, endingDate) are unique for all voting periods
private Date startingDate;
private Date endingDate;
If the query is modified to be: "period.endingDate <= d" and
the parameter is declared as "java.util.Date d", then the error
is:
javax.jdo.JDOException: com.ysoft.jdo.book.voting.VotingPeriod
NestedThrowables:
java.io.NotSerializableException: com.ysoft.jdo.book.voting.VotingPeriod
     at
com.solarmetric.kodo.impl.jdbc.schema.dict.GenericDictionary.toSQL(GenericDictionary.java:122)
     at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory$Constant.<init>(JDBCExpressionFactory.java:419)
     at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory.getConstant(JDBCExpressionFactory.java:213)
     at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:562)
     at com.solarmetric.kodo.query.FilterParser.getValue(FilterParser.java:668)
     at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:601)
     at com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:677)
     at com.solarmetric.kodo.query.FilterParser.evaluate(FilterParser.java:527)
     at com.solarmetric.kodo.query.QueryImpl.getExpression(QueryImpl.java:371)
     at com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.getExpression(JDBCQuery.java:49)
     at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:312)
     at com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:393)
     at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:285)
David Ezzio
Yankee Software

Hi Patrick,
Okay, there is a bug. Your parser doesn't know how to handle the ProxyDate class. So if a "Date"
is passed into the query that came from a persistent object, then a ProxyDate object is passed. If
the date is a simple "Date" object then all is well. For the simple date, the parser constructs a
query in nice JDBC escape syntax, but for ProxyDate objects, it generates garbage.
David
David Ezzio wrote:
>
I am encountering trouble executing a query that involves
navigating a one-way one-to-one relationship
(persistent reference to PC object) to use a Date field.
The query is the following: "period.endingDate <=
p.endingDate" with a query class of Vote. The right side of the
query has been varied and varying it yields different errors,
but the query will not execute. The parameter is defined as:
"VotingPeriod p". The import string is present and appears
okay.
For the current form, the error is:
javax.jdo.JDOUserException: The given filter/ordering String
"period.endingDate <= p.endingDate" is not valid.
Make sure all parentheses are properly matched and that the filter uses
proper Java syntax.
at com.solarmetric.kodo.query.FilterParser.evaluate(FilterParser.java:536)
at com.solarmetric.kodo.query.QueryImpl.getExpression(QueryImpl.java:371)
at com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.getExpression(JDBCQuery.java:49)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:312)
at com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:393)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:285)
The Vote class is defined as:
public class Vote
// The pair (topic, period) is unique for all votes
private Topic topic;
private VotingPeriod period;
private int count;
The VotingPeriod class is defined as:
public class VotingPeriod
// the pair (startingDate, endingDate) are unique for all voting periods
private Date startingDate;
private Date endingDate;
If the query is modified to be: "period.endingDate <= d" and
the parameter is declared as "java.util.Date d", then the error
is:
javax.jdo.JDOException: com.ysoft.jdo.book.voting.VotingPeriod
NestedThrowables:
java.io.NotSerializableException: com.ysoft.jdo.book.voting.VotingPeriod
at
com.solarmetric.kodo.impl.jdbc.schema.dict.GenericDictionary.toSQL(GenericDictionary.java:122)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory$Constant.<init>(JDBCExpressionFactory.java:419)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory.getConstant(JDBCExpressionFactory.java:213)
at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:562)
at com.solarmetric.kodo.query.FilterParser.getValue(FilterParser.java:668)
at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:601)
at com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:677)
at com.solarmetric.kodo.query.FilterParser.evaluate(FilterParser.java:527)
at com.solarmetric.kodo.query.QueryImpl.getExpression(QueryImpl.java:371)
at com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.getExpression(JDBCQuery.java:49)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:312)
at com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:393)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:285)
David Ezzio
Yankee Software

Similar Messages

  • Adding data field in query print layout designer (PLD)

    Dear Experts/Gurus,
    I would like to add data field in query PLD in repetitive area1 but it can't. The query I made excluding sequence no., so I think I must use datafield for that. I  use textfield in the repetitive area header1. is it correct what I have thought, I mean is it really datafield can't be add in the print layout designer if it is from query ? I appreciate your answer. TIA
    Rgds,

    No you can't, you will have to recreate the query with the missing field and recreate a new print layout for this.  Is still a flaw in SAP B1. 
    If you go to the service market place under education you can get the flashbook for the print layout design and the query manager and wizard, study them, they are of great help to understand the technology behind the PLD and the queries in SAP B1.
    Regards,
    WB

  • Missing data fields in Query designer

    Hi Guys,
    A query exists on an ODS. There are few characteristics and navigational attributes in the ODS. In Query designer, on the left hand side under Dimensions,
    i can see 'Data part' (for Data fields of ODS) and 'Key section' (for Key fields of ODS).
    All but 2 fields (One data field and one navigational attribute of the ODS) are seen under 'Dart part' of the query designer.
    Data field - Accounting Document number
    Navigational attribute - Actual Acquisition Fiscal Year
    What may the reason for those 2 fields not appearing.
    Any help is greatly appreciated.

    Hi,
    I executed a query on the ODS using LISTCUBE. To my surprise, i can find both 0AC_DOC_NO and ZACQ_YR here. If i can find both these in LISTCUBE, why don't i find the same in the query designer. Even though i built a new query on the ODS in the query designer, i still can't find them in the query designer.
    Thanks

  • Date field in query

    Hi Experts,
    M facing a warning msg for date field while accessing from web as data is not there
    now i need to suppress this message
    please how to suppress messages in html viewing
    I got a hint that it can be done by rsrt .....it any one has any idea please let me know.

    Hi,
    in rsrt you'll find a small yelow button with an exclamation mark in the first row where you can set it off.

  • Address Book "Dates" field

    When I change timezones due to travelling, the "Dates" field changes as well. However, the info I have in my "Dates" field are mostly anniversaries and they would show the wrong date either a day before or a day after depending where I'm travelling to. How can I make sure that even if I travel and change timezones, the dates in the Address Book's "Dates" field do NOT change along?
    It gets especially confusing when I enter more dates in the "Dates" field during my trip, and then change back to my original timezone. Now, I have to figure out which dates are accurate and which are a day behind or a day in advance.
    Help, please!

    I would think this is a bit of a bug in Address Book, and I don't think there is any control over it. Tell Apple: OS X Feedback
    AK

  • How to change date format in query

    Hi all!
    there is Date field in query (ref to 0Date) and it is in "01.2010" format. Anybody knows how to switch to "Jan 2010" format?

    HI,
    You can dispay using the excel properties. Once after the workbook run, select the column you want to change the format and cange to the format required. Save the workbook.
    From next run the date field will be displayed as the format set in workbook.
    Hope this helps,
    regards,
    anil

  • Need to Programmatically Set IRR Filter on Date Field Due to APEX 4.1 Bug

    There may be another work around but, here is the problem that we are encountering...
    We have a huge table that is partitioned on a DATE field and an IRR that reports on this table. By default, we want to show the most recent 3 days of data. There is a built-in filter for "is in the last 3 Days." Sounds Great! Unfortunately APEX generates the code using TIMESTAMP rather than DATE functions. As a result of this, the query does not perform partition pruning and, as a consequence, it is doing a full table scan which takes forever. Note the use of the "LOCALTIMESTAMP" function in the query that is generated by APEX for this filter:
    SELECT   "BUSINESS_DATE",
             COUNT ( * ) OVER () AS apxws_row_cnt
      FROM   (SELECT   *
                FROM   (SELECT   *
                          FROM   position_delta_his p) r
               WHERE   ("BUSINESS_DATE" BETWEEN *LOCALTIMESTAMP*
                                                - NUMTOYMINTERVAL (:APXWS_EXPR_1,
                                                                   'year')
                                            AND  *LOCALTIMESTAMP*)) r
    WHERE   ROWNUM <= TO_NUMBER (:APXWS_MAX_ROW_CNT)If, instead, APEX used the SYSDATE function, as the underlying column is a DATE, this returns instantly, after partition pruning.
    SELECT   "BUSINESS_DATE",
             COUNT ( * ) OVER () AS apxws_row_cnt
      FROM   (SELECT   *
                FROM   (SELECT   *
                          FROM   position_delta_his p) r
               WHERE   ("BUSINESS_DATE" BETWEEN *SYSDATE*
                                                - NUMTOYMINTERVAL (:APXWS_EXPR_1,
                                                                   'year')
                                            AND  *SYSDATE*)) r
    WHERE   ROWNUM <= TO_NUMBER (:APXWS_MAX_ROW_CNT)
    The bug is that APEX should base the underlying function on the data type of the filtered column.
    As a work around, if we create a filter where BUSINESS_DATE >= '4/13/2012' (three business days ago), again, this returns instantaneously. The issue is that we can only set this filter by using the APEX GUI. We need to be able to:
    1. Determine the date for 3 business days ago
    2. Set this as the default filter.
    I tried creating a BEFORE HEADER PL/SQL page process but, it does not appear to be having any effect. Here is that code:
    DECLARE
        ldt_Filter DATE;
        CURSOR lcsr_GetMaxBusinessDate IS
            SELECT Max(BUSINESS_DATE)
            FROM POSITION_DELTA_HIS;
        DAYS_AGO CONSTANT NUMBER := 3;       
    BEGIN
        APEX_UTIL.IR_CLEAR( :APP_PAGE_ID );
        OPEN lcsr_GetMaxBusinessDate;
        FETCH lcsr_GetMaxBusinessDate INTO ldt_Filter;
        CLOSE lcsr_GetMaxBusinessDate;
        ldt_Filter := ( Trunc( ldt_Filter ) - 3 );
        APEX_UTIL.IR_FILTER( p_page_id       => :APP_PAGE_ID,
                             p_report_column => 'BUSINESS_DATE',
                             p_operator_abbr =>'GTE',
                             p_filter_value  => TO_CHAR( ldt_Filter, 'YYYYMMDDHH24MISS' ) );
    END;Can anyone tell me:
    1. How to set this filter programmatically (also needs to be displayed on the page so the user can see the current filter...as if it were created via the GUI) ***OR***
    2. Some other work around for this issue..
    Thanks,
    -Joe

    Actually, now that I look further, I don't think it is going to work to simply set the filter programmatically. The end user can still click the column heading where they are only given the choice of the LOCALTIMESTAMP based filters. If they pick one, the page is going to be out to lunch for them.
    We really need some other fix. We really need a way to actually address the underlying issue.
    -Joe

  • Query not returning rows in 'result' tab due to invalid date field (bug?)

    It seems that in the results display, if there is a date field with out of bounds data then the query is stopped and only the results up to that record are displayed. When running the same query as a script, all of records are returned. The offending date in the table was '-10100-00-00 0-1:0-1:0-1.0'. Don't ask how it got there... I really have no idea.
    Has anyone else noticed this? Could it relate to the NLS format? Would it be possible to just display this value as null in the 'results' tab instead? Or wrap any invalid data as such and return nothing in the field but still show the record?

    Hello,
    It seems that you had resolved the issue which caused by premission.
    You can post the solution in a new reply and mark it as answer.
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • Billing report with due date field

    Dear Friends,
    Can you please tell the logic of Billing report with due date field.
    Input.  billing document no, date range, sales organisation
    Output : billing document no, sales organisation, Amount. Due date.
    If any clarification required, Please let me know.
    Thanks in advance
    Ranjan

    Is it VF05 is suffiant for your purpose?
    use further selection criteria tab.
    Amit.

  • Due date field in F-48

    HI
    I need to get the due date field to appear on both the debit as well as credit sides of a posting in F-48 vendor down payment.
    Right now for example if i do the following transaction:
    Credit bank account    Rs 10,000     Due date:01/01/2009
    Debit  Vendor account Rs 10,000     Due date: no field seen
    I tried making the field required in field status for posting key 29 but it did not cause the field to appear in debit side.
    Could anyone advise me on how to cause this field to appear in the second line item?
    thanks
    Roshan

    Hi
    The field is not appearing on the vendor side. It is marked as optional by default in both 026 as well as 067 in our settings. but still only appears for the bank side.
    I should clarify that what i am looking for is to have the due date field appear on both the debit as well as the credit side of the transaction,
    In other words the user should have to enter it when he fills out initial screen of F-48 and then again enter it in the 2nd line item screen.

  • Payment terms and Due date field gets emptied after residual clearing

    Hi
    There is advance of Rs.50000 in Vendor ledger and Invoice of Rs.200000 (with payment term - G019)
    I cleared these two line items (residual clearing). One new line item got created of Rs.150000. When i saw that line item, i saw that there payment term field and due date field got emptied. My requirement is that the original payment term entered in initial invoice document (of Rs.200000) should automatically get populated in new line item of Rs.150000.
    How to fulfill this requirement?

    Thanks for the prompt reply.
    I wanted to ask one more thing. Same way when i do partial clearing (not residual), is it possible to populate the invoice's due date in advance line item. One link is that my invoice reference gets populated advance line item. So i want due date (not payment term) also to get populated in advance line item.
    Please help.
    Edited by: Deepak Agrawal on Jul 29, 2011 11:43 AM

  • :Due On" date field missing while posting with Spl GL indicator for vendor

    Hello,
    I am facing a problen while posting a n entry with spl GL indicator in fb01, the issue is Due On date field is missing in the screen.
    I am posting an spl GL transaction for a vendor thro FB01 and after entering the posting key 39, vendor code and spl Gl indicator in line item and in next screen, the "Due ON" date field is not appearing.
    Both vendor recon account and spl GL alternative account use same field status group and  checked the field status group , the due date, payments terms are made optional.
    The strange thing is, when I use the same vendor with Spl GL indicator "A" , the Due ON field is missing in next screen, and when I use spl indicator " B" , for same vendor, Due On date field is appearing.
    Is there any specfic field status setting for DUE ON date field for Spl GL indicator wise? or please help me how to bring due on date field in the screen when posting spl GL transaction?
    Please help me on this.
    Regards
    Surya

    Hello Surya,
    To make field baseline date for payment (BSEG-ZFBDT) ready for input for
    posting the down payment, the following Customizing setting is
    necessary:
    Financial Accounting -> Accounts Receivable and Accounts Payable ->
    Business Transactions -> Outgoing Payments -> Automatic Outgoing Payment
    -> Payment Method/Bank Selection -> Configure payment program -> All
    company codes -> double-click on corresponding company code -> under
    Customer -> 'Sp. G/L transactions to be paid' the letter A should be
    entered.
    The field "Due On (BSEG-ZFBDT)" cannot be controlled with field status.
    It is contolled by field attribute of screen painter (Tcd: SE51).  If
    you look at element attribute for "Due On" field, a flag for required
    entry is activated.  In this case, field status has no control over
    the field.
    As of release 3.1G, field BSEG-ZFBDT is hardcoded in most FI screens
    to be mandatory and cannot be influenced by any field status
    changes. This situation is only valid when posting with special G/L
    indicator (ie PK 29/39).
    SAP development team has determined that this is a critical field.  The
    reason behind this is that this special GL screen and the data entered
    here are very important to many other programs. This data affects
    liabilities and receivables where due date is necessary almost
    everytime. Thus, we changed this field in this screen in order to
    prevent problems in many other areas. The reason is explained further in
    note 95079.
    545944    FAQ, down payment, tax code, baseline date
    above Field is controlled through SE51 only.
    Tcode : SE51
    Program (screen)     SAPMF05A
    Screen number        304
    Eliment list  press display.
    special attributes.
    BSEG-ZFBDT - Required.
    Other options are below.
         The attribute "Input" can have the following values:
         o    Not possible
             The input/output field cannot be supplied with an input - that
             the screen element can only be used for outputs.
         o   Possible
             The input/output field can be supplied with an input at runtime
             the remainder of the transaction, an input is not required.
         o   Recommended (Optional Field)
             The input/output field should be supplied with an input at runt
             The system, of course, does not check immediately whether there
             been an input. During the remainder of the transaction, however
             input is necessary.
             To mark this kind of target field, the input template starts wi
             special character that is represented in the Screen Painter by
             question mark ('?'). The question mark will be suppressed only
             the field is in a table control or a step loop.
             You use the "target field", for example, if inputs cover severa
             screens and only at a later stage are subject to a common check
    o   Required Field
        The input/output field must be supplied with an input at runtime.
        The system checks this property immediately, and very definitely
        when the event is processed  (PROCESS AFTER INPUT).
        So that such a required field is marked accordingly, its input
        template must begin with a special character that is represented in
        the Screen Painter by a question mark ('?'). The question mark is
        suppressed only if the field is in a table control or a step loop.
    I hope above information will resolve your issue.
    Kind Regards,
    Fernando Evangelista

  • In F-51 transaction was not posted,& due date field for advance payment VEN

    1.  In F-51 transaction was not posted. 
    In the above T-code I want to tranfer Invoice amount (RE) to special GL debit retention money payable the following error was throwing,
    Balancing Field "Profit Center" in the line item 001 not filled.
    2. For advance payments for vendors due date field is not appearing in document entry screen.  How   can I see due date field in document entry screen.
      In OB41 I changed the field status for posting key 29 in payment transations I made due date field required, but it is not appearing due date field in document entry screen, while posting transaction.
    Please advise on this.
    Regards

    Hi thru f-51 u cannot post the transaction here u can enter first line item and select process open item and post it and the base line date is already entered in invoice document based on that one the advance amount is adjusted u con't enter that base line date at the time of advance payment and also the payment terms are maintained in vendor master based on that on also due date is calculated i hope it will be helpful.

  • Due date field.

    hi gurus!
    i want to knw due date field for invoice.
    regards,
    Rahul

    may be it may help u
    bsik-zfbdt, " Base Line Date
    bsik-zbd1t, " Due date1
    bsik-zbd2t, " Due Date2
    bsik-zbd3t,

  • HT201406 1st. Gen iPad question:  the touch keyboard does not appear when attempting to input data into data fields - this happens while using all apps, ex. Notes, Google, Pages, etc..

    1st. Gen iPad question:  the touch keyboard does not appear when attempting to input data into data fields - this happens while using all apps, ex. Notes, Google, Pages, etc.. The cursor prompt is present.  Tapping screen just brings up the option to: "Select   Select All   Paste."   I have rebbooted with no change. 
    Message was edited by: Jimfromutah
    The problem was my connected bluetooth keyboard.

    1st. Gen iPad question:  the touch keyboard does not appear when attempting to input data into data fields - this happens while using all apps, ex. Notes, Google, Pages, etc.. The cursor prompt is present.  Tapping screen just brings up the option to: "Select   Select All   Paste."   I have rebbooted with no change. 
    Message was edited by: Jimfromutah
    The problem was my connected bluetooth keyboard.

Maybe you are looking for

  • How do I add a book on my MacBook Pro to my iPad 3

    I have an iPad 3 on iOS 8 I have a MacBook Pro on 10.9.5 I have 4 PDF/Epub/Mobi files on my Mac. How do I add books to iTunes? How do I view the books I have in iTunes? How do I add them to my iPad so they'll be in iBooks?

  • Automatic creation of AuC

    Hi We are going live in next month. We are on SAP ECC6.0 and FICO MM SD are only implemented. PS is not implemented, In one of my BBP document, it is suggested that "The internal order will be changed to investment order and AuC will get created auto

  • Originals can't be found?!

    I rarely use iPhoto as it always seems to cause problems for me, but I wanted to make a photo slide show, so I thought I'd give it a try. And guess what...problems right off the bat. I have do not import originals into iPhoto turned off. But... when

  • Errors occuring during Itunes instalation

    When I try to install itunes, it says: The installer encountered errors before itunes could be configured. Errors occured during instalation. Your system ha snot been modified... What should I do to install Itunes?

  • Firewire output volume to Onyx board

    I can't find a way to reduce the Macbook firewire output to the input on my Mackie. Neither device seems to have an adjustment and the firewire output is ten times hotter than the analogue inputs on the board. Other than turning down the volume in ea