Hi friends.....i need a help regarding date manipulations

I want to know that how can i get the week date ranges of a specified month.
for example: the input is month = 6 and year = 2007
i need the output as 01.05.07 - 07.05.07
                              08.05.07 - 14.05.07
                              15.05.07 - 21.05.07
                              21.05.07 - 27.05.07
                              27.05.07 - 30.05.07
Waiting for your positive response.
Kesavadas T

parameters : month(2), year(4).
data : date type sy-datum.
data : last_date type sy-datum.
data : day(2) value '01', last_day(2).
data : from_date type sy-datum, to_date type sy-datum.
concatenate year month day into date.
CALL FUNCTION 'SG_PS_GET_LAST_DAY_OF_MONTH'
  EXPORTING
    day_in                  = date
IMPORTING
   LAST_DAY_OF_MONTH       = last_date.
last_day = last_date+6(2).
from_date = date.
to_date = date + 6.
while to_date <= last_date.
  write : / from_date, '-', to_date.
  from_date = to_date + 1.
  to_date = from_date + 6.
endwhile.
if from_date <= last_date.
  write : / from_date, '-', last_date.
endif.
This works fine. Hope this solves your problem.
Regards
Anil Madhavan

Similar Messages

  • Need qucik help  regarding date

    Hi, I have table A which has column report_month
    its has values like 10/1/2012, 11/1/2012,12/1/2012
    I try to do the following, apparently both are not working, I just want to retrieve 11/1/2012
    select * from A ehere report_month like (11%)
    or
    select * from A ehere report_month like ('11%')

    Hi,
    949523 wrote:
    Hi, I have table A which has column report_month
    its has values like 10/1/2012, 11/1/2012,12/1/2012
    I try to do the following, apparently both are not working, I just want to retrieve 11/1/2012
    select * from A ehere report_month like (11%)
    or
    select * from A ehere report_month like ('11%')You mis-spelled WHERE.
    If report_month is a DATE (which is the most reasonable data type), then
    SELECT  *
    FROM    a
    WHERE   EXTRACT (MONTH FROM report_month) = 11
    ;will display rows dated November of any year.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • Need a help regarding date

    Dear all,
    SimpleDateFormat simpleDate = new SimpleDateFormat("dd-MMM-yyyy");
              Calendar calendar = Calendar.getInstance();
              int month = calendar.get(Calendar.MONTH);
              calendar.set(Calendar.MONTH, month-1);
              calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));
              System.out.println("Previous Month End Date is :: " + simpleDate.format(calendar.getTime()));From the above code i am able to find the last month end date according to System date .
    But how to find the last month end date of a userdefined date.
    For example,user defined a date as '05-AUG-2009' how can i find the last month end date

    Thanks all,
    Hope this is the solution .
    Any Suggestions will be appreciated
    String dateString = "10/2009";
             StringTokenizer st = new StringTokenizer(dateString,"/");
             String dateStringm = (String) st.nextElement();
             int month = Integer.parseInt(dateStringm);
             String yearStringm = (String) st.nextElement();
             int year = Integer.parseInt(yearStringm);
             System.out.println("month :"+month);
             System.out.println("year :"+year);
             Calendar calendar = Calendar.getInstance();
             calendar.set(year, month,1);
             calendar.set(Calendar.MONTH, month-1);
             SimpleDateFormat dateFormat = new SimpleDateFormat("MM/yyyy");
             String previous_month_end_date =  dateFormat.format(calendar.getTime());
              System.out.println("Previous Month End Date is :: " + previous_month_end_date);
              Calendar cld = Calendar.getInstance();
              cld.set(Calendar.DAY_OF_YEAR,1);
              String year_start_date =  dateFormat.format(cld.getTime());
              System.out.println("First day of year is :: " +year_start_date);

  • Help regarding data element

    I need some help regarding data element ZEXPDT.  I used it in an infoquery that was transported to QAS and it does not exist in QAS.  I thought it might be locked in a transport, but the below screen clip says it is not locked.  It was created in 3/2014.  Thanks.

    Either trick the system, SE11, add a space at end of text desciption and save,
    Or call transport workbench (SE01, SE10) create a transport request or use an existing one, then double-click on a task, switch to modify mode, add a line with R3TR DTEL name of the data element, save, then object list, lock in request/task menu.
    Or SE80, contextual menu of data element. (other functions, write transport entry)
    Regards,
    Raymond

  • Hello I need a help regarding application passbook.I need know if I can download the application passbook as passbook.ipa?

    Hello I need a help regarding application passbook.I need know if I can download the application passbook as passbook.ipa?

    Passbook is an app that's built into the iPhone. It's not availble for the iPad.

  • Need urgent help regarding oracle 8.0

    Hi Guys!!
    This is vishal, and i am working as an oracle developer.
    I would appreciate your help if you could help me solving the below
    issue :
    Right now the database on which we are running our applications is
    8.0 version. We have oracle App server on which all of these j2ee
    applications are running.
    basically our client is trying to move large amount of data to a
    new database probably 10G, so my job is to analyse the code and
    do some modifications to the code, give them a solution to upgrade
    it to 10g
    There are like 10 applications running on oracle app server and the
    database has many old tables, and they need a suggestion regarding
    this upgradation/migration.
    And i specifically want to know about the problems faced during the
    upgradation, and how exactly is the upgradation done(step -by -step
    procedure), because i also have to take care of the data which
    has been stored from many years.
    thanks,
    Vishal

    I find these informations in the Upgrade Guide (upgrading of database and of application programs):
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14238/toc.htm
    Note: direct upgrade from 8.0 to 10g is not supported using tools like DBUA (Database Upgrade Assistant).
    Werner

  • I need your help regarding Macbook Pro with FCS3 via USB

    Sorry for the double posting, I need your help...
    I am producing an independent TV movie. We are shooting in HDV with a Sony Z5.
    Currently I am using a 2007 iMac (1gb) for the FCS3. I am considering buying a Macbook Pro 15' i7, because I need the portability as well as a WD 1TB portable external drive.
    Just when I am about to buy the machine I started to read all about the USB vs. the Firewire. What should I do? The MBP only have one firewire port...if I use an USB portable external drive means that I won't be able to use FCS3 properly and that buying a MBP will mean spending money in something that I won't be able to make it work properly??
    Thanks for your help!!!!

    Hi there,
    As Patrick said its Firewire hubs you should avoid along with directly connecting your media drive via USB. USB hubs are fine for connecting peripherals (keyboards, tablets, mice etc). directly connecting USB media drives is not for streaming video due to their method of sending data in packets rather than as the continuous stream that firewire provides. Firewire hubs just seem to cause all sorts of headaches to those that have used them, I cant give you a specific reason other than splitting the available FW bandwidth (someone with more knowledge on this will have to chime in), its more just inherited practice.
    cheers
    ANdy

  • Help! data manipulation for high speed streaming to disk from multiple boards and multiple channels

    I am using Labview 7.1 and have been trying to capture data from 12 channels simutaneously sampled at 2MS/s each and streaming to disk for up to a minute or more.  The hardware I am using is 2 x PXI 6133 S series boards with a MXI4 link to a Pentium D 2.8 Ghz machine with 2Gb ram.   I have 2 sata drives set up in a raid 0 configuration which should give me hard disk write speed faster or equal to the MXI-4 transfer speed. 
    I have first started off by using the example code "multi device sync - analog input- cont acquisition" which has enabled me to sync the two boards and sample at the required speed. 
    To stream the data to disk, I have first merged the data from each board  together to save it to one file.  I have tried using the storage vi's but I end up with a Daqmx read error (trying to read data that is no longer available).  I have played around with the read data size to the point that I either get a insufficient memory error, or I get the "trying to read data that is no longer available"  error.  I have also tried using the file IO blocks with some success and have found that I have been able to stream to disk only if I configure the daqmx read block to output the data in "raw 1D I16" format and plugging it into the file-write block.  In doing this, I have noticed that using  multiple channels on one daqmx read task, I will get all the channels in one 1D array rather than a 2D array organized by channels.  This makes it messy to read at the end of this, and I also don't want to write another vi to separate the channels, due to the high chance of getting the data mixed or messed up if I happen to change the number of channels on a board
    Is there a cleaner way of streaming this data to disk and keeping the channel data separated from each other?, and/or is there a better way to capture and handle the data I need? 
    I have attached the vi which I have got to consistantly work streaming to disk using the raw 1D I16 format.
    Thanks in advance to anyone who can help.
    Attachments:
    multidevicesync_analoginput_streamtodisk.vi ‏197 KB

    Hi,
    i can suggest following
    Refer to an example VI called as "High speed data logger.VI"  in conjunction with "High Speed data logger reader.vi" in Labview examples. Alhrough the logger might be in Tradiditional Daq format, it can be quite easily converted to Daq Mx format to store data in Binary (I32 format) . I have used this for many of my applications and i have found that the data retrieved does not have any "messups".
    Why not keep a seperate file for each card? This way, you do not have to load your application with extra process. You only have to acquire and save. After saving in Binbary format, you can retrive it offline, convert it to ascii format and merge the data files of various cards to get one consolidated ascii data file.
    hope this helps
    Regards
    Dev

  • Help With Date Manipulation

    Hi Everyone,
    I need help with oracle dates. I would like to format the following dates and keep it as a DATE datatype NOT char.
    1/10/2007 8:57:45 PM TO 1/10/2007 (only the data part of SYSDATE)
    1/10/2007 8:57:45 PM TO 1/1/2007 (first of the month)
    If I use the To_Char function, it will return a character string. The problem is that I need to retain the DATE datatype so I can join this query to tables with date fields.

    This?
    sql>
    select trunc(sysdate)
    from dual;
    TRUNC(SYSD 
    01/11/2007                                                                                                                                                                           

  • In urgent need of help regarding getting month name and dates

    Hi Experts
    I have a table called MONTHLYBILL with Column TRANSACTIONMONTH. I need one query / function / SP to do return ouput based on following combination. I am using Oracle 9i
    Have researched on various forums, documents but unable to get the desired output. Finally here in hope of help.
    Input
    From Date: 06/01/2011
    To Date: 12/03/2011
    Output
    Month: DECEMBER-2010 (previous month of From Date). Now if DECEMBER-2010 is not available in table, then returns the
    month which is available immediately the month preceeding DECEMBER-2010
    Begin Date: 01/01/2011 (1st day following the month returned in output)
    End Date: 31/03/2011 (last date of month based on input To Date)
    Input
    From Date: Null
    To Date: 12/03/2011
    Output
    Month: First available transactionmonth in DB (say JANUARY-2010)
    Begin Date: 01/02/2011 (1st day following the month returned in output)
    End Date: 31/03/2011 (last date of month based on input To Date)
    Input
    From Date: Null
    To Date: Null
    Output
    Month: First available transactionmonth in DB (say JANUARY-2010)
    Begin Date: 01/02/2011 (1st day following the month returned in output)
    End Date: Current month's last date

    What is your application release?
    I am in big trouble now.. can anyone help....
    I have a backup of an EBS instance, lets say it was taken one month ago, and now we got some datas lost in the current production server..
    some one deleted some datas...
    Now we need some specific data from the old backup and restore it to the production
    or can it be restored? please help me guys...What kind of data? What is the table name?
    Since this is a production issue, I would suggest you log a SR.
    Thanks,
    Hussein

  • Need some help regarding value date

    hiii experts...i want little clarification about value date and its effects... i searched scn and google but my issue is like...when we receive cheque today i.e 11/06/2014... it will be come in bank a/cs nearly on 14/06/2014... so if we write the value date 14/06/2014... will that bank ledger show effect on 14/06/2014... moreoveer the user posted a entry development server for 1/3/2014 and gave value date of 1/4/2014.. now in faglb03... how it will reflect..i know its basic question but i didnt find any solution through searching soo posted... please guide me..
    Regards
    Abhay

    hey mani... thankss for the reply... its shows the meaning which i understood but the effect in ledger... when it will show... value date or posting date??
    e.g
    a customer gives cheque today 11/6/2014.. user deposits cheque today and it will come into bank account near on 14/6.2014..
    IN SAP
    user does entry today i.e 11/06/2014
    in bank g/l... he gives value date 14/06/2014... now when he posts the entry... the entry will shown in ledger on 11/06/2014... but the actual amount will come in 14/06/2014... soo my question is ... whts the user of value date then if he is posting the document on posting date

  • Need your help regarding Conditional Chart Data formatting

    I have just started using BI, so I am sorry if what I am asking is a FAQ or a very simple question.
    I have a Line Bar Combo chart whose bars I have colored differently according to some conditions. When I drill down from a year/month series to the day of a particular month, though, the conditional formatting is lost.
    http://img141.imageshack.us/img141/5677/biimage.jpg
    Can anyone suggest me if I am missing something in the program options or if there is any workaround to this behavior?
    Thanks a lot in advance.

    Letz say you have colored the year black when it is 2008 and you display it in the graph and while you drill down from year to quarter in the back ground an adiitional column will be added (Quarter) and the conditional formatting will be still there for the year but will be very small(like a dot) as your quarter is exposed on the X axis.
    The deeper you drill the wider your x-axis will be and the smaller your formatting looks.
    You cant controll the drill. It will mimic what is present in the compound layout set up at the parent level.If you need to avoid multiple columns appearing on your X-axis and do some changes to your graphs then you need to navigate
    instead of drill. if the report is 3 levels deep then it has to be 3 diff reports(maintenance will be high)
    It will be seemless to the users whether you navigate or drill. Just a suggestion. There are some things which we need to compromise :)
    Thanks
    Prash

  • I need some help Regarding Cumulative totals

    Hi ,
    i have a requirement
    1) we have columns calender Periods and actual to date. The requirement is we need cumulate the actual to date. i have applyed RSUM function in column formula.
    2) it is working fine. But again the requirement is this cumulative solution is changed based on selected calender periods. but this is not expected.
    3) ex:-
    calender period actual Units Cumulative Units
    oct - 2010 10 10
    Nov-2010 9 19
    Dec-2010 15 34
    Jan-2011 25 59
    Feb-2011 12 71
    March-2011 19 90
    April - 2011 13 103
    May - 2011 18 121
    June - 2011 24 145
    this is the reqiurement but i have a Prompt Like
    i hve selected resource categery some xyz and stert period is Jan -2011 and end period is May - 2011
    the values disply's like bellow
    Resource Category start Period End Period
    xyz Jan - 2011 May - 2011
    Jan-2011 25 25
    Feb-2011 12 37
    March-2011 19 58
    April - 2011 13 71
    May - 2011 18 89
    But this is not actual cumulative units the actual value for Jan 2011 cumulative value is 59 not 25
    can any one help me regarding this issue
    regards,
    ramesh

    Hi,
    Refer this link abt iview properties & set authorization ...
    http://help.sap.com/saphelp_nw04/helpdata/en/13/81a66d100011d7b84b00047582c9f7/frameset.htm
    Color- you have to change portal theme...
    Width- create a new Loyout..
    Regards,
    Senthil K.

  • Need URGENT help on DATA PACKAGE

    Hi team,
    When we extract the data from the data source it's getting as a package by package before start process i need to add all the packages into one internal table .
    How do i do that ?.
    Pl help me it's URGENt appreciate your response. thanks.
    Regards,
    Senthil

    hi,
    you need to do the process in source system or BW.
    if it is in source system, extract through program/function module that coolects all the data package and process there and push to BW once procee is over.
    if it is to be done in BW- i hope in the start routine u can do only by package by package.
    please give ur actual requirment so that others can give suggesstion.
    Ramesh

  • Hi friends i need ur help for these queries

    Hi friends
    Its urgent
    I have some queries
    1 Tell me the work of Sd consultants in the first stage and second stage
    2 who prepares Bule print and what is the involvement of sd consultants.
    3 In the fourth stage who will do all the testing and what is the need of these testing just like integration, unit testing.
    4 in the implementation how sd consultants inetract with client or how they trained them
    5 tell me the involvement of Sd consultants in asap methodology in each and every satge  in breif
    6 What kind of developments did by sd consultants in implementation
    with best of luck

    Hello Srikanth,
    For most of the query the following link will be helpful.
    http://sap-img.com/general/role-of-a-sap-functional-consultant.htm
    <b>1 Tell me the work of Sd consultants in the first stage and second stage</b>
    The first stage (project preparation) is mainly involves highlevel project planning, defining project scope, project milestones, team building. The functional consultant will not be involve much in this stage as it is high level planning for project.
    <b>2 who prepares Bule print and what is the involvement of sd consultants.</b>
    Pl. refer the above link
    <b>3 In the fourth stage who will do all the testing and what is the need of these testing just like integration, unit testing.</b>
    http://sap-img.com/general/role-of-sap-consultant-in-testing.htm
    <b>4 in the implementation how sd consultants inetract with client or how they trained them</b>
    Functional consultant will mainly train the Super user or power user (if defined in project scope) or they will get trained by SAP academy. Functional consultant will provide formal class room training to the Super or power users
    <b>5 tell me the involvement of Sd consultants in asap methodology in each and every satge in breif</b>
    Refer the above link.
    <b>6 What kind of developments did by sd consultants in implementation</b>
    Functional consultant mainly involve in designing the business process and configuration of SAP system to meet their business process. If there is any GAP (not meeting requirement by std SAP) then functional consultant will suggest user exit / enhancement /  developement to the technical person (developer - ABAPer) to develop the objects.
    The following link will help you a lot to give an idea about the implementation project.
    http://sap-img.com/sap-implementation.htm
    Hope this helps.
    Regards
    Arif Mansuri
    Reward if answer is helpful.

Maybe you are looking for

  • Extremely Slow USB 3.0 Speeds When Transferring Large Amounts of Video

    Hi there, I am transferring large amounts of footage (250GB-1.75TB chunks) from 5x 5400rpm 2TB drives to 5x 7200rpm 2TB drives simultaneously (via 6x USB 3.0 connections and 4x SATA III, with copy/paste in explorer) and the transfer speeds are incred

  • What cable to buy to hook up my macbook pro to pc input

    Hi, I recently purchased a Samsung HDTV and a macbook pro. The Samsung has a PC input in the back, so I was wondering which cable I need to buy to hook these two up? Thank you.

  • How to get onChange functionlity in webdynpro java....?

    HI ALL, How to get onchange functionality(Like in HTML)  when i click on  inputfield(F4 -Help value) in web dynpro java . For Inputfield in Properties we are havaing only OnEnter Event only there .  Ex : I Have 3 Fields 1. 2-  Inputfields and 1- F4 H

  • OAS 4.0.8.1 on Windows NT 4.0

    Hello All! I have some problems with JServlet Cartrige confuguration. When I am trying to edit MyApplication->Configuration->Web Parameters I get an error: "Error encountered while executing processor oracle.OAS.Services.ServerApp.Display". I have al

  • "Internal Error" when Reader tries to open

    Hi all, "Internal Error" message shows up whenever a non admin user tries to open a PDF or the reader directly. Then i see this is the event logs. Event Type:    Error Event Source:    Application Error Event Category:    (100) Event ID:    1000 Date