Report on user selected Date Range

Please Disregard,
Message was meant for another forum.
Edited by: JodyMorin on Jan 15, 2009 11:29 AM

Hi,
You can set defaults for the datepickers if you need to - this could be done in a computation on the page for each item and conditional on the item being null.
When I've done something similar to this, I've created two hidden page items - eg, :P19_FIRST_DATE and :P19_LAST_DATE and populated these with the earliest/latest date that the user could reasonably select (perhaps, in your case, the MIN(LM_DT) and MAX(LM_DT) values).
Then your SQL would be:
select * from PRJ_ITEMS
where LM_DT BETWEEN TO_DATE(NVL(:P19_START,:P19_FIRST_DATE), 'DD-MON-YY')
AND TO_DATE(NVL(:P19_END,:P19_LAST_DATE), 'DD-MON-YY')If you don't want to set default dates, you could do something like:
SELECT * FROM PRJ_ITEMS
WHERE (:P19_START IS NULL AND :P19_END IS NULL)
OR (:P19_START IS NOT NULL AND :P19_END IS NULL AND LM_DT >= TO_DATE(:P19_START,'DD-MON-YY'))
OR (:P19_START IS NULL AND :P19_END IS NOT NULL AND LM_DT <= TO_DATE(:P19_END,'DD-MON-YY'))
OR (LM_DT BETWEEN TO_DATE(:P19_START,'DD-MON-YY') AND TO_DATE(:P19_END,'DD-MON-YY'))There are various reasons why your two dates are being cleared when the page is reloaded. Firstly, you should check the branch that returns to the same page - make sure you are not clearing the cache for the page. Then, have a look to see if there is a "reset page" process (usually created for you when you create a form page). Then, check the Source settings for the items. Typically, these would be "Only when current value in session state is null" and a Source Type of "Static Assignment" with the "Source Value or Expression" left empty.
Andy

Similar Messages

  • Creating report based on user selected Date Range

    Hello.
    I am trying to display an Apex report that selects data for the report based on a user entered date range.
    It's a simple page with two date picker fields (p18_start and p18_end).
    The report region SQL looks like this:
    SELECT *
    FROM prj_items
    WHERE LM_DT BETWEEN :p18_start AND :P18_end
    One table, one field on the table to search and two Apex variables.
    I thought this would be fairly simple, but I am obviously missing something.
    I not even sure what other information is needed to help me figure this out.
    -Jody

    Hi,
    You can set defaults for the datepickers if you need to - this could be done in a computation on the page for each item and conditional on the item being null.
    When I've done something similar to this, I've created two hidden page items - eg, :P19_FIRST_DATE and :P19_LAST_DATE and populated these with the earliest/latest date that the user could reasonably select (perhaps, in your case, the MIN(LM_DT) and MAX(LM_DT) values).
    Then your SQL would be:
    select * from PRJ_ITEMS
    where LM_DT BETWEEN TO_DATE(NVL(:P19_START,:P19_FIRST_DATE), 'DD-MON-YY')
    AND TO_DATE(NVL(:P19_END,:P19_LAST_DATE), 'DD-MON-YY')If you don't want to set default dates, you could do something like:
    SELECT * FROM PRJ_ITEMS
    WHERE (:P19_START IS NULL AND :P19_END IS NULL)
    OR (:P19_START IS NOT NULL AND :P19_END IS NULL AND LM_DT >= TO_DATE(:P19_START,'DD-MON-YY'))
    OR (:P19_START IS NULL AND :P19_END IS NOT NULL AND LM_DT <= TO_DATE(:P19_END,'DD-MON-YY'))
    OR (LM_DT BETWEEN TO_DATE(:P19_START,'DD-MON-YY') AND TO_DATE(:P19_END,'DD-MON-YY'))There are various reasons why your two dates are being cleared when the page is reloaded. Firstly, you should check the branch that returns to the same page - make sure you are not clearing the cache for the page. Then, have a look to see if there is a "reset page" process (usually created for you when you create a form page). Then, check the Source settings for the items. Typically, these would be "Only when current value in session state is null" and a Source Type of "Static Assignment" with the "Source Value or Expression" left empty.
    Andy

  • Devolped an ALV report for daily cash receipts for selected date range

    hi,   
                 how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report.

    hi,   
                 how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report.

  • Devloped an ALV report for daily cash receipts for selected date range

    hi,   
                 how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report.

    Hi,
    You can develop simple reports using Report Painter.
    You may be also interested in:
    Check report SAPMF05A for credit memo
    See the following Std reports on Payment Advices execute the Tcodes:
    S_ALR_87009888
    S_ALR_87009889
    S_ALR_87009890
    S_ALR_87009891
    S_ALR_87009892
    S_ALR_87009893
    S_ALR_87009978
    S_ALR_87009979
    S_ALR_87009980
    S_ALR_87009981
    S_ALR_87009982
    S_ALR_87009983
    S_ALR_87010056
    S_ALR_87010057
    S_ALR_87010058
    S_ALR_87010059
    S_ALR_87010060
    S_ALR_87010061
    S_ALR_87010066
    S_ALR_87010067
    S_ALR_87012106
    S_ALR_87012107
    S_ALR_87012108
    S_ALR_87012109
    S_ALR_87012110
    S_ALR_87012111
    S_ALR_87012116
    S_ALR_87012117
    S_ALR_87012200
    S_ALR_87012201
    S_ALR_87012202
    S_ALR_870122
    S_ALR_87012204
    S_ALR_87012205
    S_ALR_87012350
    S_ALR_87012351
    S_ALR_87012352
    S_ALR_87012353
    S_ALR_87012354
    S_ALR_87012355
    sample ALV report:
    tables:
    marav. "Table MARA and table MAKT
    Data to be displayed in ALV
    Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
    matically determine the fieldstructure from this source program
    Data:
    begin of imat occurs 100,
    matnr like marav-matnr, "Material number
    maktx like marav-maktx, "Material short text
    matkl like marav-matkl, "Material group (so you can test to make
                            " intermediate sums)
    ntgew like marav-ntgew, "Net weight, numeric field (so you can test to
                            "make sums)
    gewei like marav-gewei, "weight unit (just to be complete)
    end of imat.
    Other data needed
    field to store report name
    data i_repid like sy-repid.
    field to check table length
    data i_lines like sy-tabix.
    Data for ALV display
    TYPE-POOLS: SLIS.
    data int_fcat type SLIS_T_FIELDCAT_ALV.
    select-options:
    s_matnr for marav-matnr matchcode object MAT1.
    start-of-selection.
    read data into table imat
      select * from marav
      into corresponding fields of table imat
      where
      matnr in s_matnr.
    end-of-selection.
    Now, we start with ALV
    To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
    The fieldcatalouge can be generated by FUNCTION
    'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
    report source, including this report.
    The only problem one might have is that the report and table names
    need to be in capital letters. (I had it )
    Store report name
    i_repid = sy-repid.
    Create Fieldcatalogue from internal table
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME         = sy-repid
                I_INTERNAL_TABNAME     = 'IMAT'  "capital letters!
                I_INCLNAME             = sy-repid
           CHANGING
                CT_FIELDCAT            = int_fcat
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM       = i_repid
                I_STRUCTURE_NAME         = 'marav'
                I_DEFAULT                = 'X'
                I_SAVE                   = 'A'
           TABLES
                T_OUTTAB                 = imat.
      IF SY-SUBRC <> 0.
        WRITE: 'SY-SUBRC: ', SY-SUBRC .
      ENDIF.
    Hope this will help.
    Regards,
    Naveen.

  • File Count with selected date range

    Hi,
    Our requirement is to get the file count with selected date by the user from two sharepoint date time controls i.e. dtp1 and dtp2 into the data table. I am able to get the file count of specific folder from Pages library through below code. Now need to get
    the selected date range from two date time picker controls and check with the item created by is within the date range. If yes I need to get the file count.
    So please share your ideas/thoughts to do the same.
    SPList list =
    wikiweb.Lists["Pages"];
                        SPFolderCollection oFolders
    = list.RootFolder.SubFolders["foldername"].SubFolders;
                        DataTable dt
    = new DataTable();
                        dt.Columns.Add("Column1");
                        DataRow dr;
                        if (oFolders.Count
    > 0)
                            foreach (SPFolder oFolder in oFolders)
     if (!oFolder.Name.Equals("Forms"))
                                    dr
    = dt.NewRow(); 
    dr["Column1"] = oFolder.ItemCount.ToString();
    dt.Rows.Add(dr);
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    Hi,
    I have modified the code as below
    if((DateTime)(oFolder.Item.File.TimeCreated>dtFromDate.SelectedDate)&&(DateTime)(oFolder.Item.File.TimeCreated<dtToDate.SelectedDate))
    But still it is throwing the error.
    Please share your ideas on the same.
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

  • Error when selecting date range in query designer

    hi all,
    when iam trying to select date range in query designer like 01.04.2009 to 10.04.2009 it has to select only that dates where as it is selecting all the dates in between those like 010.04.2009,01.03.2009,01.02.2009.why this is happening ,iam unable to understand.plzz help me in this issue.
    Vamshi D Krishna

    hi ,
    i have created a variable as you told but no use.still i have to select the dates manuallyone after the other.for more user friendly can i have a calander where i can select date ranges.is it posible to have calander for selecting date ranges instead selecting dates one by one,if posible i request you to give  the detailed steps.plzz guide me in this issue.thanks in advance.
    Vamshi D Krishna

  • Is that possible to display the user selection data in the printable page?

    Hi All,
    I'm going to add a printablepage button on my page.
    Here comes a questions.
    Is that possible to display the user selection data in the printable page?
    For example,
    I have a table in the page,with 10 records.User select 5 of them.Can I display these 5 records in the printable page?
    Please help.

    Hi Yannick,
    Thanks a lot for the information. It worked.
    The portlet data can be accessible using bindings, but parameter name can be different.
    Meanwhile I have got one more scenario, where the Portlet and Task Flow placed in different pages of WCP Application. On change of data in the Portlet the application should navigate to another page where the Task Flow placed and displays selected data.
    Basically I can not use any button for navigation. The navigation should happen once I do some action in Portlet.
    Is this possible? If yes can you please let me know the steps?
    Thanks in advance!
    Somnath
    Edited by: Somnath Basak on Dec 20, 2011 9:41 AM

  • Resource Assignment Select date range not wokring

    The Select Date Range control is not working properly it does not change the results shown in resource assignments under resource center in Project server 2013. Any ideas? Have I missed some configuration?
    Regards, Syed Faizan ur Rehman, CBPM®,PRINCE2®, MCTS

    Hi Syed,
    It does work correctly for me in my Project Online instance. Have you installed the SP1?
    Note that the date range is only available for the timephased data and not for the Gantt chart.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • 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

  • Using function(s) to select date range in a computation.

    Hello
    Within my ApEx report, I would like to be able to have data returned from within a date range selected by the user. Under "Compute" there are lots of "Functions" (Least, Greatest, Last_Day, etc.) but so far I have not been able to find the right syntax for date range.
    This seems so simple - any help appreciated.
    Thanks
    Paul S.

    I do not use APEX but is the BETWEEN operator available to you?
    Normally to select a date range you just write code like
    select ....
    from table_t
    where date_col between to_date(start_date,'format') and to_date(end_date,'format')
    or
    where date_col >= to_date(start_date,'format')
    and date_col < to_date(end_date,'format') + 1
    as this form eliminates worrying about the time component.
    HTH -- Mark D Powell --

  • 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&

  • No Data in Reports Details in Custom date range

    Hello, iTunes U Public Site Manager Admins.
    As the iTunes U Public Site Manager admin, I've been trying to access our institution's iTunes U Reports Details for a couple of days. (I send a monthly report of usage to our course/collection contributors.) When I custom the date range, under Details, there is zero entry; "No data available in table" message is shown.
    This feature had been working well since Apple iTunes U added this enhancement on August 13, 2013. The report Details showed the exact stats for Browse, Subscribe, Download, Stream, and Enclosure for each course/collection in the custom date range.
    Now under "Details", the data is shown only when the date range is Last 30 Days. It shows no data in custom date range when the Calendar is used to select a Start Date and End Date.
    Has anyone else noticed this problem?
    Thanks.
    Q. Wang

    Erik.
    I used your suggestion and it worked very well. This is how I did it.
    Export the range of data that includes Feb. 1-Feb. 28, 2014 as .tsv file.
    Open that file in Excel.
    Add a blank column next to the Date column. Use function =Month() to just extract the month into the new column. Fill down the whole column. Then copy and paste special (value) into the same column (I have over 26,000 rows of data in the file.) Converting to Value will allow for the next step of PivotTable.
    Create a PivotTable for the 26,000 rows of data. Use Month as the Report filter, iTunes_ID as the Row Labels, Select Browse, Subscribe, etc. as the Sum Values. (The result is a summary table with about 200 rows.)
    I then do a Vlookup to my premade Master file to add Category (course, collection, resources) and Instructor Name to each of the 200 rows.
    That will do it for my monthly report.
    Thanks for your tip again. I did not know the .tsv file would have DATE for each item.
    Sincerely,
    Q. Wang

  • Price change report for  a given date range in inforecords

    hi,
    Can any body suggest how we can get price changes in inforecords for given date range. is there any standard sap tcode or  fuction module.

    Hi,
    If you are referring to the changes in the condition record (for eg. for PR00), then you may go through the foll path:
    Execute VK13 for any condition type - once inside the detail screen, from the menu path, choose Environment -> Changes -> change report. This will take you to a new selection screen where you can define the period you want to see the change record as well as the condition type for which you want to track the changes. Beware, this is a complex report for SAP and it will take definitely longer time to complete. So, it is better to specify short time periods and specific condition types and execute this in background.
    Hope, this helps!
    S. Siva

  • 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

  • Need JavaScript for Sharepoint Designer 2010, to show a Pop-up to all the users between date range and the redirect the site

    Dear all,
    I am very new to Sharepoint designer 2010. Its better to say, i am just stepping in.
    I have sharepoint site which is accessible for all the users to update few information. But i want this site not to be accessible during a date range, say from 15th to 20th of every month.
    I am planning to have something like this: If any user tries to access this sharepoint site between 15th to 20th date range of everymonth, then the browser must show an pop-up alert saying "This site is not accessible during this date range" and Redirect
    this sharepoint site to someother site (Say http:// somesitename.xx.com) immidiately.
    I know very little about how to add Javascript in sharepoint webpart.
    Please provide the Javascript or any best alternate solution to my concern.
    Thanks in advance.

    Hi,
    From your description, my understanding is that you want to redirect sharepoint site to another site between 15th and 20th every month.
    I agree with what Sudip says. If you still want to use JS code,You could try these steps
    below:
    Open your site with SharePoint Designer.
    Click Master Pages in left navigation.
    Find file v4.master, and backup it(it is very important).
    Right click your v4.master,
    choose "Edit File in Adavance Mode".
    Add the code below into the <head/> tag.
    <script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script
    type="text/javascript">
    $(document).ready(function(){
    var today = new Date();  
    var day = today.getDate(); // get current day
    var id = _spPageContextInfo.userid; // get the id of current logon in user
    var boolFlg = false;
    $.ajax({
       url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/SiteGroups/GetByName(\'"+"sharepoint Owners"+"\')/Users", //get users in a specified group can access the sharepoint site from 15th to 20th every
    month
       type: "GET",
       headers: {"accept": "application/json;odata=verbose"},
       success: function (data) {
          if (data.d.results) { 
             var src = data.d.results;
             for(var i = 0; i < src.length; i++){
                if(src[i].userid==id){ //check the logon in user in  the specified group or not
                   boolFlg = false;
                   break;
             if(!boolFlg){
                if(day <= 20 && day >=15){
                    alert("This site is not accessible during this date range"); // alert the message
                    location.href = "http:// somesitename.xx.com"; // redirect to another site
       error: function (xhr) {
          alert(xhr.status + ': ' + xhr.statusText);
    })</script>
    Best Regards
    Vincent Han
    TechNet Community Support

Maybe you are looking for

  • How can i login to client

    Hi friends, iam very new to sap,i installed sap recently,i created a client how can i login to that client(i given user id:sap*,pwd:pass) any parameter changes required

  • Problem while sending Abap list to mail

    Hi All, I am sending an abap list to mail using function module SO_NEW_DOCUMENT_ATT_SEND_API1. Report output is going to mail id but only last page is showing. The flow i followed in the code is as follows: First I used Function module SAVE_LIST Next

  • HT1657 why is my computer not authorized to see a movie

    i rented a movie on my computer and am not able to watch it because it claims my computer is not authorized to watch it.  what to do?

  • Error while system copy export

    Dear all, While system copy in export  part we are getting following error.  Sorry for not able to paste in proper format. OS :-HPUX 11.23 Database :- oracle 10g Execution of the command "/opt/java1.4/bin/java -classpath /tmp/sapinst_exe.27996.126355

  • ICal error  "server did not recognize your user name"

    I recently was added to the MobileMe calendar beta, and now my iCal calendar doesn't sync with MobileMe. iPhone works fine. Error message when I launch iCal says "server did not recognize your user name" Any thoughts, suggestions would be appreciated