Variable Exit for fiscal week and weekday previous year

Hi experts.
in a reports I'm entering a date manually through a variable ZDATE1 for current year.
I need to find out the corresponding date last year based on the week number and week day for the entered date.
So, If i enter date 08/21/2009 , and that happens to be week 35 and day 2 for this week. so what would be the calender date for the same week 35 and day 2 in the previous year (2008).
Please help with any functions or methods or syntax...
Thanks

Hi Frank.
Im sure its possible to find the date last year, but it will involve some programming and thinking about time/dates etc, unless you can do a lookup in the factorycalendar or "normal" calendar, stored in the system AND having the number of day info.
But you want to do this on the fly, in the report? I think performance might take a hit...
regards
jacob
Edited by: Jacob Jansen on Oct 8, 2009 8:53 PM
Edited by: Jacob Jansen on Oct 8, 2009 8:54 PM

Similar Messages

  • Custome variable exit for fiscal year/period

    Hello BW Gurus,
    Q1[1,2,3] Q2[4,5,6] Q3[7,8,9] Q4[10,11,12] quarterly periods
    I have a custom variable exit as shown for fiscal year period
           IF LOC_VAR_RANGE-LOW+4(3) =< '003'.
              L_S_RANGE-LOW+4(3) = '001'.
           ELSEIF LOC_VAR_RANGE-LOW+4(3) > '003' AND
                                              LOC_VAR_RANGE-LOW+4(3) =<'006'.
              L_S_RANGE-LOW+4(3) = '004'.
           ELSEIF LOC_VAR_RANGE-LOW+4(3) > '006' AND
                                                LOC_VAR_RANGE-LOW+4(3) =< '009'.
              L_S_RANGE-LOW+4(3) = '007'.
           ELSE.
              L_S_RANGE-LOW+4(3) = '010'.
           ENDIF.
    Now this works fine to give me the Current Quarter ....say if user puts 005/2007 i get the data Current quarter as [4+ 5] i.e. April and MAy data. Now for <b>Previous Period</b> I gave an offset as -3 to -1 inorder to get data for Q1[123] but the requirement is changed and I want the same time period i.e. [1+2] and not the entire quarter since the Current Quarter calculates only for 4 and 5.
    I hope u are getting my point....please give your suggestions will reciprocate with lots of points

    Hi gaurav,
    Basically If I am selecting period 005 I am getting the data for 4 and 5 as Current Quarter i.e. April is the starting period of that Q2.
    Similarly the previous Quarter should also give me data for period 1 and period 2.
    Right now the offset I gave is -3 to -1 on my custom variable so i am getting data for the entire previous quarter which is Q1[1,2,3] but in reality i just want data for period 1and period 2.
    Can you please help me in this
    Appreciate your concern
    Thanks

  • How to get data for current week and previous week using customer exit in Bex.

    Hi everyone,
    I have a scenario in which I need to display data for current week and previous week (based on "sy_datum" the program has to calculate current week and previous week) in Bex using  Customer exit. I have created one variable in Bex Query Designer and I have written code for the variable in CMOD. But it is not working fine, (I know that we can do the same by using offset value in Bex). Can some one guide me how to achieve my requirement using customer exit.
    Thanks in Advance,
    G S Ramanjaneyulu.

    Hi krishna,
    Thanks for your quick reply, can you have a look at my code,
    case i_vnam.
    WHEN 'ZPWK_CWK'.
    ranges : pre_week for sy-datum.
    data : start_date type DATS,
           end_date TYPE dats .
    ************FM TO GET FIRST DATE OF CURRENT WEEK ************************
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        DATE_IN  = sy-datum
      IMPORTING
        DATE_OUT = start_date.   " WEEK FIRST DATE
    end_date = START_DATE + 6.   " WEEK LAST DATE
    END_DATE   = START_DATE - 1.   " PREVIOUS WEEK END DATE
    START_DATE = START_DATE - 7.   " PREVIOUS WEEK START  DATE
    **********PREVIOUS WEEK DATES IN PRE_WEEK******************
    pre_week-SIGN   = 'I'.
    pre_week-option = 'BT'.
    pre_week-LOW    = START_DATE.
    pre_week-HIGH   = END_DATE.
    APPEND  pre_week.
    CLEAR : START_DATE,END_DATE.
    endcase.
    Regards,
    G S Ramanjaneyulu.

  • I am heading overseas shortly for 10 weeks and would like to suspend my iMac desktop email account but receive emails on my iPad. Will taking my email account offline do this? Fozzee46

    I am heading overseas shortly for 10 weeks and would like to suspend my email account on my imac desktop but still receive my emails on my ipad while away. If I take my desktop computer emails offline, will this do it for me.
    Fozzee46

    You may have to contact your email provider or ISP, though you may be able to set up the email account to be used via the portable device you could carry with you in your travels, but access may vary, depending on the data plan you have, if cellular based; if not try a web-mail based account such as gmail and see if your other mail can be forwarded so you can check it via browser online.
    I'm sure there are some options, ones I'd probably not consider. You may find that if your iPad and Mac desktop share an account or sync, email would still be in the Mac's account once it gets back online to the email server.
    Some variables likely exist, so beyond this, I won't speculate further.
    Good luck in this and safe travels!

  • Hi, I am getting a warning message on screen, saying that my iPad hasn't been backed up for 2 weeks, and saying under what circumstances the message appears. My problem is, is that I have backed up iCloud, but am unable to remove the warning.

    Hi,
    I am getting a warning message on screen, saying that myiPad hasn't been backed up to iCloud for two weeks, and advising under what circumstances the message appears. My problem is, is that I have backed it up, but am unable to remove the message, and whilst the message is there, the iPad is frozen, and I cannot do anything.
    Has any other user had such a problem, and if so, how did they rectify it.
    Any advice would be greatly appreciated.
    Thanks in advance.
    clarinet99

    Try this.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up

  • Exit for role determination via exit for scheduling agreement and contract?

    Hi..
    I have a requirement to fetch the agents in run-time for PO,PR,SCHEDULE AGREEMENT, CONTRACT..
    For PO i am using EXIT : - M06E0005
    For PR release i am using EXIT :- M06B0001
    By using above 2 exits i am getting the agents at run-time...
    Same way i need the EXIT for SCHEDULE AGREEMENT and CONTRACT..
    if there is any EXIT for this please share with me..
    Regards,
    Imtiaz Khan

    Hi Imtiaz,
    Ideally you should have your agent determination logic in workflow itself instead of determinining them in EXIT.
    Can you tell me why you are determining agents in exit and how you are making use of it ?
    Also let us know how your workflows are getting trigger for all these documents.
    Regards,
    Ibrahim

  • Business scenarios for daily, weekly and nightly loads!!

    Can any body tell some Business scenarios for daily, weekly and nightly loads where we monitor the loads in Production support.
    Regards
    srikanth.ch

    Hi,
    It all depends on your business needs. In general on daily basis you will load the SD and MM which will cover all the stock and sales done for day. Generally most of the clients use Lo Cockpit extraction for both the modules. FI chains will run on month end for example the AP(Accounts Payable),AR(Accounts Receivable) chains will be run on the month end.
    Some SD datasources : 2lis_13_vdhdr, 2lis_13_vditm, 2lis_13_vdkon - all these to pull billing related data
    Some MM Datasource : 2lis_03_bx and 2lis_03_bf.
    Regards,
    Harish Raju

  • I have a Windows 8.1 and it's even running slow.  I'm a complete novice with computers (I've only had this one for 3 weeks) and I'm probably doing something wrong, but I haven't a clue what....

    I have a Windows 8.1 and it's even running slow.  I'm a complete novice with computers (I've only had this one for 3 weeks) and I'm probably doing something wrong, but I haven't a clue what.
    The tools are not responding when I try to use them.  Some of them work sometimes, but not others and some don't work at all.  I'm in a design class online and I need these tools desperately.  I have an assignment due Monday and I'm losing the whole weekend because Tech Support is only open M-F!
    Any help anyone can give me will be appreciated.
    Thanks,
    Rose Ireland

    Maybe these links provide some pertinent information.
    Optimize performance | Photoshop CS4, CS5, CS6, CC
    Photoshop: Basic Troubleshooting steps to fix most issues

  • My Ipod 5th gen. has been detected by itunes, but could not identified properly, and its been charging for a week and still hasn't come to a full charged. What should I do?

    My Ipod 5th gen. has been detected by itunes, but could not identified properly, and its been charging for a week and still hasn't come to a full charged. What should I do?

    but could not identified properly
    Please clairify.
    charging for a week and still hasn't come to a full charged
    Sounds like you need a new battery.  Take the iPod Nano to an Apple store or an AASP.  Whichever is more convenient for you.
    iPod Repair Pricing

  • My daughter has been in peru for 5 weeks and has her phone on airplane mode and wi-fi and has successfully texted and facetimed when having wi-fi.  Now it is no longer working?  Any ideas?

    My daughter has been in peru for 5 weeks and has her phone on airplane mode and wi-fi and has successfully texted and facetimed when having wi-fi.  Now it is no longer working?  Any ideas?

    Basic Troubleshooting Steps when all else fails
    Quit the App by opening multi-tasking bar, holding down the icon for the App for about 3-5 seconds, and then tap the red circle with the white minus sign.
    Relaunch the App and try again.
    Restart the device. http://support.apple.com/kb/ht1430
    Reset the device. (Same article as above.)
    Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.

  • I'm new at this but I am hoping someone can help me.I have recently been away for 5 weeks and my Tom Tom required updating.When I clicked to update it required a pc.As I didn't have access to a pc it wouldn't work is there any way to do this without a pc?

    Hi, I'm new at this but I am hoping someone can help me.I have recently been away for 5 weeks and my Tom Tom required updating.When I clicked to update it, it required a pc. As I didn't have access to a pc it wouldn't work is there any way to do this without a pc?  I was without this app for 3 weeks!  Thanks, Lea

    The process to update your Tom Tom is a big data file, you will need to be connected to a Wi-Fi network for it to download.  If will take about an hour. 

  • How can I get my ipod nano (6th gen) to stop making a static-y noise when I try to listen to my music? It has been doing this for a week and the music is faint while the static is louder than it.

    It has been doing this for a week and the music is faint while the static is louder than it. I try plugging it in to my iTunes and when I un-plug it, it still makes the loud static noise. I have also tried tapping my knuckle on the back of my ipod nano. This has not damaged it at all nor caused this to my ipod. There is no water damage to the ipod. Only a few scratches from a couple drops. The drops have been on concrete but not at a very high distance. How to I stop this? Do I need to replace my ipod instead?

    Have you tried a different pair of earbuds/headphones to rule out a pair of damaged/faulty ones?  You might also want to make sure the headphones are securely and firmly seated in Nano's headphone jack.  Lastly, check the headphone jack for any signs of debris or damage.  You may need to have the headphone jack replaced either by Apple or a third party repair company.
    I assume this static is present on any track you listen to versus only particular ones?
    B-rock

  • TS4000 I have been away for 2 weeks and a message appears on my iPad which is preventing me open my iPad. "iCloud backup. This iPad has not been backed up in 2 weeks. Backups happen when this iPad is plugged in, locked and connected to Wi-Fi"  Help?

    I have been away for 2 weeks and a message appears on my iPad which is preventing me open my iPad. "iCloud backup. This iPad has not been backed up in 2 weeks. Backups happen when this iPad is plugged in, locked and connected to Wi-Fi"  Help?
    What do I do to get rid of this message as it is preventing me accessing the iPad or closing it down?
    Thanks
    AndyNess59

    Welcome to Apple Support Communities
    Hold Sleep and Home buttons for 10 seconds until your device restarts, so you will be able to use your device again. Finally, open Settings > iCloud > Storage & Backup, and make a backup. The device will be backed up when it's plugged to the charger and connected to your network

  • I have been editing project for two weeks and now I get ghosts of other images fromt eh project coming up in the wrong places even though the thumbnail looks right. Help.

    Help. I have been editing a project for two weeks and now it gets ghosts of ohter images from the project coming up in the wrong places. The thumbnail has the correct image but the image either does not display and its black or an old image or another one shows.

    When I have problems like this I do two things. First I shut down and restart iMovie. Sometimes that rejuggles the date. But I am sure you have been doing that in such a long project.
    The Second thing I do is delete iMovie preferences, which can get corrupted.
    Home-library-preferences-com.apple.imoviepref
    Hugh

  • I was away for 3 weeks and just got back. Put my Mac on charge and after 4 hours it still won't come on. Help!!!

    I was away for 3 weeks and just got back. Put my Mac on charge and after 4 hours it still won't come on. Help

    Rachg wrote:
    Had turned off all power supply incase a socket blew. (happened before) so my mbp was on sleep
    You should have turned your MBP off!  Keeping it on sleep w/o use for 3 weeks makes no sense.  As others have already stated, you will need to take your comp to a repair shop.  More than likely you need a new battery.

Maybe you are looking for

  • Exception setting property value with CGLIB ( in hibernate)

    My hbm.xml file is: <hibernate-mapping> <class name="com.dst.fourx.model.codeModel.CodeGroupDisplay" table="CODE_GROUP_DISPAY1"> <composite-id name="codeGroupDisplayKey" class="com.dst.fourx.model.codeModel.CodeGroupDisplayKey"> <key-property name="n

  • ITunes is giving me a headache.........

    I tried to download the new iTunes and quicktime but this message came up: Quicktime installation failed Error Code : - 3 What's going on? I can't open iTunes because of this..........

  • Radar Charts SSRS

    Hi All, I have requirement to develop a report like below image. Is to possible to develop this kind of reports in SQL Server Reporting services 2008 r2. I have tried with one example but the major grid lines shows only circle it is not changing to b

  • Scheduling agreements / ***.Qty.

    Hello We are working on doing  EDI scheduling agreements with a customer. The thing is that they can not send us a ***.Qty.received in the EDI message. What they do send is the "last delivery" received and the last despatch qty and my question is if

  • Send result e-mail automatically

    Hi, I've just finished my quiz asking a bunch of Word and Excel questions. The questions I added are a combination of Multiple choice questions and blank slides with a click-box (which has to be clicked on the good position to proceed). The results a