Restrict date range to be entered

G'day
I have a table called guest that allows them to be "checked in" in a hotel for example.
The table was built as:
CREATE TABLE GUEST
   (     ROOM_NUMBER VARCHAR2(2),
     DATE_ARRIVAL DATE NOT NULL,
     DATE_DEPARTURE DATE NOT NULL,
     NUM_ADULTS INTEGER,
     NUM_CHILDREN INTEGER,
     GUEST_NAME VARCHAR2(60),
     ADDRESS VARCHAR2(40),
     LICENSE_PLATE VARCHAR2(10),
           CONSTRAINT LICENSEPLATE_UN UNIQUE (LICENSE_PLATE),
           CONSTRAINT GUEST_ARRIVALDATE_CHK CHECK (DATE_ARRIVAL <= DATE_DEPARTURE), 
     CONSTRAINT GUEST_ROOM_FK FOREIGN KEY (ROOM_NUMBER)
     REFERENCES ROOM (ROOM_NUMBER));I'd like to add another check constraint to ensure that if a room has alredy been allocated to another guest :date arrival (10-May-06) to date departure (15-May-06) cannot be given to another guest within that date range.
Some dumb data to be tested
INSERT INTO Guest VALUES('R1','10-MAY-06','15-MAY-06',1,1,'Tom','London','AH343');
INSERT INTO Guest VALUES('R1','14-MAY-06','17-MAY-06',2,0,'John','Canada','AF343');Thanx

There was rather elegant solution discussed on AskTom. I do not remenber details, but it goes something like this:
CRETATE MATERIALIZED VIEW MV AS
SELECT G1.ROOM_NUMBER
,G1.DATE_ARRIVAL
,G1.DATE_DEPARTURE
,G2.DATE_ARRIVAL DATE
,G2.DATE_DEPARTURE
FROM GUEST G1, GUEST G2
WHERE G1.ROOM_NUMBER = G2.ROOM_NUMBER
AND G1.DATE_ARRIVAL < G2.DATE_DEPARTURE
AND G2.DATE_ARRIVAL < G1.DATE_DEPARTURE
REFRESH ON COMMIT
And then set some kind of restriction on the view that prohibits it from having any rows.
BTW trigger proposal would not work because of "table is mutating" error.
Checks on app level would require row locks (SELECT FOR UPDATE), otherwise sooner or later you will end up with several guys in the same room:)

Similar Messages

  • Restrict Date Range

    Hi All,
        I have a select-option for Date.I need to restrict dates within a month??
    How can i do that??

    Hi ,
    Same problem i also faced , so you will follow below code you will get the solution definately .
    SELECT-OPTIONS : S_CALP   FOR RFPDO1-SZISABRZ NO-EXTENSION obligatory , "date
    DATA:
          v_text        TYPE STRING,
          v_from_month  TYPE STRING,
          v_to_month    TYPE STRING,
          V_LEAP TYPE I .     "leap year variable
    From/To date validation
      CLEAR : v_days .
      CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
        EXPORTING
          I_DATE_FROM = CALC_PERIOD_FROM  "date low
          I_DATE_TO   = CALC_PERIOD_TO  "date high
        IMPORTING
          E_DAYS      = v_days.
    From/To date validation
      clear : v_text , v_to_month , V_YEAR ,V_LEAP.
      v_text = CALC_PERIOD_FROM .
      v_from_month = v_text+4(2).
      clear : v_text .
      v_text = CALC_PERIOD_TO .
      v_to_month   = v_text+4(2).
      V_YEAR = v_text+0(4).
    IF NOT V_YEAR IS INITIAL .   "logic for leap year .
      V_LEAP = V_YEAR MOD 4 .
    ENDIF .
    ****logic for  months validation
      IF NOT v_from_month = v_to_month .
          RETURN-MESSAGE = 'From/To Month should be same !'.
          APPEND RETURN.
          EXIT.
    ENDIF .
      IF ( v_to_month = '01' OR
           v_to_month = '03' OR
           v_to_month = '05' OR
           v_to_month = '07' OR
           v_to_month = '08' OR
           v_to_month = '10' OR
           v_to_month = '12' ) .
        IF NOT v_days EQ 30 .
          RETURN-MESSAGE = ' Please Enter Valid Date !'.
          APPEND RETURN.
          EXIT.
        ENDIF .
      ELSEIF  ( v_to_month = '04' OR
                v_to_month = '06' OR
                v_to_month = '09' OR
                v_to_month = '11' ) .
        IF NOT v_days EQ 29 .
          RETURN-MESSAGE = 'Please Enter Valid Date !'.
          APPEND RETURN.
          EXIT.
        ENDIF .
      ELSEIF v_to_month = '02' .
        IF V_LEAP = 0 .
          IF NOT v_days EQ 28 .
            RETURN-MESSAGE = 'Please Enter Valid Date !'.
            APPEND RETURN.
            EXIT.
          ENDIF .
        ELSE .
          IF NOT v_days EQ 27 .
            RETURN-MESSAGE = 'Please Enter Valid Date!'.
            APPEND RETURN.
            EXIT.
          ENDIF .
        ENDIF .
      ENDIF .
    Regards ,
    Nilesh Jain .

  • Project Online - offline project plan prompts for date range to be entered when accessing Resource Usage view

    When I save a project plan to my local computer from Project Online and open it up in an offline mode and access Resource Usage view I get prompted with Date Range dialog boxes with the first one saying "Show resources/assignments that start or finish
    after:" and the second one with "And before:".
    I don't have any filters that are setup in Project Online that are not available in offline mode to trigger these prompts.
    Please let me know what could be causing the date range prompts. Thanks.

    Hi,
    You probably retrieve an enterprise filter into your local file. Just open the organizer from MS Project, go to the filter tab (be sure to have your project selected in the drop down menu at the top left of right of the organizer) and delete the date range
    filter.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Date Range Parameter's Restriction

    Could you someone please tell me how BO restricts date range parameter when the users tries to run a query?  Often times, users simultaneously try to get several years of data dumped into a single query.  Some users even forget to enforce the date range, which causes the query to try to get the data from the beginning of time. 
    How do we as a BO developer create some sort of date range restriction so that it can prevent users from overloading a query?  If the users want to get several years of data, he/she has to run a query in batches instead of doing it all at once.
    I hope there is a way that we can create a custom informational error message for each report to prevent users from trying to query too many months or years of data.  Some reports may hit small and well-indexed tables that allow large date range queries.  But, some reports query against large and poorly indexed tables, which can potentially cause adverse effect on performance without date range restriction. 
    Any thoughts or advices on how to implement such things (if possible).  I am also afraid that the answer will be "currently not doable".  If so, any ideas if the next version of BO will allow such functionality, or if it is at least in the plan at all?  Thank you so much for your insight and sharing.  Have a great day!

    Dear Amr,
    Thanks so much for your quick reply!  The field I want to create a restriction on is called RESULT_DT_TM.  When I saw the "where" section of the field, I just don't see how I can apply my START_DT_TM and END_DT_TM parameters on this field so that START_DT_TM and END_DT_TM cannot be more than 365 days apart.  If my query does not use parameters called START_DT_TM and END_DT_TM, this "where" section will not be valid? 
    I don't think the solution has to be on the field itself but rather on the parameter START_DT_TM and END_DT_TM.  What I want is that as long as START_DT_TM and END_DT_TM are more than 365 days apart, it does not matter what field these parameters are running against. The screen would then display something saying "your date range parameters for this report must be within 365 days.  Please revise your date range on query".
    Sorry, I am PL/SQL report programmer, and not familiar with what BO can do.  So, is there anyway that can make my dream come true?  Thanks a bunch again, Amr.

  • Prompt user for date range

    Im working on a report that when it is opened by end user, i want it to prompt them for a date range. The report should only show records that fall between the date ranges entered.
    If i use the select expert and hardcode specific dates in, it works and only shows the records i want to see. However i cannot figure out how to set Crystal to prompt the user to enter the in DateTime and the to Date Time fields with Select Expert.
    Ive tried using a Parameter field, which it prompts for the date range, but still pulls up all records as normal. Its like it ignores the date range the user enters.
    The select expert shows this formula, the date/time is all zero's in this example.
    {SHOP_ORD\.REVISED_START_DATE} in DateTime (0, 0, 0, 00, 00, 00) to DateTime (0, 0, 0, 00, 00, 00)
    Please help

    Figured it out.
    Had to create two Parameter Fields {?StartDate} and {?EndDate}.
    Then used Select Expert, Formula Editor to modify the formula and set the in DateTime = {?StartDate} and the to DateTime = {?EndDate}
    This works. Just hide the Parameter fields and you have your range selector

  • How to write a routine in infopack to restrict a date range !!!!

    Hi
    I want to load the data for a speicific date range ,i.e , i want to load the data between created on some date range which is not in between the same range for changed on...so i want to restrict that date range for changed on....Please le tme know the routine logic to restrict a date range....
    regards...

    How to ... Write Infopackage selection Routine
    1.Create an Infopackage 2. Go to selections tab and choose Type: 6 u2013 ABAP Routine.You can see following available options(F4 Help).
    3. Give disruption, and hit enter, now you will move to following screen. 4. Write Code between begin of Routine and End of Routine.
    5. See below sample code to select date range from Previous 6 days to Current date.
    6. L_T_Range table is of Type structure RSSDLRANGE.
    a. RSSDLRANGE contains SIGN, OPTION, LOW, HIGH
    We need to populate these fields to pass range dynamically.
    Sample Code:
    ***$$ begin of routine - insert your code only below this line -
    Data: l_idx like sy-tabix.
    Data: date_low like sy-datum.
    Date_low = sy-datum u2013 6.u201D(To get 6 days back).
    read table l_t_range with key
    fieldname = 'CRDAT'.
    l_idx = sy-tabix.
    Pass Range values to L_T_Range Table.
    Move date_low to L_T_Range -Low.
    Move sy-datum to L_T_Range -High.
    L_T_Range -Sign = u2018Iu2019. *****(Here: I u2013 Include, E u2013 Exclude)
    L_T_Range -Option = u2018BTu2019.****( Here: BT u2013 Between )
    modify l_t_range index l_idx.
    p_subrc = 0.
    **$$ end of routine - insert your code only before this line -
    7. Syntax check and Save.
    Hope it Helps
    Srini

  • Spliting user entered date range into u201CFrom Date u201C and u201C To dateu201D-user exit

    Hi,
    In the query i have a created a popup variable for date range for which the processing type is customer exit. When the user exceutes the query he gets the popup for the date range with the default values. The default values are set one month backward.
    For example: if today is 5/19/2008, then the popup date range shows 4/19/2008 to 5/19/2008.
    Already there is an user exit written for the same.
    Now the requirement is i need to split From date and to date entered by user and use them in seperate selections to restrict the keyfigure in the keyfigure column of the query.
    Can anyone throw a light on this, how to go about?
    Shall i need to create two different variables from date and two date and populate the values, if yes how can i do that ?
    Thanks,
    Rani.
    Edited by: rani on May 19, 2008 10:22 AM

    Hello Rani,
                     Check this code,
    var1 is already existing variable with values from date and to date values.
    ztest1 is the first customer exit single variable,
    ztest2 is the second customer exit variable.
    ztest1 and ztest2 you can use these variables in the restricted keyfigures which you have mentioned.
    when 'ztest1'.
        if i_step = 2. "after the popup
          loop at i_t_var_range into loc_var_range
          where vnam = 'var1'.
            clear l_s_range.
            l_s_range-low = loc_var_range-low.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            append l_s_range to e_t_range.
            exit.
          endloop.
        endif.
    when 'ztest2'.
        if i_step = 2. "after the popup
          loop at i_t_var_range into loc_var_range
          where vnam = 'var1'.
            clear l_s_range.
            l_s_range-low = loc_var_range-high.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            append l_s_range to e_t_range.
            exit.
          endloop.
        endif.
    hope it helps,
    regards,
    karthik

  • Creation of internal table dynamically based on the Date Range entered

    Hi SAPgurus,
    I have been facing one issue i.e creation of internal table dynamically based on the date range entered in the selection screen. For example the date range I am giving as 06/2006 to 08/2006, it should display the Fieldcatelog dynamically, this part i have completed but the only issue I am facing is to populate the sales data into that fields.
    Right now my program is displaying the ALV like this.
    Ex:
    <b>CSR    District   06/2006  07/2006  08/2006  totals</b>      
    Shiva      New York                             10.00
    Shiva      new york                             30.00
    Shiva      new york                             40.00
    but it should display like this
    <b>CSR    District 06/2006 07/2006 08/2006 totals</b>
    Shiva  New York  10.00   30.00 40.00
    80.00                 
    Please help me in this scenario, how to acheive like this..
    Thanks & Regards,
    Sivaram Kandula

    Hi Sivaram,
                 I also got the same requirement . i saw rich and your code whatever you have uploaded.i have created dynamic internal table but i am facing the issue to populating the data to my dynamic internal table.
    Sivaram, can you please explain your code after this.
    *<dyn_table>
    *tab_item.
      LOOP AT tab_item.
        ASSIGN COMPONENT 1 OF STRUCTURE <dyn_wa> TO <dyn_table>.
        ASSIGN COMPONENT 2 OF STRUCTURE <dyn_wa> TO <dyn_table>.
    *    <dyn_wa> = tab_item-bztxt.
    *    <dyn_wa> = tab_item-total.
    *    APPEND <dyn_wa> TO <dyn_table>.
    **    <dyn_wa> = tab_item-total.
    **    ASSIGN tab_item-bezei  TO <dyn_wa>.
    *  APPEND <dyn_table>.
      ENDLOOP.
    how you are puting the loop at tab_item. but tab_item is already commented.
    can you send me the code after that.
    i am sending some part of my code.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
       EXPORTING
         it_fieldcatalog = gt_fCAT1
       IMPORTING
         ep_table        = new_table.
    ASSIGN new_table->* TO <dyn_table>.
       create data new_line like line of <dyn_table>.
       assign new_line->* to <dyn_wa>.
    select vbeln
            fkart
            vkorg
            vtweg
            fkdat
            spart
            fksto
            from vbrk
            client specified
            into table gt_vbrk
            where mandt = sy-mandt
            and fkart in ('ZF5','ZFR')
            and vkorg = '1100'
            and vtweg = '20'
            and fkdat in s_fkdat
            and spart = '06'
            and fksto = ' '.
       if gt_vbrk[] is not initial.
      select  vbeln
              fkimg
              prsdt
              netwr
              matnr
              arktx
              werks
              mwsbp
              from vbrp
              client specified
              into table gt_vbrp
              for all entries in gt_vbrk
              where vbeln = gt_vbrk-vbeln
              and werks in s_werks
              and matnr in s_matnr.
      endif.
    select mnr ltx spras from t247
    into table it_t247
    where spras = 'E'.
    data: lv_month1 type vbrp-prsdt,
           name1(3) type c,
           s_month type string,
            s_month1 type string,
             s_month2 type string.
    *      lv_netwr1 type vbrp-netwr,
    *          lv_mwsbp1 type vbrp-mwsbp.
          loop at gt_vbrp into gs_vbrp.
            gs_final2-matnr = gs_vbrp-matnr.
            gs_final2-arktx = gs_vbrp-arktx.
            gs_final2-fkimg = gs_vbrp-fkimg.
           lv_month1 = gs_vbrp-prsdt.
            read table it_t247 into wa_t247 with key mnr = lv_month1+4(2).
            if sy-subrc eq 0.
            name1 =  wa_t247-ltx.
            endif.
             concatenate  name1
                       lv_month1(4) into s_month SEPARATED BY '_' .
             CONCATENATE S_MONTH 'QTY' INTO S_MONTH1 SEPARATED BY ''.
              CONCATENATE S_MONTH 'VALUE' INTO S_MONTH2 SEPARATED BY ''.
             gs_final2-month = s_month.
              lv_netwr1 = gs_vbrp-netwr.
            lv_mwsbp1 = gs_vbrp-mwsbp.
            gs_final2-MONTH_QTY = S_MONTH1.
            GS_FINAL2-MONTH_VAL = S_MONTH2.
            gs_final2-value = lv_netwr1 + lv_mwsbp1.
           append gs_final2 to gt_final2.
           clear: gs_final2. "lv_name2.
           endloop.
           if gt_final2[] is not initial.
             sort gt_final2 by matnr month ascending .
             loop at gt_final2 into gs_final2.
            gs_final2_01 = gs_final2.
         collect gs_final2_01 into gt_final2_01.
        endloop.
           endif.
       ENDIF..
    Regards
    Ankur

  • When i enter date range n vkorg iam getting all sales orginzation

    HI All,
    I have enter which you have given for me but its not working
    eg..
    it isfunction module
    import parameters
    all are options
    p_stdate=01.04.2005
    p_endate=30.04.2005
    p_kunnr= i will not enter any thing
    p_vkorg= m600
    so i have entered only date ranges and vkorg
    it shouled display only m600 sales orginzations but iam getting all sales orginzations
    the code i have retun----
    FUNCTION ZBAPI_CUSTOMER_DETAILS.
    ""Local interface:
    *" IMPORTING
    *" VALUE(P_STDATE) TYPE KNA1-ERDAT OPTIONAL
    *" VALUE(P_EDDATE) TYPE KNA1-ERDAT OPTIONAL
    *" VALUE(P_KUNNR) TYPE KNA1-KUNNR OPTIONAL
    *" VALUE(P_VKORG) TYPE KNVV-VKORG OPTIONAL
    *" VALUE(P_NAME1) TYPE KNA1-NAME1 OPTIONAL
    *" EXPORTING
    *" VALUE(RETURN) TYPE BAPIRETURN
    *" TABLES
    *" IT_CUSTOMER STRUCTURE ZBAPI_CUSTST
    ranges: lr_erdat for kna1-erdat,
    lr_kunnr for kna1-kunnr,
    lr_vkorg for knvV-vkorg,
    lr_NAME1 for kna1-NAME1.
    if P_kunnr IS not initial.
    lr_kunnr-sign = 'I'.
    lr_kunnr-option = 'EQ'.
    lr_kunnr-low = p_kunnr.
    append lr_kunnr.
    endif.
    if P_vkorg IS not initial.
    lr_vkorg-sign = 'I'.
    lr_vkorg-option = 'EQ'.
    lr_vkorg-low = p_vkorg.
    append lr_vkorg.
    endif.
    if P_name1 IS not initial.
    lr_name1-sign = 'I'.
    lr_name1-option = 'EQ'.
    lr_name1-low = p_name1.
    append lr_name1.
    endif.
    if not p_stdate is initial and not p_eddate is initial.
    lr_erdat-sign = 'I'.
    lr_erdat-option = 'BT'.
    lr_erdat-low = p_stdate.
    lr_erdat-high = p_eddate.
    append lr_erdat.
    endif.
    *select the General Data in Customer Master from kna1
    select kunnr land1 name1 name2 ort01 pstlz regio sortl stras telf1 telfx adrnr mcod1 mcod2 mcod3
    anred erdat ernam konzs ktokd name3 name4 spras telbx telf2 teltx fityp stcdt lzone
    into corresponding fields of table it_KNA1 from kna1
    where kunnr IN lr_kunnr AND
    name1 IN lr_name1 AND
    erdat IN lr_erdat .
    Move all the data to it_customer
    if sy-subrc = 0.
    loop at it_kna1.
    move-corresponding it_kna1 TO it_customer.
    append it_customer.
    clear it_customer.
    endloop.
    endif.
    *select Customer Master Partner Functions from knvp.
    if not it_customer[] is initial.
    select kunnr vkorg parvw
    into corresponding fields of table it_knvp
    from knvp FOR ALL ENTRIES IN it_customer
    where kunnr = it_customer-kunnr and
    vkorg in lr_vkorg .
    endif.
    Read Customer Master Partner Functions from it_knvp move it to it_customer
    loop at it_customer.
    read table it_knvp with key kunnr = it_customer-kunnr binary search.
    if sy-subrc = 0.
    it_customer-vkorg = it_knvp-vkorg.
    it_customer-parvw = it_knvp-parvw.
    modify it_customer.
    clear it_customer.
    endif.
    clear it_knvp.
    endloop.
    pls can you help in this code
    thanks
    mars

    HI All,
    I have enter which you have given for me but its not working
    eg..
    it isfunction module
    import parameters
    all are options
    p_stdate=01.04.2005
    p_endate=30.04.2005
    p_kunnr= i will not enter any thing
    p_vkorg= m600
    so i have entered only date ranges and vkorg
    it shouled display only m600 sales orginzations but iam getting all sales orginzations
    the code i have retun----
    FUNCTION ZBAPI_CUSTOMER_DETAILS.
    ""Local interface:
    *" IMPORTING
    *" VALUE(P_STDATE) TYPE KNA1-ERDAT OPTIONAL
    *" VALUE(P_EDDATE) TYPE KNA1-ERDAT OPTIONAL
    *" VALUE(P_KUNNR) TYPE KNA1-KUNNR OPTIONAL
    *" VALUE(P_VKORG) TYPE KNVV-VKORG OPTIONAL
    *" VALUE(P_NAME1) TYPE KNA1-NAME1 OPTIONAL
    *" EXPORTING
    *" VALUE(RETURN) TYPE BAPIRETURN
    *" TABLES
    *" IT_CUSTOMER STRUCTURE ZBAPI_CUSTST
    ranges: lr_erdat for kna1-erdat,
    lr_kunnr for kna1-kunnr,
    lr_vkorg for knvV-vkorg,
    lr_NAME1 for kna1-NAME1.
    if P_kunnr IS not initial.
    lr_kunnr-sign = 'I'.
    lr_kunnr-option = 'EQ'.
    lr_kunnr-low = p_kunnr.
    append lr_kunnr.
    endif.
    if P_vkorg IS not initial.
    lr_vkorg-sign = 'I'.
    lr_vkorg-option = 'EQ'.
    lr_vkorg-low = p_vkorg.
    append lr_vkorg.
    endif.
    if P_name1 IS not initial.
    lr_name1-sign = 'I'.
    lr_name1-option = 'EQ'.
    lr_name1-low = p_name1.
    append lr_name1.
    endif.
    if not p_stdate is initial and not p_eddate is initial.
    lr_erdat-sign = 'I'.
    lr_erdat-option = 'BT'.
    lr_erdat-low = p_stdate.
    lr_erdat-high = p_eddate.
    append lr_erdat.
    endif.
    *select the General Data in Customer Master from kna1
    select kunnr land1 name1 name2 ort01 pstlz regio sortl stras telf1 telfx adrnr mcod1 mcod2 mcod3
    anred erdat ernam konzs ktokd name3 name4 spras telbx telf2 teltx fityp stcdt lzone
    into corresponding fields of table it_KNA1 from kna1
    where kunnr IN lr_kunnr AND
    name1 IN lr_name1 AND
    erdat IN lr_erdat .
    Move all the data to it_customer
    if sy-subrc = 0.
    loop at it_kna1.
    move-corresponding it_kna1 TO it_customer.
    append it_customer.
    clear it_customer.
    endloop.
    endif.
    *select Customer Master Partner Functions from knvp.
    if not it_customer[] is initial.
    select kunnr vkorg parvw
    into corresponding fields of table it_knvp
    from knvp FOR ALL ENTRIES IN it_customer
    where kunnr = it_customer-kunnr and
    vkorg in lr_vkorg .
    endif.
    Read Customer Master Partner Functions from it_knvp move it to it_customer
    loop at it_customer.
    read table it_knvp with key kunnr = it_customer-kunnr binary search.
    if sy-subrc = 0.
    it_customer-vkorg = it_knvp-vkorg.
    it_customer-parvw = it_knvp-parvw.
    modify it_customer.
    clear it_customer.
    endif.
    clear it_knvp.
    endloop.
    pls can you help in this code
    thanks
    mars

  • Developing prompts to enter a date range

    I need to develop a report for an agency allowing their user to select information from a table, between a user specified date range, which could change daily. The user needs to be prompted to enter a city, a start date, and an ending date... Then display and print this report based on their entered criteria. I would like to use the pop-up date pickers if possible. Can you give me some direction as to how I would go about developing the required prompts.

    Raj,
    Thank you for your help, I believe it is what I am trying to do. I am still having trouble bringing back data.. I feel that I am very close..
    The new page I created was PAGE 33.. On this page I have
    REGION:
    REGION: (Title-Retail-Labels)
    TYPE : SQL Query
    REGION SOURCE:
    select name,address,city,state,zip
    from retail
    where RENEWAL_DATE between to_date(:P33_START_DATE,'DD-MON-YY') and to_date(:P33_END_DATE,'DD-MON-YY')and POD =:P33_POD
    X Use Query-Specific Column Names and Validate Query
    ITEMS:
    10: P33_START_DATE Date Picker (DD-MON-YY) (Source:SQL Query)
    20: P33_END_DATE Date Picker (DD-MON-YY) (Source:SQL Query)
    30: P33_POD TextField (Source:SQL Query)
    I am querying data from the Retail table with the following columns.
    ID, Name, Address, City, State, Zip, Telephone, Fax, Permit, Renewal_Date, Owner, Contact, SalesTax, Violations, Compliance, Lease, Look, County, POD
    If I modify my query to say where renewal_date is not null or POD is not null I pull back the appropriate records..
    POD (column name) is basically point of destination and is a city..
    When I run the page it allows me to select two dates and type in a city. I have a Submit button to submit to page 33... It says no data found (the default).
    Does anything look incorrect..
    Thank you in advance for your help,
    Kevin

  • Restrict Query Data based on Date range and Users

    Hi All,
    I have a few web reports that I need do restrict data based on Users.
    In all the queries i have an infoobject 0CALDAY, and  a User Entry range variable on it. Because of performance issues  I need to restrict the range of dates a User can see. Typically most of users could go to a max date range of 1 month back. But some others would need the ability to see data for much bigger range of dates.
    Pls suggest how should i go about with this. Should I have to enforce this at Variable level(user exit).... but then i might have to maintain a table for the users.. Is there any other way of doing it.
    thanks
    Raj

    Any thoughts ?

  • Text Varible for user enter date range

    Hi,
    I need code for text variable,
    the user enters the date range in user entry varible screen
    ex : production for the date range of xxxxx(xxxx= text variable)
    user enters the date range 25-05-2010 -  31-05-2010
    The query description name should be 
    production for the date range of    25-05-2010 -  31-05-2010
    for that  i need code i _step 2  code
    User eners the date range in varaible screen as per that report header has to come
    Please provide the valuble code.
    Thanks & Regards,
    Sathish

    Use Replacement Path Approach instead of Customer Exit.
    Create two Text variables TVAR1 and TVAR2 of type replacement path. Replace them with the Date Characteristic that you are using on which variable is created for user to enter the date range. 
    While creating Text variables, for TVAR1 select From Value and  TVAR2 select To Value.
    Now make the Query description as   Production for the date range of &TVAR1& - &TVAR2&

  • LX25 displays wrong data for the entered date range

    System says "Inventory not executed" status for the bins even if Inventory is executed for the bins in the date range provided in the selection screen.
    For e.g.
    I execute report for Warehouse XYZ. I specify date range as 01.04.2014 to 31.03.2015.
    I get some bins in the status "No Inventory executed".I presume that Inventory is not executed for these bins within this period.
    But when I go to each bin in the status "No Inventory executed" I find that The bins are counted on the dates 24.09.2014 and then on 05.04.2015.
    Then I changed the date in the selection screen to 01.04.2014 to 05.04.2015.
    Those bins which were earlier in the status of "No inventory status executed" are now not present in this status.
    Does this mean that LX25 report is based on the Last counted date? Or the report is not displayed correctly for the date range provided?
    I want to know the criteria based on which the LX25 report works.
    Thanks In Advance.

    Hi Jurgen,
    Below information I found from the LX25 report info in SAP.
    Inventory status
    Description
    This report provides information on the stock in the storagae bins and presents this on the screen.  You can limit your selection by warehouse number, storage type and storage bin, or choose the following criteria:
    Total number of bins
    Number of inventoried bins in the selection period
    Bins with active inventory
    Bins with planned inventory
    Bins without executed inventory
    From this list, you can obtain a plan of the individual storage bins with further detail information within a storage type, by clicking on the relevant line total.
    It clearly shows that the report should be able to show the number of inventoried bins in the selection period, which it doesn't. Does it mean that system is not working as expected?
    Regards
    Soumya

  • Regarding date ranges in search criteria in oracle forms

    I am using employee number,name, person type, and date ranges as search criteria in custom form.
    when I enter employee number, hit the find button, I am getting the exact info in the result block.
    Result block contains
    employee name,personid,emp numb,org,start_date.
    Similarly when I enter employee number,dept, I am getting correct values.
    My question here is, when I enter date range. Iam unable to filter data.
    When i enter START_DATE between nvl(:BLOCKNAME.START_DATE,'01-JAN-1901') and nvl(:BLOCKNAME.END_DATE,'31-DEC-4712') at where clause in the result block. I got data for the date range also.
    if I give condition in the where clause, results are taking so much time when i search with employee name,number,dept,person type.
    If i query with date, persormance is good.
    Do u any know,how to prevent START_DATE between nvl(:BLOCKNAME.START_DATE,'01-JAN-1901') and nvl(:BLOCKNAME.END_DATE,'31-DEC-4712') when we search with employee name,number,dept,person type.

    Initailly Ididnt given any code in the where clause of the result block. I got data in the result block when i search with employee name,number,person type,dept etc except date range.
    If i give date range, irrespective of the date, getting all the data.
    after that i added code to the where clause of the result block. Now i am getting data for everything.
    like, when i query with employee name,number,even date range also.
    My question here, performance.
    when I query with date range, data is coming in expected time in the result block.
    when i query with dept, taking much time since date range logic exist in the where clause of the result block.
    I need to restrict the where clause only to the data ranges. Where clause should not necessary for employee number,name,person type dept search criteria
    Tahnks for your reply

  • F4 help:Restrict Value Range

    Hello Experts,
    I want to a search help for one field such that when user click on F4 help , it will again pop- up with one  screen, in which I need to have 2- 4 fields to Restrict the values then user enter some values here then F4 help will appaer.
    Like in standard tables mseg-lifnr F4 help Restrict Value Range screen , but i require only one tab
    Plz suggest
    Aastha

    Hello,
    Use the following piece of code.
    Parameter : p_value type ......
      TYPES : BEGIN OF y_value,
                      value TYPE text6,
                     END OF y_value.
      DATA : t_value TYPE STANDARD TABLE OF y_value.
      DATA: t_return TYPE STANDARD TABLE OF ddshretval.
    Fill table t_value with the values which  u require in the F4 help.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield         = 't_value-value' 
          dynpprog     = sy-repid
          dynpnr         = sy-dynnr
          dynprofield   = 'p_email'     
    TABLES
          value_tab       = t_value
          return_tab      = i_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.

Maybe you are looking for

  • MacBook Pro & Latest Airport Update Problem

    Hi, I just ran the software update and installed the latest Airport update - AirPort Extreme Update 2008-001 for Tiger , and it's conflicting with my system, giving me CPU spikes...everything was fine before I installed the latest update. Is there a

  • Repeat Updates from App Store?

    About a day after I have updated an app using App Store I am notified the app needs updating again. So I do it. I am using OS 10.8.2. Does anyone else experience this? Any advice about what to do about it?

  • 1 month for repairing and still waiting !!!!

    This is my real night mare and Nokia Thailand can do nothing !!!!! Already 1 month and still dont know when it will be last. There is no solution for me accept waiting, and yes Im doing. Can anyone help me on this?? Im dont want to wait anymore!!!! 

  • Large page numbers will crash Livecycle Designer! Beware!

    I tried converting a 70 page .pdf file to fillable, and when I try to scroll down my forms past page 30 in Designer, the remaining pages get cut off. I cannot access over half of my document. Don't make the same mistake! Separate your file into small

  • Noise coming from the bottom of my mac?

    There's a noise coming from the base of my early 2013 Mac Book Pro Retina.  When I'm resting it on my lap or pick it up it sounds like a spring sound and occasionally I can here it when I'm typing and push down a little hard on the t, y and u keys.