Search by Date in Query Region Not working

Hi,
I have created a custom page with query region -autocustomization construction mode.
This query region has a vo which contains one of the fields is requestedDate of date datatype.
Requirement is :
I need to fetch all records..based on requestDate (also)in search panel. But i am getting all the records in the table..
Please advise me to solve this issue..
Thanks in advance,
Pradeep

Pradeep
You should check and compare the date field mapping with other fields that you have done the correct mapping like other fields , because there should be no issue if mapping is correct, is this entire custom page created by you ? or are you doing changes in existing custom page ?
thanks
Pratap

Similar Messages

  • Temporary Table In SAP Query - Does not Work?

    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF OBJECT_ID('tempdb..##tab) IS NOT NULL DROP TABLE ##tab
    CREATE TABLE ##tab
    [Date] date,
    [Delivery Rows] varchar(40),
    [Delivery Total Units] varchar(40),
    [Receipts Rows] varchar(40),
    [Receipts Total Units] varchar(40),
    WHILE @a!=7
         BEGIN
         SET @date=DATEADD(day,-@a, getdate())
         SELECT @delrows=ISNULL(COUNT(DLN1.[LineNum]),0), @delquan=ISNULL(SUM(DLN1.[Quantity]),0)
         FROM ODLN
         INNER JOIN DLN1 ON ODLN.[DocEntry]=DLN1.[DocEntry]
         WHERE ODLN.[CreateDate] = @date
         SELECT @recrows=ISNULL(COUNT(PCH1.[LineNum]),0) , @recquan=ISNULL(SUM(PCH1.[Quantity]),0)
         FROM OPCH
         INNER JOIN PCH1 ON OPCH.[DocEntry]=PCH1.[DocEntry]
         WHERE OPCH.[DocDate]=@date
         SET @a=@a+1
              INSERT INTO ##tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM ##tab
    {/code}
    Can anyone explain why this query does not work in SAP? It works fine on SQL but gives me this message in SAP:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ')'.
    2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
    Edited by: Chris Candido on Feb 2, 2011 8:38 PM

    Chris,
    There are several areas in your code which needed changes. 
    1. On the field name for your temp table you had spaces.
    2. The SAP table name ODLN, OPCH, PCH1 had to be fully referenced like
    [dbo].[ODLN]
    3. You really need not have ## in front of your temp table, it could just be #
    The select at the end is actually what causes the most problem as for some reason from within SAP it does not produce the result.  I would suggest you put the whole code into a Stored Procedure and call the SP from SAP.  Corrected SQL below.  If you remove the Select line at the end the query would work with in SAP, but keep it give give you an error. SP is the best option for this.
    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF object_id('tempdb..#tab') IS NOT NULL
    BEGIN
       DROP TABLE #tab
    END
    CREATE TABLE #tab
    [Date] date,
    DeliveryRows varchar(40),
    DeliveryTotalUnits varchar(40),
    ReceiptsRows varchar(40),
    ReceiptsTotalUnits varchar(40),
    WHILE @a!=7
    BEGIN
    SET @date=DATEADD(day,-@a, getdate())
    SELECT @delrows=ISNULL(COUNT(DLN1.LineNum),0), @delquan=ISNULL(SUM(DLN1.Quantity),0)
    FROM [dbo].[ODLN]
    INNER JOIN DLN1 ON [dbo].[ODLN].DocEntry=DLN1.DocEntry
    WHERE [dbo].[ODLN].CreateDate = @date
    SELECT @recrows=ISNULL(COUNT([dbo].[PCH1].LineNum),0) , @recquan=ISNULL(SUM([dbo].[PCH1].Quantity),0)
    FROM [dbo].[OPCH]
    INNER JOIN [dbo].[PCH1] ON [dbo].[OPCH].DocEntry=[dbo].[PCH1].DocEntry
    WHERE [dbo].[OPCH].DocDate=@date
    SET @a=@a+1
    INSERT INTO #tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM #tab
    Suda Sampath

  • Select query is not working in BDC Program

    Hi,
    I am working in BDC for update valuation class for T-code mm01.Actually In this BDC i am using two recoding based on material type.
    i am using two internal table : I_DATA and ITAB
    Use I_DATA to hold excle data in which material No, plant , valuation type , valuation No. and ITAB for material No, material type Only.
    So, i am fetching material Type ( MARA-MTART ) through select query. But Select query is not working. and also i did check MARA table according that  Material Number then  material no. exit in Mara Table.
    Note : at run time  I_DATA have 1 row but ITAB have 0 row ....
    DATA: BEGIN OF I_DATA OCCURS 0,
    MATNR TYPE MARA-MATNR,
    WERKS TYPE MARC-WERKS,
    BWTAR TYPE RMMG1-BWTAR,
    VERPR TYPE BMMH1-VERPR,
    BKLAS TYPE MBEW-BKLAS,
    STATUS TYPE C,
    END OF I_DATA.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MTART LIKE MARA-MTART,
    END OF ITAB.
    Loop at I_DATA.
    select matnr mtart from mara into table itab where matnr = I_DATA-matnr.
    endloop.
    Guide me..........

    If you use your
    Loop at I_DATA.
      select matnr mtart from mara into table itab
        where matnr = I_DATA-matnr.
    endloop.
    At end of loop, itab will only contain the result of the last select, so use a
    Loop at I_DATA.
      select matnr mtart from mara APPENDING table itab
        where matnr = I_DATA-matnr.
    endloop.
    better
    if I_DATA[] is not initial.
      select matnr mtart from mara into table itab
        FOR ALL ENTRIES IN i_data where matnr = i_data-matnr.
    endif.
    Some Remarks
    - If actually required (where does I_DATA come from, is it an external format, you need the internal value to use in SELECT statement), check via SE11 the correct [conversion exit|http://help.sap.com/saphelp_nw04/helpdata/en/35/26b217afab52b9e10000009b38f974/content.htm] associated with domain MATNR (Is it truly ALPHA, and not something like MATN1, so [CONVERSION_EXIT_MATN1_INPUT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=conversion_exit_matn1_input])
    - You could try to use BAPI like [BAPI_MATERIAL_SAVEDATA|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata] and not BDC
    Regards,
    Raymond

  • Why select query is not working?

    CREATE OR REPLACE TYPE prod_type AS OBJECT (
    pid INT,
    pprice NUMBER,
    MEMBER PROCEDURE display(pid IN NUMBER));
    create table prod of prod_type (pid primary key);
    CREATE OR REPLACE TYPE deal_type UNDER prod_type (
    ctr NUMBER,
    OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
    insert into prod values(deal_type(101, 4, 1));
    insert into prod values(deal_type(102, 5, 0));
    ------below given select query is NOT WORKING ---------
    select ctr from prod p where p.pid=101;
    Thanks,
    -Nid

    ------below given select query is NOT WORKINGWondering how you inserted data ...
    SQL> CREATE OR REPLACE TYPE prod_type AS OBJECT (
      2  pid INT,
      3  pprice NUMBER,
      4  MEMBER PROCEDURE display(pid IN NUMBER));
      5  /
    Type created.
    SQL>
    SQL> create table prod of prod_type (pid primary key);
    Table created.
    SQL>
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
      4  );
      5  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    4/1      PLS-00103: Encountered the symbol ")" when expecting one of the
             following:
             , not pragma <an identifier>
             <a double-quoted delimited-identifier> final instantiable
             current order overriding static member constructor map
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER));
      4  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    1/1      PLS-00590: attempting to create a subtype UNDER a FINAL type
    SQL>You made an attempt to create a subtype UNDER a FINAL type - that the reason why can not work ...
    Avoid deriving a subtype from this FINAL type.
    HTH

  • Excel 2010 MS Query is not working

    Hi, I am in the process of upgrading all my Excel 2003 spreadsheets to Excel 2010.  I am running into problem with the MS Query.  Spreadsheets have MS Query linking to MS database.  However, when I open some of the spreadsheets, the MS Query
    is not working ie. the blue circle keeps turning and then not responding.  It is very weird that this MS Query is working fine with some spreadsheets but not couple and they are all linking to the same database except a small different in criteria.  I
    tried to re-create the Query in the spreadsheet in Excel 2010 by going to Data>From Other Sources>From Microsoft Query and select the database.  Once I set up the criteria and click Return data, the Query gets stuck.
    Please help! Any comments/suggestions will be appreciated.
    Thanks

    Hi,
    There are many possible causes that can crash MSQuery in Excel 2010.
    First, please make sure we have installed the latest Office 2010 and Windows patches.
    Second, Please read the Blog, it explains one typical crash scenario.
    =====
    AppName: msqry32.exe AppVer: 14.0.4750.1000 ModName: msvcr90.dll
    There are several possible resolution you can try to resolve the above crash:
    1. When you launch MS Query, just disable the option "Validate queries before saving or returning data", this is the fifth box in the options menu.
    The only problem is that if you have made any mistake in your query, you'll only be noticed when receiving the data in excel.
    2. Repair all the keys into registry at the following place:
    [HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC]
    For example:
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC]
    "TraceFile"="C:\\DOCUME~1\\...USERNAME...\\IMPOST~1\\Temp\\SQL.LOG"
    "TraceDll"="C:\\WINDOWS\\system32\\odbctrac.dll"
    http://blogs.technet.com/b/asiasupp/archive/2011/11/07/msquery-randomly-crashed.aspx
    =====
    Third, start the Excel 2010 with
    safe mode, it helps us confirm if some add-ins cause this issue.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in
    Office programs.

  • Cannot move any files into trash to delete them. I get a Trash warning box saying "The Finder cannot complete the operation because some data in 'file name' could not be read or written.(Error code - 36)".Macbook has so much data it is almost not working

    Cannot move any files into trash to delete them. I get a Trash warning box saying "The Finder cannot complete the operation because some data in 'file name' could not be read or written.(Error code - 36)".Macbook has so much data it is almost not working.
    I have tried reseting to factory settings by removing battery and holding down the power switch for more than 5 sec but this does nothing.
    Any ideas would be greatly appreciated as I think with so much unwanted data on the desktop and other places the whole os will crash very soon.
    Thanks, Rick

    The hard drive may be dying anyway, or the directory damaged because it is so full.  You should never let the hard drive get over 85% full.
    A -36 error is a read/write error.
    All you did with the power is reset the SMC.  Does nothing to reset everything to factory settings. 
    Do you have your original 10.4 installer discs for the MacBook?
    Is your data backed up?

  • The 'Content, index, search' section of my help is not working in Mozilla

    Dear All,
    The 'Content, index, search' section of my help is not working in Mozilla.
    I am using robo8 and mozilla 8. Any idea? please help...
    Regards,
    Jobin.

    Dear William,
    It is a webhelp
    It is working in all other browsers except Mozilla.
    It is a merged help...
    waiting for your reply..:)
    Regards,
    Jobin.

  • Bex Query is not working in portal

    Dear Experts,
    i have uploaded BI master role into portal, By default Bex Queries are assgined to Master Role. when I clcik on preview for particular Bex Query, it's working fine. but after assigning the master role to end user, that same Bex Query is not working. it's showing Below error..
    Portal runtime error.
    An exception occurred while processing your request. Send the exception ID to your portal administrator.
    Exception ID: 05:22_18/08/10_0002_7116150
    Refer to the log file for details about this exception.
    please give me suggetions...
    Regards,
    VENU

    Hi Venu ,
    Can you please check the logs for details -  http(s):<host>:<port>/nwa . This may be a permissions issue . Check if the iview has read permission for everyone group and then test . Also post the error details here .
    Regards
    Mayank

  • Query is not working correctly

    Hi all,
    Below query is not working correctly. Please let me know, if you find the mistake
    select
    a.name,
    b.VOD_NAME,
    count(xm.ATTRIB_03)
    from
    siebel.s_vod b
    left outer join ISS_OBJ_DEF c on b.OBJECT_NUM=c.PAR_VOD_ID
    left outer join vod d on c.VOD_ID=d.row_id
    left outer join PROD_INT a on d.OBJECT_NUM=a.CFG_MODEL_ID
    left outer join PROD_INT_XM xm on a.row_id=xm.PAR_ROW_ID
    where
    b.VOD_TYPE_CD='CLASS_DEF'
    and
    c.LAST_VERS = 0
    and
    b.vod_name='Componentes'
    group by a.name,b.vod_name having count(xm.ATTRIB_03) >=5

    user9522927 wrote:
    Hi all,
    Below query is not working correctly. Please let me know, if you find the mistake
    select
    a.name,
    b.VOD_NAME,
    count(xm.ATTRIB_03)
    from
    siebel.s_vod b
    left outer join ISS_OBJ_DEF c on b.OBJECT_NUM=c.PAR_VOD_ID
    left outer join vod d on c.VOD_ID=d.row_id
    left outer join PROD_INT a on d.OBJECT_NUM=a.CFG_MODEL_ID
    left outer join PROD_INT_XM xm on a.row_id=xm.PAR_ROW_ID
    where
    b.VOD_TYPE_CD='CLASS_DEF'
    and
    c.LAST_VERS = 0
    and
    b.vod_name='Componentes'
    group by a.name,b.vod_name having count(xm.ATTRIB_03) >=5I couldn't see through the internet what happend when you ran said query. How about helping us out by showing us the evidence that it "is not working correctly".
    "Here's a picture of my car sitting in the driveway. Why won't it start?"

  • Search help for cost center does not work after SP upgrade

    Hi,
    Create a shopping cart in SRM and go to the cost assignment tab. When click on the search help to enter a costcenter, we don't get any search help screen.
    Thanks

    Kindly check note: 1259735 Search help of generic account does not work
    Additionally Check the 5th question/answer of note 815849.

  • My Google search autocomplete me in Firefox does not work anymore. However, it still works with Internet Explorer. How can I fix this so Google gives me search suggestions again?

    My Google search autocomplete me in Firefox does not work anymore. However, it still works with Internet Explorer. How can I fix this so Google gives me search suggestions again?

    Solution update: Disabled XULRunner 1.9.1 extension from Add-ons > Extensions. Problem solved.

  • The search function in App Store, is not working in my iPhone 4, after upgrading to ios6

    The search function in App Store, is not working in my iPhone 4, after upgrading to ios6. Does anyone have a solution for this problem?

    Having the same problem.  No response from Apple as I tried all the suggestions.  Had to perform a system restore.  Currently iy's working.  Make sure you backup everything to your computer.  IOS6 is still glitchy in other areas.

  • The date and time is not working after setting it to current date and goes back to may,26 2011

    the date and time is not working after setting it to current date and goes back to may,26 2011; 2 PM . I bought my ipod tocuh 4th gen on july 18th

    On the iPod, make sure your Calendar is set to Gregorian (Settings > General > International > Calendar).  Also make sure your date and time on your computer is correct as well as the Time Zones on both.

  • [svn] 4377: Bug: BLZ-292 - Data Push sample does not work in BlazeDS Turnkey

    Revision: 4377<br />Author:   [email protected]<br />Date:     2008-12-22 16:16:25 -0800 (Mon, 22 Dec 2008)<br /><br />Log Message:<br />-----------<br />Bug: BLZ-292 - Data Push sample does not work in BlazeDS Turnkey<br />QA: Yes<br />Doc: No<br />Checkintests Pass: Yes<br /><br />Details:<br />* Regression due to some refactoring of user-agent handling that was failing to set up defaults if no explicit <properties> were defined for the <channel-definition>. This meant that for IE, no kick-start bytes were being pushed down the streaming connection at setup time...<br /><br />Ticket Links:<br />------------<br />    http://bugs.adobe.com/jira/browse/BLZ-292<br /><br />Modified Paths:<br />--------------<br />    blazeds/trunk/modules/core/src/flex/messaging/endpoints/BasePollingHTTPEndpoint.java<br />    blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java<br />    blazeds/trunk/modules/core/src/flex/messaging/util/UserAgentManager.java

    Hi,
    Thanks for your feedback!
    This feature has been going through a lot of changes with the BlazeDS and Flash Builder builds.
    We request you to pick up the BETA2 build of Flash Builder and BlazeDS 4.0.0.10654, hopefully you should see things working fine.
    Kindly let us know if you still encounter problems.
    Thanks,
    Balaji
    http://balajisridhar.wordpress.com

  • Hey, I wanna download Lion for free, so i need UP-TO-DATE , but it do not works , please help

    Hey, I wanna download Lion for free, so i need UP-TO-DATE , but it do not works , please help

    I think you misunderstood the guy. The up-to-date program isn't working for a lot of people. I'm eligible for the free upgrade but it fails to recognise my serial. From what I've read, this is affecting a lot of people who purchased their computers online. Apple seems to be fixing the issue though, so my advice would be to keep trying. Alternatively, click on the manual verificaton link so they can check your order for you and send the redemption code after they do.

Maybe you are looking for

  • DB view - join conditions order

    Hi gurus I wonder if, while creating a DB view, the order of join conditions will affect the overall performance. In my case, i need to join COEP, COBK and TKA01. Actually the join conditions are, in this order: COEP     MANDT     =     TKA01     MAN

  • Getting Redifinition error while compile ACE 5.5.

    Hi, I am trying to compile ACE 5.5 in C++.NET but it is giving following error. plz help me how to solve this error. c:\ACE_wrappers\ace\Global_Macros.h(56): error C2086: 'int ACE_BEGIN_VERSIONED_NAMESPACE_DECL' : redefinition ..\ace\Assert.h(23) : s

  • Ejb3 session bean lookup

    Hello, I have following problem with the ejb3 and session bean lookup: For example, I have a session bean with some dummy method, i.e. getInfo() : @Stateless public class MySessionBean implements MySessionLocal { public String getInfo() {return "Hell

  • Generate a long pulse with a different source clock

    I have configured the 6601 to generate a 1khz train on Ctr0 I would like to feed this into the source of Ctr1 to generate pulses of longer duration. I use the command DaqmxCreateCOPulseChanTicks to set up my pulse train on Ctr1. It works if I leave t

  • Advanced Excel exporting features display question.

    My company is using Crystal Reports XI and we're having an issue where we can't control the column width and remove page breaks as we could in Crystal Reports 9 when exporting to Excel.  Is there a way to display these same features in Crystal Report