How to change a date to sunday prior to any date

Hi All,
I have a requirement to change a date to sunday prior to any date. for example,
If date is 6/30/08 , then i need to change it to 6/29/08. If date is 6/26/08, then i need to change it to 6/22/08.
How to do the same.
Regards,
Neha

Hi ,
i think u can use this FM
GET_WEEK_INFO_BASED_ON_DATE
Import parameters               Value
DATE                            26.06.2008
Export parameters               Value
WEEK                            200826
MONDAY                          23.06.2008
SUNDAY                          29.06.2008
by using this FM u will get Starting date of that week will come , in this case 23/06, so u need to code like this
last sunday =  mmonday - 1.
regards
Prabhu

Similar Messages

  • How to change the year in a range of column dates to the new year?

    How to change the year in a range of column dates to the new year?

    Depends on the pattern of the dates. The last procedure will work for any pattern, or no pattern at all.
    For examples.the dates are assumed to be in column A, starting at A2
    Sequential dates?
    Enter first updated date in the first cell.
    Enter =A2+1 in cell A3. Copy the cell.
    Select A3 to the end of the list. Paste.
    With the cells still selected, Copy, then go Edit > Paste Values.
    Evenly spaced dates?
    Same procedure as above, but replace +1 in the formula with + and the number of days between dates in the list.
    Randomly spaced dates?
    Select cell B2. Press option-left arrow to insert a (temporary) column to the left of column B.
    Click on the empty cell B2 in the new column. Enter the formula below:
    =DATE(YEAR(A)+1,MONTH(A),DAY(A))
    Copy the cell, then select B2 - Bn where n is the last ow containing a date to be converted. Paste,
    With the cells still selected, Copy.
    Click on A2, then go Edit > Paste values.
    Click on the column B reference tab to select all of column B.
    Hover the mouse over the right end of the reference tab, and click the black triangle when it appears.
    Choose Delete Column from the menu that appears.
    Regards,
    Barry

  • FM to find date 1 year prior to current date.

    Hi All,
    Can anyone suggest a Function Module to fetch the date 1 year prior to current date?
    Thanks in advance,
    Anjum.

    Hi,
    these r the variable names we can use it in reporting side..
    i have given the link for all the sap exit variables..
    http://help.sap.com/saphelp_nw70/helpdata/EN/99/ae22419e2ab167e10000000a155106/frameset.htm
    0CYTCD - is the variale name can be used for 1st date to current date of the year
    i think u r also looking for the same..
    for any further clarifications please reply to this message
    Regards,
    Vijay.

  • How can change my E-mail with out loss any thing ?

    how can change my E-mail with out loss any thing ?

    Calling was a good suggestion. Apple Care had the wrong email address and changing
    it for the Apple Discussions is not linked to Apple Care. The lady at Apple Care corrected
    the email address on my record.
    End of Shaggy Dog Story

  • When I tried to Mail Merge for Data is is not exporting any data.

    HI,
    EBS-12.1.3
    DB-11gR1
    OS - RHEL 5.6
    [With my Login User and SysAdmin Login User] When I enter into to the "People -> Enter and Maintain" Form and then I press the "Export Button", there is error Alert
    Function is not available to this responsibility. Change Responsibilities or Connect to the System Administrator
    I Added the Function "HR ADI Seeded Integrator Form Functions" into the "AE HRMS Manager" Responsiblity. It is also working and Export Data icon is enable.
    Problem:
    But Problem is when I tried to Mail Merge for Data is is not exporting any data.
    ====================================================================
    Steps
    1.Move to the "People -> Recruirment" and then "Request Recruitment Letter" .
    2. Enter the New Request. as
    Letter Name "App. Letter Contract Site",
    Automatic or Manual = Manual.
    Select the Name from the LOVs for the Request for Detail Block.
    3. Press the "Export Data" icon.
    4. Integrator Page Appear with my Custom Integrator Name as "Appointment Letter - Contact Site".
    5. Select the "Word 2003" from the View List. and Reporting is Checked.
    6. Review the Folowing Enteries as:
    Integrator Appointment Letter - Contact Site
    Viewer Word 2003
    Reporting Yes
    Layout App. Letter Contract Site
    Content XXHR_MBE_APP_LET_CONT_SITE_V
    Session Date 2011/08/02
    Mapping XXHR_MBE_APP_LET_CONT_SITE_V Mapping
    7. Press "Create Document" Button.
    8. It will open the Excel 2003 and then Word 2003. But no data down download from the Form.
    9. It open the Mail Merge Letter but no Data is Display.
    ===========================================================
    Note:
    a. I am following the Steps from the Link:"http://apps2fusion.com/at/38-ss/351-generate-recruitment-letters-web-adi".
    b. From the "Desktop Integrator Manager", "Oracle Web ADI", "HRMS Web ADI", it is working fine and Dowload the Data.
    ===========================================================
    Thanks
    Vishwa

    Please try the solution in ("Function not available to this responsibility" Error While Cliclking On Forms Personalisation [ID 1263970.1]) and see if it helps.
    Thanks,
    Hussein

  • How to drop index or truncate partion prior to load data

    I would like to add few sql command prior to execute the load data into table. Basically I would like to mark ununable index on specific partition and truncate that partitiion prior to load data. Please advice me some guideline. Thank you.

    Take a look here
    Re: How to truncate a partition in owb

  • CURRENT YEAR SALES DATE PARAMATER AND PRIOR YEAR SAME DATE RANGE

    I am pulling data from a SQL view dbo.view that has current and historical SOP data by line.  The date paramater is a date range,  uppr date and lower date formulas are in the report.  I need to include prior year SOP data for the same prior year date range in the detail.  I have tried adding the view in twice with no luck, just duplications.  Ultimately I want to supress the detail and only show the totals by customer so it is comparitive.  Thanks for your help.  Jayne

    OK
    lets simplify it
    get a test data source with some simple dates in it.
    get the report logic working.
    it looks like you have the right formula ideas but lets go for
    @upperthisyear
    @upperlastyear
    @lowerthisyear
    @lowerlastyear
    then assuming a date field of {table1.date}
    the record selection would be
    if (@upperthisyeare > {table1.date} and @lowerthisyear < {table1.date}) or (@upperlastyeare > {table1.date} and @lowerlastyear < {table1.date}) then 1 else 0
    I would test this by using it as a formula field with the test data.

  • How can i find the tables which dont contain any data under my database ?

    Can you please suggest me a way to find the tables which dont contain any data under my database ?
    Regards,
    Renu

    Can you please suggest me a way to find the tables which dont contain any data under my database ?
    For the schema that you've logged in to, you could do something like this:
    test@XE>
    test@XE> @test
    test@XE> --
    test@XE> set serveroutput on size 1000000
    test@XE>
    test@XE> declare
      2    n_count  number;
      3  begin
      4    for rec in (select object_name from user_objects
      5                where object_type = 'TABLE')
      6    loop
      7      execute immediate 'select count(*) from '||rec.object_name
      8      into n_count;
      9      if (n_count = 0) then
    10        dbms_output.put_line(rec.object_name);
    11      end if;
    12    end loop;
    13  end;
    14  /
    BONUS
    RUN_STATS
    PL/SQL procedure successfully completed.
    test@XE>
    test@XE>For the other schemas, you could query from dba_objects and probably display the owner as well.
    HTH
    isotope

  • How to change the partition type on a table with data

    Hi
    I have a table, which is partitioned by list on date column. The table contains large volume of data.
    My requirement is to make the list partition into range on the same date column.
    I am working on Oracle10g
    Kindly advice

    partitioned by list on date How many distinct DATE values do you have ? Each DATE value would be a Partition in List Partitioning.
    Why do you need to convert this to RANGE Partitioning ? How many DATE values do you expect in the table in the future ?
    You can use DBMS_REDIFINITION to copy a LIST Partitioned Table to a RANGE Partitioned Table and then switch the tables at the end.
    See examples (where the source table is not partitioned)
    http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php
    http://uhesse.com/2010/02/15/partitioning-a-table-online-with-dbms_redefinition/
    But before converting I would justify why a LIST Partitioned Table be converted to RANGE Partitioned. Do you have Date-Range queries ?
    Hemant K Chitale
    Edited by: Hemant K Chitale on Mar 15, 2013 2:11 PM

  • How to change heading text  for parameter field of type date

    Hi,
        After creating a parameter field with the type " Date Time" when I open the report for entering the parameter then it displays  the given parameter with the following text:
    " Please enter Date in format "yyyy-mm-dd". "
    I want to change it to some other text like as:
    " You have to enter the date and time in format yyyy-mm-dd . "
    Is there any way by which I can change this given header to some other text.
    Let me know if anyone needs some more information in this regard so as to solve my given query soon.

    Hi Garrett,
                  Well first of all I can change only the prompt text that is user defined. I cannot change any parameter as of now whose type is let suppose Date. Since in this case the Business Object itself shows the text which is something like this " Please enter Date in format "yyyy-mm-dd". " .
       Here I want to change this given text to some other format like " You have to enter the date in the format yyyy-mm-dd" or in any other manner.
    Also the current Crystal Report version which I am using is 11.0.0.1282.

  • How to change the safety interval for 0FG_DO01- Special ledger data source

    Gurus,
    Is there a way to change the safety interval for SAP Standard Data source 0FG_DO01(safety Inteval).
    I am only able to display it in RSA2 and not change.
    Appreciate your immediate assistance.
    Thanks,
    Ravi Aananthuni

    You can view it in RSA2. However you may need to  update table ROOSOURCE to change the value of safety interval upper and lower limits.
    Thanks,
    Ravi ananthuni

  • How to create a UDF on BP Master Data that will not save any data?

    I need to create several UDFs on the BP Mater Data screen that will be configured to automatically show a balance of 0-30Days, 31-60Days, 61-90Days etc.
    I am currently able to do this although I cannot seem to find a way to only show the current data without saving it.
    Eg. I have a UDF with an SQL statement that shows the current BPu2019s 0-30Day Balance, but the BP Master Data screen always changes to u2018Updateu2019 every time the UDF balance is updated.
    I am looking for a way to show this information on the BP Master Data screen similarly to the default BP Account Balance without saving the data.
    I am working with SAP B1 8.81 PL09 and B1UP 4.3.0.0. Thank you.

    Thanks Gordon, I appreciate your assistance. I can get all the fields to display as I want them, but my issue is having to save the BP Master Data form every time I wish to move away from it.
    Is there anywhere in SAPB1 that stores a running total of account balance for 30Days, 60Days, etc..? (just to be sure)
    I might also try to create a new tab on the BP Master Data form that shows an SQL Aging Report and see if I can pick up the info from that embedded report.
    Any other ideas would be also appreciated.

  • I will sell my touch. how can i make sure that i dont lose any data but the buyer does not access my info.

    i will sell my touch and get the new one. how can i transfer my apps and ID to the new one and erase my info from the old one?
    thanks!

    Yes.  If you do it through the settings on the iPod and have an older iPod, make sure the iPod is charging either via a computer or wall charger.  It can takes hours to erase an older iPod.

  • I have an iPad 2 and used old Apple ID for iBook app; now it wants to upgrade but I have a new Apple ID, how can I make certain I don't lose any data in my iBooks?

    I have an iPad 2 and used old Apple ID for iBook app; now it wants to upgrade iBook but it is "stuck" on my old ID, yet I already created a new ID but it won't let me update the App.  I have everything backed up on my MacBook so if I delete iBooks on my iPad and retrieve the App under my new ID and then sync with my MacBook, will I still have all of the books, etc.?

    Your purchases are tied to your Apple ID. If you bought all of the books with the old ID then AFAIK you will have to continue to use that ID in order to continue to sync those books to the iPad.
    You have to update the app with the old ID so I don't see how you could keep the books with the new ID. Maybe I am wrong about this, but someone else will chime in I'm sure and correct me if I am wrong.

  • How to change apple ID on iPad without losing any saved pics

    Hello, I gave my wife my iPad 2 with the understanding that as soon as I could afford it I could get a new iPad. I never changed the apple id on her machine and she now has over a thousand pics that she doesn't want to lose and this friday I'm picking up the new iPad. What are my options in regards to the pics? Also there is no iTunes via computer as an option. Thanks

    Why would you believe that changing the ID would cause loss of photos?

Maybe you are looking for

  • HTTP RECEIVER QUERY

    hello everyone, I have to develop a synchronous scenario, SOAP Sender to HTTP Receiver. Soap sender will be passing suppose 2 fields Name and Employeeid and the Http receiver will be replying back the  response with entire employee details (name, id,

  • Lion Causes Stuttering Video, All Formats, All Browsers, On Current Generation MacBook Pro

    Since I installed Lion I've had a problem with video within my browzer almost freezing, i.e., advancing in the manner of a slide slow skipping every couple of seconds to display a video frame as opposed to smoothly playing video. It happens accross S

  • API for Updating AR receipts

    Hi, I need to update the receipts DFF's using API.I checked with Ar_receipt_api_pub,but there is no code for updating receipt.Is there any API to do this, could anyone please help me.. Thanks in Advance.

  • Why my windows 7 when i move up expands to full screen

    My computer HP Intel core 64 bit professional, when I move my windows to the top of the screen it automatically expands to full screen, sometimes I want to use another window and i cant, that is annoying, how to avoid that. This question was solved.

  • OS deployment without DHCP in place. WinPE Needs DHCP?

    Hi We have config manager 2012 R2 integrated with MDT 2013. We have few locations that doesn't have DHCP servers and have static IPs. Does it possible to refresh (TS Will run from within the OS, capture user state, stage the winPE  and reboot the sam