Date Range on Selection Screen not working

Hi All,
I have a selection screen with 3 selection options on there to run a report.
1) Today
2) Yesterday
3) This week
Now the first two are working fine but number 3 This Week isn't.  Any reason why? This week basically means Monday to Friday of this week. E.g. If I have This week Clicked on Monday it would just show Mondays result, if I run this report on Wednesday with This week clicked it should show Monday, Tuesday & Wednesday.
Regards
Adeel
FORM posting_date .
  CLEAR : rg_finl.
  IF rb_1 = 'X'.
    rg_finl-sign      = 'I'.
    rg_finl-option    = 'EQ'.
    rg_finl-low       = sy-datum.
    APPEND rg_finl.
    CLEAR  rg_finl.
  ELSEIF rb_2 = 'X'.
    rg_finl-sign      = 'I'.
    rg_finl-option    = 'EQ'.
    rg_finl-low       = sy-datum - 1.
    APPEND rg_finl.
    CLEAR  rg_finl.
  ELSEIF rb_3 = 'X'.   
    rg_finl-sign      = 'I'.
    rg_finl-option    = 'BT'.
    rg_finl-low       = sy-datum.
    rg_finl-high      = sy-datum - 7.
    APPEND rg_finl.
    CLEAR  rg_finl.
  ELSEIF rb_4 = 'X'.
    rg_finl[] = s_budat[].
  ENDIF.
ENDFORM.

Hello
You a wrong:
Instead
rg_finl-low = sy-datum.
rg_finl-high = sy-datum - 7.
you need:
rg_finl-low = sy-datum - 7.
rg_finl-high = sy-datum.

Similar Messages

  • Setting default date range in selection screen when executing as batch job.

    Hi Guys,
    I have one report to be scheduled as weekly batch job and one of the selection screen field is date range. If i set this report to run today then the date range will be from one week back date(Lower value) to today date(Higher value). When it runs for next week(Already scheduled as weekly batch job) the date range should be like this
    Lower value = today date
    higher value= next week run date.
    How can i achieve this functionality. Is it possible through Dynamic variant concept?. Rest of the selection screen fields have some default values and should not change.
    <REMOVED BY MODERATOR>
    Thanks in advance,
    Vinod.
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 3:52 PM

    Hi Vinod,
    Would suggest you to this.
    Create two parameters : p_start_date and p_end_date of type sy-datum on your selection screen , instead of a range.
    Now goto create a variant from SE38 for the report.
    While creating the variant, mark the "Selection Variable" checkbox for the two parameters and click on "Selection Variables".
    Select the option "D: Dynamic date calculation" for both the date fields.
    For p_start_date - select the option "Current Date"
    For p_end_date  - select the option "Current date +/- ??? days" and put 7 in the pop up.
    Hence what you have done now is, set up a dynamic variant, where p_start_date will have sy-datum and p_end_date will have sy-datum + 7, everytime the job runs.
    Now, in the program, first step after START-OF-SELECTION code the following:
    RANGES: r_date FOR sy-datum.
    start-of-selection.
    refresh r_date.
    r_date-sign = 'I'. r_date-option = 'BT'.
    r_date-low = p_start_date. r_date-high = p_end_date.
    append r_date.
    Hence this way, you would have built your range and use it as needed.
    Cheers,
    Aditya

  • After upgrade date selection does not work in xml forms

    Hi Experts,
    since we upgrade the portal from 7.0.19 to 7.0.24 we have a problem with the timestamp in the xml forms in combination with IE7. When we click on the date selction button, the date screen appears and the form disappears. The only option we can choose is cancel and then the date selection screen disappears and the form is not comming back. Selecting a date en choose ok does not work. I tried with IE6 then it works fine. Before the upgrade it works fine with IE7.
    How to solve this?
    thanks in advance.
    Vo.

    I created a OSS message and the answer is : [Note 1491775 - XML Forms locked when closing browser window|https://websmp130.sap-ag.de/sap(bD1ubCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1491775]
    gr
    Vo.

  • Data Services- The job server you selected is not working

    Long Text:
    After logging in to the Data Services designer,when try to run a job it shows error -The job server you selected is not working
    Latest Software version -BODS 4.0 SP2
    Reproduce Steps:
    1. Double click on the Project from repository, it will display the project in Project area.
    2. After that it will display all the jobs under the project.
    3.Right click on the job and try to execute, then it will display the "Execution Properties" windows.
    Here the we can the default Job Server has been selected.
    4. Try to click ok to execute the job and then we get the error-"The job server you selected is not working"

    Hi
    Please contact your Data services administrator to check on the server why the job server is not working.
    There might be several issues like connectivity with the repository, access details , mapping in the management console etc.
    And let us know the exact issue.
    Regards
    Puneet

  • PNPCE in ABAP Query(SQ01) Selection is not working completely

    Hi All,
    I have developed an ABAP query using LDB PNPCE. I am reading data from IT000,IT0001 etc . I test the query in QA and I noticed that the PNCPCE screen doesn’t care about the selection in query. Like I have given the date range in PNCPE default screen. But it’s not filtering that data at all. It pulling up the employee’s regardless of date, it behaves the same for field action type (P0000-MASSn). The surprising thing is that for company code its working fine. My question is that Why PNPCE standard screen-selection not filtering data in ABAP query.
    Did any one of you also experience that?
    FYI
    I also find an OSS note # 730005 but we are already on 52 Patch !!
    OSS note :PNPCE: Incorrect data of infotype 0000 and 0001
    Symptom
    When you carry out a reprot which is based on logical database PNPCE, errors occur during the processing of infotypes 0000 and 0001.
    Other terms
    PNPCE, AS PERSON, P0000, P0001, data selection period, person selection period, CHECK_IT_0000_DATA_RESTRICTED, CHECK_IT_0001_DATA_RESTRICTED
    Reason and Prerequisites
    You start a report which is based on logical database PNPCE. In the report, infotype 0000 or 0001 is processed (that is, it was declared via the INFOTYPES statement). At event 'GET GROUP' or 'GET PERAS', the system either returns too few data records in the infotype tables or it returns data records twice.
    The error (missing data records) has only occured since the implementation of Note 687004 or the import of Support Package SAPKE47028.
    Solution
    Implement the attached corrections. or import the corresponding Support Package.
    Thanks,
    Saquib Khan

    Hi Saquib,
       Recently i am facing the same issue can u pls do reply how you have overcome this issue..The data is not getting picked up at the right time it is lately picked up by the program . Earlier it was PNP and it has been changed to PNPCE also we had implemented OSS Note 687004 and the later's Notes  were also implemented but still now we are unable to track down why there is delay in picking up the records this has been happening for the past 8-10 Months(i m not sure far more before). I am finding 2 main issues,
    1. we are using GET peras in PNPCE and no other event after that may be this is not fetching all the data because my selection screen does contain PERSONID where i suppose there should be GET PERSON event to define it
    2. RP_READ_INFOTYPE macro while using for P0000 ,, the code in the macro is such that it fetches using P0001 also ...I suppose if there are any inconsistency between IT0 and IT1 then this might one to take care ...
    kindly let me know how you have approached to resolve this issue.

  • Ranges in Selection Screens

    Hi
    Can any body give the info regarding ranges in selection screens instead of selection-options.
    I want to use multiple selections
    Thanks & Regrads
    venkat

    Hi,
    Here both SELECT-OPTIONS & RANGES works for the same purpose.  They both are used for the range selection from selection screen.  The main diff. between them is, while we use SELECT-OPTIONS system implicitly creates the select options internal table which contains the fields of SIGN,OPTION,LOW & HIGH.  But in case of RANGES, this internal table should be defined explicitly.
    Eg. to SELECT-OPTIONS :
    REPORT YARSELECT.
    TABLES YTXLFA1.
    SELECT-OPTIONS : VENDOR FOR YTXLFA1-LIFNR.
    INITIALIZATION.
    VENDOR-LOW    =   1000.               " It specifies the range starting value.
    VENDOR-HIGH    =   2000.               " It specifies the range ending value.
    VENDOR-OPTION  =  'BT'.                " specifies ranges value is in between.
    VENDOR-SIGN      = 'I'.                     "specifies both inclussive.
    APPEND VENDOR.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB 
    WHERE LIFNR IN VENDOR.
    Eg. to RANGES:
    REPORT YARRANGE.
    TABLES YTXLFA1.
    RANGES: VENDOR FOR YTXFLA1-LIFNR.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB 
    WHERE LIFNR IN VENDOR.
    Here with RANGES  user has to design an internal table with fields - 
    SIGN,OPTION,LOW and HIGH EXPLICITLY.
    >
    Example:
    select-options: bukrs for zstock-bukrs.
    Should the user fill in 'ABFI' in BUKRS on the selection screen, BUKRS will look like this:
    IEQABFI
    This is because BUKRS is set as a table as follows:
    begin of bukrs occurs 0,
      SIGN(1)    type c,
      OPTION(2) type c,
      LOW         like bukrs,
      HIGH         like bukrs,
    end of bukrs.
    Now, when you create the following range, it will have the exact same fields set inside its table:
    Ranges: bukrs for zstock-bukrs.
    The difference is, because ranges doesn't show on the selection screen, you will have to fill it yourself, meaning you will have to fill bukrs-sign, bukrs-option, bukrs-low & bukrs-high all manually.
    Some tips:
    Sign is always I (for Include) or E (for Exclude)
    Option can be a whole range, which includes:
    EQ        (Equal) 
    BT        (Between)) 
    CP        (Contain Pattern)
    So let's say you want to have the range check for all company codes not starting with AB, you will set your code as follow:
    ranges: bukrs for zstock-bukrs.
    bukrs-sign = 'E'.             "Exclude
    bukrs-option = 'CP'.        "Pattern
    bukrs-low = 'AB*'.            "Low Value
    bukrs-high = ''.                "High Value
    append bukrs.
    Always remember to APPEND your range when you fill it, as the WHERE clause checks against the lines of the range table, not against the header line.
    Hope this explains it well enough.
    >
    What does SIGN "I" & "E" mean?
    The "I" stands for Include, and the "E" for Exclude.
    The easiest way to learn how the range selections work is, create the following dummy program:
    report dummy.
    tables: mara.
    select-options: matnr for mara-matnr.
    start-of-selection.
    loop at matnr.
    write: / matnr-sign,
               matnr-option,
               matnr-low,
               matnr-high.
    endloop.
    Run this program, and fill in a lot of junk into MATNR. Fill in some includes, some excludes, some ranges, etc., and you will soon realise how the system builds ranges (select-options). Once you know that, you can fill your own ranges quickly and efficiently.
    Regards,
    Sruthi

  • 'Get All New Data Request by Request' option not working Between DSO n Cube

    Hi BI's..
             Could anyone please tell me why the option ' Get one Request only' and  'Get All New Data Request by Request' is not working in DTP between Standard DSO and InfoCube.
    Scenario:
    I have done the data load by Yearwise say FY 2000 to FY 2009 in Infopackage and load it to Write-optimised DSO (10 requests) and again load Request by request to Standard DSO and activate each request. I have selected the option in DTP's to  'Get All New Data Request by Request' and its working fine between WDSO and SDSO. But not working between Cube and SDSO. While Execute DTP its taking as a single request from SDSO to Cube.( 10 request to single request).
    Regards,
    Sari.

    Hi,
    How does your DTP setting looks like from below options ? It should be change log, assuming you are not deleting change log data.
    Delta Init. Extraction from...
    - Active Table (with archive)
    - Active Table (without archive)
    - Archive ( full extraction only)
    - Change Log
    Also if you want to enable deltas, please do not delete change log. That could create issue while further update from DSO.
    Hope that helps.
    Regards
    Mr Kapadia
    *Assigning points is the way to say thanks*

  • LaserJet Pr0 200 color MFP M276nw Touch Screen not Working correctly

    Hello, I'm having an issue with a LaserJet Pr0 200 color MFP M276nw Touch Screen not Working correctly. I have followed the instructions to reset the printer, but now am unable to select 'English' as my language because every time I select the 'English' option 'Spanish' is selected. I am then given two options to select 'Si' or 'No' both of which can not be selected on the touch screen?
    Anybody know of a way round this?

    Hi @dnhowes ,
    I see that you are having issues with the touch screen not working correctly. I will do my best to help you.
    Make sure the printer is connected directly to a wall outlet. (don't use a power hub or a surge protector) This ensures the printer is receiving full power and may help this situation.
    Was it the Nvram reset back to factory settings that you tried or a hard reset?
    Try selecting the option on the display a little higher above the icon to see if that helps. Some touch screens are finicky.
    I find that on the Lab printers when I am selecting different menus.
    If the issue continues, please call our technical support at 800-474-6836 for further assistance. If you live outside the US/Canada Region, please click the link below to get the support number for your region.
    http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • FISCAL year from Date  in the Selection Screen.

    Hi Folks,
    Is there any function module which returns the Fiscal year if we provide the date in ranges.
    I mean, I have a select option for date in the selection screen.So,if a user enters the date say 01042007 01042007 it should return the corresponding fiscal year.
    Kindly let me know if anyone here has any idea regarding this.
    Thanks,
    K.Kiran.

    Hello,
    Check these FM's
    FTIS
    FTI_FISCAL_YEAR_MONTH_GET
    KBPA                           Budget/Plan - application-specific
    KBPA_GET_START_FISCAL_YEAR     Determine Start Year for Funds Management
    KBPA_GET_START_FISCAL_YEAR_OPT
    Vasanth

  • Select statement not working

    hi to all,
    I am trying to write use inner joining . here is code
    DATA:tabname LIKE dd02L-tabname,
         table_disc LIKE dd02t-ddtext.
      SELECT  dd02ltabname dd02tddtext INTO (tabname,table_disc)
        FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
              WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
                                AND dd02L~tabname = 'ZANKI*'.
        endselect.
          write : tabname.
    I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank you

    Hi,
    I executed the ur inner join conditin by commenting 'z*' it's working fine.
    I think  where condition is not getting satisfied so u r not getting any data.
    Please conform in where condition you need * 'AND'* or OR
    I change decalration as below.
    DATA:tabname    type TABNAME,
          table_disc type AS4TEXT.
    SELECT dd02l~tabname
           dd02t~ddtext  INTO (tabname, table_disc)
    FROM dd02l  INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
    WHERE dd02t~ddlanguage = 'E' AND
          dd02l~tabclass = 'TRANSP'AND
        dd02L~tabname = 'ZANKI*'.
    endselect.
    write : tabname.
    Regards,
    Pravin

  • XMLP 5.6.2 - Parameters -  Both Multi-Select and All-Select  Do Not Work

    Both Multi-Select and All-Select Do Not Work.
    What's up with this behavior?
    And when might it be fixed?
    BG...

    The Multi-Select is now working, not sure what I did wrong earlier. However the "Can select all" option when building the parameter does not work as advertised, though I was able to get around that as well.
    Create a Data Model
    select LAST_NAME, FIRST_NAME from SOME_TABLE where SOME_COLUMN =:SOME_VALUE
    OR
    select LAST_NAME, FIRST_NAME from SOME_TABLE where SOME_COLUMN in (:SOME_VALUE)
    Create a LOV
    Name = LOV_SOME_COLUMN
    Type = SQL Query
    select distinct SOME_TABLE.SOME_COLUMN as SOME_COLUMN from SCHEMA.TABLE
    Create a Parameter
    Identifier = PARM_SOME_COLUMN
    Data Type = String
    Default Value = NULL
    Parameter Type = Menu
    Display Label = LOV_SOME_COLUMN
    List Of Value = LOV_SOME_COLUMN
    Option
    Multiple Selection - Checked
    Can select all - Checked
    Refresh other parameters on change - Checked
    Then test your report. Select "All" from the LOV and click view. Result - No Rows Returned.
    Selecting a "Single" or "Multiple Values" values from the LOV does work.
    The way I am getting around the problem is to uncheck the "Can select all" and then manually select all the values in the LOV in order to get the "All".
    BG...

  • Define ranges in selection screen

    hi all
    does anybody know how to declare ranges on selection screen
    i have to declare it for matnr
    thanks for your help

    Moderator message - Please do not ask or answer basic questions - thread locked
    This is your third warning. There won't be a fourth.
    Rob
    Edited by: Rob Burbank on Sep 22, 2010 10:04 AM

  • Table Control on a report selection screen -not a dialog transaction screen

    Hi
    Does anyone know of a way to have table control functionality on a report selection-screen? The program needs to be able to run as a background job (ie cannot be a dialog transaction) and we need to be able to save variants with the selection-screen values.
    Any help would be appreciated.
    The key point is we want to allow the user to enter a dynamic number of rows of table data on the selection-screen, save a variant containing that data and execute the program with the variant as a background job.
    Thanks
    Nicole Knight

    Hi Nicole,
    The main problem is how to persist the data.  If you are not able to create a couple of tables then you could always utilise TVARV instead.  On a similar line to my original post you could have the button call a dialog transaction.  In here you could do your normal GUI table control.  When saving the data simply transpose each column into a separate select-option held on TVARV keyed by the 'variant name' + fieldname.  Then retrieve and transpose this back when executing the report.
    Other methods could be storing the data in cluster xy (see EXPORT TO DATABASE command).
    This seems a bit overkill for what would be a couple of maintenance dialogs.
    Cheers,
    Pete
    PS. The view cluster is just a way of hierarchically performing table maintenance across multiple related tables.  It offers a good UI for this purpose (header and item config tables) and is utilised extensively in the IMG.

  • SELECT * CONNECTION not work

    Hi,
    It is found that SELECT * does not work with CONNECTION. For example, I use the following statement to retrieve data from another system and an error states that SQL error 207 when accessing table 'MARA'. 'Invalid column name  'ANIMAL_ORIGIN''. If columns are specified, data can then be retrieved. The SAP BASIS version is 7.31.
    SELECT SINGLE *
          INTO CORRESPONDING FIELDS OF ls_mara
        FROM MARA
                   CLIENT SPECIFIED
                   CONNECTION ('G01')
    WHERE MANDT = '100'.

    Hi TS,
    You gave the answer already, but look at the HELP:
    To allow the Open SQL command to be run for the secondary database connection, the table definitions in the connection must be the same as those in the standard database.
    Cheers,
    Custodio

  • Sony Vaio Pro 13.3 Touch: Touch screen not working

    Hi, The touch screen for my Sony Vaio Pro 13 Touch suddenly stopped working two days ago and I have no idea how to fix it. I didn't install anything new before it stopped working, and I tried to install all the new drivers on the VAIO update but it still didn't work. I thought it might be because of Windows so I updated to Windows 8.1 today and it still does not work. On the PC info it even says" Pen abd touch: No pen or touch input is available for this display". but this laptop is supposed to have touch capability and it has been working up until now. Please help! My model number is SVP13215CDB. Do I need to install or update my driver?

    Hi FlyingTortoise,
    Was there any changes prior to touch screen not working?  Like installing software or hardware?  If not, then try using windows system restore to restore back to a date that you know when it was working.  If that still does not resolve issue.  Then we may have to put the unit back to factory condition to eliminate software related before servicing the unit for hardware.
    Nick--

Maybe you are looking for

  • MR11 Modification

    Friends, In MR11 TC.. input selection Only PO date is available, Our User requires GRN Date as additional option, Is it possible to add the fields in the Standard Report throgh any Enhanchments Please help. Thanks & Regards BK

  • Installing Adobe photoshop 9 via disk

    I purchased Photoshop elements 9 and when i put the disk in my computer it does not start the install process. I can view the files on my D drive but do not know which one to pick to run the install.  We just got a new computer so I am trying to inst

  • For some reason my itunes will not open because it says that I need Quicktime 7.5.5 or later which I have installed. Any suggestions?

    I recently had my computer cleared out and for some reason I am getting an error when I try to open my iTunes. It says that I need to install Quicktime 7.5.5 or later which I have installed and I keep getting this error mesage. Any suggestions? Also

  • XMP basics - Creating custom file for catalogue

    Hi, I have read other discussions, but fall at the first herdle. From what I undersand XMP can embed custom data int your images. This is great for me. I have a database of rugs (excel format), and unnassociated images. I would like to find a way to

  • Form parameters

    Hi, I am a new user to dev2000, i am struck at passing parameters to the reports, i have used lexical referrences, to the where clause, in the query that i have written in reports builder. It created a user_parameter of that where_clause. now i am tr