Calendar by date selection

Hi,
I have a question, if I want to constrain some date characteristic in a report in query designer, then calendar displays. But I need  that only relevant dates are displyed, do you know, what to do?
Thanks
   RH

Hi dear !
What do you mean with 'relevant dates' ?
Go to infoobject definition and look in the Business Explorer tab the field 'Query Execution Filter value selection' (only values in infoprovider...)...
Hope it helps!
Bye,
Roberto

Similar Messages

  • Populate select list when a date selected from date picker in tabular form

    Hi Guys,
    I have a situation where user picks a date from a date picker in tabular form.
    So as soon as he picks a date say 05/31/2011 from the date picker I want to populate a select list with 2 values : Tuesday AM , Tuesday PM.
    I have gone through the forums a lot and figured we can write a Dynamic Action using JQuery Selector. But I am not sure how to figure out the day from a date picker.
    I appreciate if some one can give your thoughts on how to proceed. It seems to be simple but looks like a tricky one. I am not familiar with writing Java Script.
    Thanks ,
    Raj

    I was thinking your date selected from CALENDAR ended in a list_item.
    I don't know I thinking that
    well,
    :master_block.itemdate is your text_item where calendar return date selected.
    and then , following Gerd's step
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :master_block.itemdate := calendar (.........);
    go_block ('master-block');
    execute_query;
    end;
    or set a global or parameter variable date selected from calendar :parameter. xxxxxx
    in a PRE-QUERY
    :master_block.itemdate := :parameter. xxxxxx
    and
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :parameter. xxxxxx := calendar( ....);
    go_block ('master-block');
    execute_query;
    end;
    regards

  • Excute_query when new date selected from calender

    hi,
    i have a mater detail form. form is displaying current day values as default.
    i put a calendar to form for users can be select date.
    now,
    i want to excute_query when new date selected from calender.
    i writed below code to text_item(calendar) when_validate_item trigger but it nor woring
    .giving frm-40137 error.
    code is;
    :parameter.GUNLUK_TARIH := Name_In('PARAMATRELER.TARIH_SON');
    SET_RECORD_PROPERTY(1,'XXMOB_YAPBOZ_TAHTASI_GV',STATUS,QUERY_STATUS);
    go_block('XXMOB_YAPBOZ_TAHTASI_GV');
    DO_KEY('Execute_query');
    any help please
    best regards
    aykut

    I was thinking your date selected from CALENDAR ended in a list_item.
    I don't know I thinking that
    well,
    :master_block.itemdate is your text_item where calendar return date selected.
    and then , following Gerd's step
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :master_block.itemdate := calendar (.........);
    go_block ('master-block');
    execute_query;
    end;
    or set a global or parameter variable date selected from calendar :parameter. xxxxxx
    in a PRE-QUERY
    :master_block.itemdate := :parameter. xxxxxx
    and
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :parameter. xxxxxx := calendar( ....);
    go_block ('master-block');
    execute_query;
    end;
    regards

  • How to put up a calendar in VI for date selection?

    Hi all,
    I need to put up a calendar in my VI for date selection to view historical data like we find on websites of travel agents?
    & also guide me how to get this kind of calendar.....
    please guide me...
    Thanking You,
    Vaibhav Gandhi
    B.E. Instrumentation & Control,
    INDIA
    Solved!
    Go to Solution.

    Thank you so much GURU for your very quick & accurate reply.
    Further I need to know, that how I can remove the word 'value' from indicator? i.e. it is giving "Value -> 6/1/2009" on indicator.. I just need '6/1/2009' on indicator...
    Can it be possible?
    Thanks,
    Vaibhav Gandhi
    B.E. Instrumentation & Control,
    INDIA

  • Calendar...list function shows only events for date select instead of events from that date forward.

    Calendar list function shows only events for date selected....instead of events for date selected and events forward from that date.  Is there a setting change needed?  Help!

    Hi,
    Did you check that your universe object referring "Date of Completion" has Date data type?
    Can you also provide the BOE verson you are using?
    I remembered that the calendars were not displayed in XIR2 version.
    Didier

  • I have a question about General Data Selection in Report Painter

    Please help me out. Thi is the question....here it goes.
    In a Report in ReportPainter, I have in the General Data Selection the following selected characteristics. They are:
    Ledger = 0
    Record Type = 0
    Version = 1
    Fiscal Year = Z-ANOACT
    Period = (1CPERIV, 1CPERIB)
    So that we have the next screen in the Report’s execution.
    Fiscal Year : 2006
    From Period : 1
    To Period : 12
    Note:
    *Z-ANOACT = Variable so that with a user-exit calculates the actual year. Right now is 2006.
    *1CPERIV = This From-Period Variable is referenced to CCSS Table and PERBL Field Name. Its default value is 1.
    *1CPERIB = This To-Period Variable is referenced to CCSS Table and PERBL Field Name.
    Its default value is 12. Rigth now, we are in the fiscal month 5 (November).
    Id like to filtrate information from January,2006,Period:07 to November,2007,Period:05.
    I mean I work with the fiscal calendar because the information to get from the table is saved due to this calendar.
    The Fiscal Calendar is from July to June:
    Month          Period     Year
    January          07     2006     
    February     08     2006
    March          09     2006
    April          10     2006     
    May          11     2006                   
    June          12     2006
    July          01     2007
    Augost          02     2007
    September     03     2007     
    October          04     2007
    November     05     2007
    December      06     2007
    Right now, we are in November , 2006 (month=11) but according to the fiscal calendar we are in November, 2007 (month=5).
    How I can accommodate my variables or what I am doing wrong so that I can select information from periods 7 to 12, 2006 ( January to June, 2006) and information from periods 1 to 5, 2007 (July to November, 2007) having the screen cited above so that report painter adds the 2 ranges.
    I cannot do it with the criteria selection cited above because I only have a year and a range of periods and my end-user doesnt want to run my report twice:
    One run with periods 7 to 12, 2006 and
    Another run with periods 1 to 5, 2007 and then to add the 2 reports in excel to form a report.
    Hed like something in my screen like this……
    Fiscal Year = 2006
    From period = 7
    To Period = 12
    Fiscal Year = 2007
    From period = 1
    To Period = 5
    And then report painter will add the 2 ranges.
    Many Thanks if you know anything that can help me, please let me know.

    Please help me out. Thi is the question....here it goes.
    In a Report in ReportPainter, I have in the General Data Selection the following selected characteristics. They are:
    Ledger = 0
    Record Type = 0
    Version = 1
    Fiscal Year = Z-ANOACT
    Period = (1CPERIV, 1CPERIB)
    So that we have the next screen in the Report’s execution.
    Fiscal Year : 2006
    From Period : 1
    To Period : 12
    Note:
    *Z-ANOACT = Variable so that with a user-exit calculates the actual year. Right now is 2006.
    *1CPERIV = This From-Period Variable is referenced to CCSS Table and PERBL Field Name. Its default value is 1.
    *1CPERIB = This To-Period Variable is referenced to CCSS Table and PERBL Field Name.
    Its default value is 12. Rigth now, we are in the fiscal month 5 (November).
    Id like to filtrate information from January,2006,Period:07 to November,2007,Period:05.
    I mean I work with the fiscal calendar because the information to get from the table is saved due to this calendar.
    The Fiscal Calendar is from July to June:
    Month          Period     Year
    January          07     2006     
    February     08     2006
    March          09     2006
    April          10     2006     
    May          11     2006                   
    June          12     2006
    July          01     2007
    Augost          02     2007
    September     03     2007     
    October          04     2007
    November     05     2007
    December      06     2007
    Right now, we are in November , 2006 (month=11) but according to the fiscal calendar we are in November, 2007 (month=5).
    How I can accommodate my variables or what I am doing wrong so that I can select information from periods 7 to 12, 2006 ( January to June, 2006) and information from periods 1 to 5, 2007 (July to November, 2007) having the screen cited above so that report painter adds the 2 ranges.
    I cannot do it with the criteria selection cited above because I only have a year and a range of periods and my end-user doesnt want to run my report twice:
    One run with periods 7 to 12, 2006 and
    Another run with periods 1 to 5, 2007 and then to add the 2 reports in excel to form a report.
    Hed like something in my screen like this……
    Fiscal Year = 2006
    From period = 7
    To Period = 12
    Fiscal Year = 2007
    From period = 1
    To Period = 5
    And then report painter will add the 2 ranges.
    Many Thanks if you know anything that can help me, please let me know.

  • Calendar month dates in horizontal line

    Is there anyway to show calendar month dates in horizontal line?
    First line will have dates and then second line will have day i.e Sat, Sun, Mon.......
    1 2 3 4 5 6 7 8 9 ........31

    orion_123 wrote:
    Is there anyway to show calendar month dates in horizontal line?
    First line will have dates and then second line will have day i.e Sat, Sun, Mon.......
    1 2 3 4 5 6 7 8 9 ........31You can do all sorts of things if you put your mind to it... e.g.
    SQL> break on month skip 1
    SQL> set linesize 200
    SQL> set pagesize 2000
    SQL> column month format a20
    SQL> column week format a4
    SQL> with req as (select '&Required_Year_YYYY' as yr from dual)
      2      ,offset as (select case when to_char(trunc(to_date(yr,'YYYY'),'YYYY'),'IW') in ('52','53') then 1 else 0 end as offset from req)
      3  select lpad( Month, 20-(20-length(month))/2 ) month,
      4         '('||week||')' as week, "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"
      5  from (
      6    select to_char(dt,'fmMonth YYYY') month,
      7    case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
      8         when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
      9         when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
    10         else to_char(to_number(to_char(dt,'iw'))+offset) end as week,
    11    max(decode(to_char(dt,'d'),'1',lpad(to_char(dt,'fmdd'),2))) "Mo",
    12    max(decode(to_char(dt,'d'),'2',lpad(to_char(dt,'fmdd'),2))) "Tu",
    13    max(decode(to_char(dt,'d'),'3',lpad(to_char(dt,'fmdd'),2))) "We",
    14    max(decode(to_char(dt,'d'),'4',lpad(to_char(dt,'fmdd'),2))) "Th",
    15    max(decode(to_char(dt,'d'),'5',lpad(to_char(dt,'fmdd'),2))) "Fr",
    16    max(decode(to_char(dt,'d'),'6',lpad(to_char(dt,'fmdd'),2))) "Sa",
    17    max(decode(to_char(dt,'d'),'7',lpad(to_char(dt,'fmdd'),2))) "Su"
    18    from ( select trunc(to_date(req.yr,'YYYY'),'y')-1+rownum dt
    19           from all_objects, req
    20           where rownum <= add_months(trunc(to_date(req.yr,'YYYY'),'y'),12) - trunc(to_date(req.yr,'YYYY'),'y') )
    21        ,offset
    22    group by to_char(dt,'fmMonth YYYY'),     case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
    23                                                  when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
    24                                                  when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
    25                                                  else to_char(to_number(to_char(dt,'iw'))+offset) end
    26    ) x
    27  order by to_date( month, 'Month YYYY' ), to_number(x.week)
    28  /
    Enter value for required_year_yyyy: 2012
    old   1: with req as (select '&Required_Year_YYYY' as yr from dual)
    new   1: with req as (select '2012' as yr from dual)
    MONTH                WEEK Mo Tu We Th Fr Sa Su
        January 2012     (1)                     1
                         (2)   2  3  4  5  6  7  8
                         (3)   9 10 11 12 13 14 15
                         (4)  16 17 18 19 20 21 22
                         (5)  23 24 25 26 27 28 29
                         (6)  30 31
       February 2012     (6)         1  2  3  4  5
                         (7)   6  7  8  9 10 11 12
                         (8)  13 14 15 16 17 18 19
                         (9)  20 21 22 23 24 25 26
                         (10) 27 28 29
         March 2012      (10)           1  2  3  4
                         (11)  5  6  7  8  9 10 11
                         (12) 12 13 14 15 16 17 18
                         (13) 19 20 21 22 23 24 25
                         (14) 26 27 28 29 30 31
         April 2012      (14)                    1
                         (15)  2  3  4  5  6  7  8
                         (16)  9 10 11 12 13 14 15
                         (17) 16 17 18 19 20 21 22
                         (18) 23 24 25 26 27 28 29
                         (19) 30
          May 2012       (19)     1  2  3  4  5  6
                         (20)  7  8  9 10 11 12 13
                         (21) 14 15 16 17 18 19 20
                         (22) 21 22 23 24 25 26 27
                         (23) 28 29 30 31
         June 2012       (23)              1  2  3
                         (24)  4  5  6  7  8  9 10
                         (25) 11 12 13 14 15 16 17
                         (26) 18 19 20 21 22 23 24
                         (27) 25 26 27 28 29 30
         July 2012       (27)                    1
                         (28)  2  3  4  5  6  7  8
                         (29)  9 10 11 12 13 14 15
                         (30) 16 17 18 19 20 21 22
                         (31) 23 24 25 26 27 28 29
                         (32) 30 31
        August 2012      (32)        1  2  3  4  5
                         (33)  6  7  8  9 10 11 12
                         (34) 13 14 15 16 17 18 19
                         (35) 20 21 22 23 24 25 26
                         (36) 27 28 29 30 31
       September 2012    (36)                 1  2
                         (37)  3  4  5  6  7  8  9
                         (38) 10 11 12 13 14 15 16
                         (39) 17 18 19 20 21 22 23
                         (40) 24 25 26 27 28 29 30
        October 2012     (41)  1  2  3  4  5  6  7
                         (42)  8  9 10 11 12 13 14
                         (43) 15 16 17 18 19 20 21
                         (44) 22 23 24 25 26 27 28
                         (45) 29 30 31
       November 2012     (45)           1  2  3  4
                         (46)  5  6  7  8  9 10 11
                         (47) 12 13 14 15 16 17 18
                         (48) 19 20 21 22 23 24 25
                         (49) 26 27 28 29 30
       December 2012     (49)                 1  2
                         (50)  3  4  5  6  7  8  9
                         (51) 10 11 12 13 14 15 16
                         (52) 17 18 19 20 21 22 23
                         (53) 24 25 26 27 28 29 30
                         (54) 31
    64 rows selected.
    SQL>That's just an example, but yes, of course you can do it. Oracle provides excellent DATE functionality.

  • I have a question to ask you about General Data Selection in Report Painter

    Please help me out. Thi is the question....here it goes.
    In a Report in ReportPainter, I have in the General Data Selection the following selected characteristics. They are:
    Ledger = 0
    Record Type = 0
    Version =  1
    Fiscal Year = Z-ANOACT
    Period = (1CPERIV, 1CPERIB)
    So that we have the next screen in the Report’s execution.
    Fiscal Year : 2006
    From Period : 1
    To Period     : 12
    Note:
    *Z-ANOACT = Variable so that with a user-exit calculates the actual year. Right now is 2006.
    *1CPERIV = This From-Period Variable is referenced to CCSS Table and PERBL Field Name. Its default value is 1.
    *1CPERIB = This To-Period Variable is referenced to CCSS Table and PERBL Field Name.
    Its default value is 12. Rigth now, we are in the fiscal month 5 (November).
    Id like to filtrate information from January (2006) to September (2007). I mean I work with the fiscal calendar because the information to get from the table is saved due to this calendar.
    The Fiscal Calendar is from July to June:
    July = 1
    August = 2
    September = 3
    June = 12
    How I can accommodate my variables or what I am doing wrong so that I can select information from periods 7 to 12, 2006 ( January to June, 2006) and information from periods 1 to 3, 2007 (July to September, 2007) having the screen cited above and having the information selected added.
    I cannot do it with the criteria selection cited above because I only have a year and a range of periods and my end-user doesnt want to run my report twice:
    One run with periods 7 to 12, 2006 and
    Another run with periods 1 to 3, 2007
    Hed like something in my screen like this……
    Fiscal Year = 2006                                                
    From period = 7
    To Period     = 12
    Fiscal Year = 2007                                                
    From period = 1
    To Period     = 3
    And to get the report added.
    Many Thanks if you know anything that can help me, please let me know.

    ABDUL: I understand the ABAP Code but the information is saved in the table according to the fiscal calendar.
    Fiscal Calendar Number of the MonthYear
    January             7                    2006
    February            8                    2006
    March               9                    2006     
    April               10                    2006
    May                 11                    2006     
    June                12                    2006
    July                1                    2007
    Augost              2                    2007
    September           3                    2007
    October             4                    2007
    November            5                    2007     
    December            6                    2007
    Normally, We are in November 2006 (month=11, year 2006).
    However, fiscally; We are November 2007 (month=5, year=2007).
    Important Notes:
    •     The information is saved according to the fiscal calendar in the table.
    •     My end-user wants to filtrate the information from January to November . I mean
    Actual Year  : 2006               Actual Year   :  2007
    From   Period:      7     AND           From    Period:      1
    To       Period:     12               To        Period:       5
    I understand you told me about the ABAP code, for example my characteristics in the general data selection are:
    Actual Year  : 2006
    From   Period: 7
    To       Period: 5   (I would have an error here because From-Period Variable is greater than To-Period Variable)
    According the ABAP code you told me, this would be:
    Actual Year  : 2006
    From   Period: 1
    To       Period: 11
    If I run the report with these last parameters you told me, report painter only would add information from year 2006 and fiscal months 1 to 11 (July to May except June).  We don’t want this, that we want is :
    Actual Year  : 2006               Actual Year   :  2007
    From   Period:      7     AND           From    Period:      1
    To       Period:     12               To        Period:       5
    How can I do this?? My email is [email protected] or [email protected]
    Right now, the end-user runs the report twice and adds the information in excel. One run for :
    Actual Year  : 2006
    From   Period:      7
    To       Period:     12
    And other run with:
    Actual Year   :  2007
    From    Period:      1
    To        Period:       5
    But the question is how you can do it with only a run and in this way:
    Actual Year  : 2006               Actual Year   :  2007
    From   Period:      7     AND           From    Period:      1
    To       Period:     12               To        Period:       5
    Thanks if someone can help me!!

  • Can't find 0FYTLFP OLAP Variable in InfoPackage Data Selection tab on 3.5

    On BW 3.5, when generating an InfoPackage with the datasource as Purchasing Data(80PUR_C01), under Data Selection tab, for the InfoObject 0FISCPER, I selected 7 (OLAP variables)for the Type column, then click the button next to it and under the column of Details for Type to bring up a window, but when expending the OLAP Variable field list, can't find the following value in the list which shows up on BW 3.1:
    0FYTLFP     0FISCPER Cumulated to Last Fiscal Year/Period (SAP Exit)
    How to make the above value show up in the OLAP Variable list?   I thought maybe the variable 0FYTLFP needs to be installed in Business Contents, but there is no variable object type in Business Content.  It sounds like a SAP Exit, but how to make the SAP Exit value show up on BW 3.5?
    Thanks for everyone's input!

    hey Rohit,
    Besides the three variable values in the list on BW 3.5, now I find a new one in the list, called "0E_ROLE     0SR_ROLE     Role (SAP Exit)", I have no idea why this one shows up now.  Now all the four variables in the list are:
    1. 0CML12LM     0CALMONTH     Last 12 Months Excluding the Current Month
    2. 0CMONTH     0CALMONTH     Current Calendar Month
    3. 0E_ROLE     0SR_ROLE     Role (SAP Exit)
    4. 0S_RQMRC     0REQUID     Most Current Data
    0FYTLFP is still not in the list!   We can't try to create BEx query since our BW 3.5 system is just installed and we have not got to the step to ceate a query.  I try the 2nd way you suggested by pressing F6 on this variable with the typed in value 0FYTLFP, get the following msg "BEx variable 0FYTLFP could not be evaluated - No error message", that means it would not work on BEx query as well, right? 
    What could be the reason that we can't see 0FYTLFP variable in our new installed BW 3.5?  Do you think our BASIS missed installing sth?
    Thanks
    Message was edited by: Kevin Smith

  • Date Selection in BW Query

    Hello -
    I am trying to create a query that will show me the most recent cost estimate in BW infocubes 0COPC_C08 or 0COPC_C09, without making any changes to the standard functionality or available characteristics in these cubes.  One of the cubes has available Calendar Day (0CALDAY) as a time characteristic, and the other has Fiscal Year (0FISCYEAR), Fiscal Year/Period (0FISCPER), and Posting Period (0FISCPER3). 
    Any of these would be fine to use, if I could tell it to pull the most recent cost estimate for each material.  For example, material A was costed on 1/1/08, 4/1/08, and 5/1/08.  Material B was costed on 1/1/08.  If I run the query today, I want it to show me the most recent cost estimate for each material u2013 5/1/08 for material A, and 1/1/08 for material B.
    Does anyone know if there is a way to limit the date selection in this manner?
    Regards,
    Sydnie

    END date=FormatDate(ToDate(Right([DateD];Pos([DateD];";")+1);"MM/dd/yyyy hh:mm:ss A");"dd/MM/yyyy")
    the above formula wont work when we enter 9/12/0214 or 9/2/2014
    so use this formula
    Substr([DateD];Pos([DateD];";")+1;Length([DateD]))
    END date=FormatDate(ToDate(Substr([DateD];Pos([DateD];";")+1;Length([DateD]));"MM/dd/yyyy hh:mm:ss A");"dd/MM/yyyy")
    the above formula is work fine

  • Date selection in query

    Hi All,
                  I am getting error while executing one query in Bex.
    the error message is SYST:Date 11.00.2008 not expected(after that I was thrown out of the system)
    Date selection is handled by a variable on  Fiscal Year / Period called Bespoke Fiscal Period . Not really sure how that variable works - and as far as I'm aware, selects the period by referencing the system date ie: if the system date is within January it will select December as the period (so the user always sees data for  the previous completed month).
    Made a couple of crude tests with pretty basic queries and I found that those using that variable fail, whereas typing in 012.2007, 001.2008 at run time will work.   Any thoughts on why the variable stopped working ?  Conflicts with the 2008 calendar maybe ? 
    Thanks in advance,
    Supriya

    Hi Supriya,
    Logically thinking ur requirement is to select the previous month as per the current system date. For that they may be hard coded like taking the current month number and subtracting one from that value. I mean to say as the current month is 01 and might be hard code says 01 minus 1 which will result in 00. This might be the reason for this. Find out the code and check it . if it is so change the code.
    Fine if it helps.
    Thanks
    k

  • Date selection in query : logic needed!

    Hi,
    we have one calendar day depending on which the query result is displayed!
    Now the requirement is such that when user enters one date the query has to generate the result for the multiple date ranges including the one which he has entered.
    example: if user has entered 15/9/2007 then query should not only display the result of the date 15/9/2007 but also the results of  -5 to +2 ( means 10/9,11/9,12/9,13/9 and 14/9 plus 16/9 and 17/9 )
    simlarly other ranges like -8 to + 7 and so on
    How to define this in query?
    Thanks,
    Ravi

    Hello ,
    I need to make a graph conveying the information of the deliveries by comparing the goods issue date and promised date !
    report also requires how many deliveries were on time, how many were late and how many were early!
    for this requirement, i had thought of making a date selection field which is promised date and make furthur more date ranges selections by query it self so that late deliveries and early deliveries also covered in these date ranges.
    -5 to + 2 is that one range which is on time delivery range
    if the delivery is more eally than the -5 days then it is early delivery. even in ealry delivery i want to make how early it is.
    and suppose the delivery has crossed the promised date 2 days more then it is late delivery.
    all has to be acheived by single date selection and there after the logic which takes care of all the date ranges i had explained.
    i am looking for that logic which i am not finding
    Hope this is clear now
    Thanks,
    Ravi

  • My Question On Calendar and Date

    Hi, I am making a query to a table: T_HR_CONTRACT,
    which stores the labor contract of a company.
    END_DATE is a field of table T_HR_CONTRACT. Its type is date.
    Now, I need to search the contract end in each month.
    select * from T_HR_CONTRACT where fEND_DATE >= theStartDayOfCurrenctMonth and fEND_DATE < theStartDayOfNextMonth;
    or
    select * from T_HR_CONTRACT where fEND_DATE >= theStartDayOfCurrenctMonth and fEND_DATE <= theLastDayOfCurrenctMonth;
    How can I utilize the java class Calendar or Date to get
    the first day of current month,
    the last day of current month,
    the first day of next month?
    I am new to Calendar and Date class. Please give me some help!

    Ok, I have solve the problem as following:
    //get the first day of this month, by using StringBuffer, we can enhance
    //the effiency
    StringBuffer today = new StringBuffer();
    Calendar rightNow = Calendar.getInstance();
    today.append(rightNow.get(rightNow.YEAR));
    today.append("-");
    today.append((rightNow.get(rightNow.MONTH) + 1));
    today.append("-01");
    String todayDate = today.toString();
    //get the first day of next month
    StringBuffer next = new StringBuffer();
    //if the month is December, then get the first day of next year!
    if(rightNow.get(rightNow.MONTH) == 11)
    next.append(rightNow.get(rightNow.YEAR) + 1);
    next.append("-01-01");
    else
    next.append(rightNow.get(rightNow.YEAR));
    next.append("-");
    next.append(rightNow.get(rightNow.MONTH) + 2);
    next.append("-01");
    String nextDate = next.toString();

  • What bean for date selection should I choose?

    I need bean for date selection with folowing features:
    1) Period selection
    2) Internatioanization
    I foung some components:
    1) http://www.java-calendar.com/
    (+) supports all need features
    (-) 50$ :(
    2) http://www.toedter.com/
    (+) free, interationalization
    (-) no period selection
    3) http://sourceforge.net/projects/jdatechooser
    (+) free, supports all need features
    (-) project is too young, i'm searching more mature project
    I have no time for long searches, so advise me component please.

    From your own findings it's between 1 and 3, but 3 is "too young" so it looks like 1. Spend the 50.

  • Is it possible to delete data selectively from Business content cubes

    Dear Experts,
             Requesting you to help me out to know, is it possible to delete data selectively from Business content cubes.
    When I'm trying to delete selectively from Business content cubes, the background job gets cancelled with ST22 logs stating
    A RAISE statement in the program "SAPLRSDRD" raised the exception  condition "X_MESSAGE".                                                                               
    Since the exception was not intercepted by a superior program, processing was terminated.  
    and i tried  with few more Technical content cubes but the same thing happens.
    Pls let me know how to selectively delete data from Business content cubes if it's possible?.
    Thanks in advance for your favorable assistance.
    Regards,
    Ramesh-Kumar.

    Hi Ramesh,
    Follow below steps for selective deletion:
    1.     Transaction code: Use the Transaction code DELETE_FACTS.
    2.     Generate selective deletion program:
    A report program will be generated of the given name, here .
    3.     Selection screen:
    Take the deletion program u201CZDEL_EPBGu201D to the transaction code SE38 to see/execute the program.
    After executing it will take you to a selection screen:
    As we need to carry out deletion selective on Calendar week, we need to get the screen field for the field Calendar week. For this, click on the Calendar week field and press F1.
    Click on the technical information button (marked in red box above) you will get below screen:
         ABAP program to carry out the Calendar week calculation
    Problem scenario: As stated earlier the requirement is to delete the data from the cube based on the calendar week. Thus a code must be developed such that the number of weeks should be taken as input and corresponding calendar week should be determined. This calendar week should be then passed to the deletion program in order to carry out the data deletion from the InfoCube.
         Transaction code: Use T-code SE38 in order to create a program.
    Logic: Suppose we need to delete the data older than 100 weeks.
    a.     Get the number of weeks and system date in variables and calculate the total number of days :
    lv_week = 100.      *number of weeks      
    lv_dte = sy-datum.     *system date
    v_totaldays = lv_week * 7.      *total days
    b.     Get the corresponding calendar day from the total days. This is obtained by simply subtracting the total no. of days from the system date.
    lv_calday = lv_dte - v_totaldays. *corresponding calday.     
    c.     Now in order to get the calendar week corresponding to the calculated calendar day we must call a function module 'DATE_TO_PERIOD_CONVERT'. This function module takes input as Calendar day and Fiscal year variant and returns the appropriate fiscal period.
    Get the sales week time elements
      call function 'DATE_TO_PERIOD_CONVERT'
        exporting
          i_date                      = lv_calday
          i_periv                     = lc_sales
        importing
          e_buper                     = lv_period
          e_gjahr                     = lv_year
        exceptions
          input_false                 = 1
          t009_notfound               = 2
          t009b_notfound              = 3.
      if sy-subrc = 0.
        ls_time-calweek(4)      = lv_year.
        ls_time-calweek+4(2)    = lv_period.
      endif.
    v_week = ls_boots_time-calweek.
    Note: We can pass the fiscal year variant which can be obtained from the table T009B.For e.g. here fiscal year variant lc_sales = Z2. LS_TIME will be any table with suitable time units.
    d.     Now we have obtained the required calendar week in the v_week variable. This calendar week is the week till which we need to keep the data. And older data than this week will be deleted. This deletion will be done by the deletion program
    Submitting the Data deletion program for ZEPBGC01 and key field
    SUBMIT ZDEL_EPBG WITH C039 LT v_week.
              Here the calendar week value is submitted to the deletion program ZDEL_EPBG with the screen field of calendar week.
    Hope ... this will  help you..
    Thanks,
    Jitendra

Maybe you are looking for