How to get Current week and No of Weeks for each quarter!!

Advertisement

Hi,
As a part of report development I have to derive Current week and No.of Weeks in Curreny Query. Based on these information I have to calculate Phased target (Calculated KYF).
Phased target = (Target for Quarter / No of weeks in Current Quarter) X Current Week.
We have to derive Current Quarter and Current week from  Customer Exit (From Invoice date, which is an entry by Users at report level).
My questions are:
1) We have to derive Two Restricted key figures (by Calweek)  for derving No of weeks for Currnet Quarter and Current week in Query level. Based on this info, we have to derive Calculated kef figure for Phased target.
2) And the output is 6 (ex:- 132008) char length for Current week and we have to pick Week info only and we have to populate RKF created for Current week. How we can achieve this.
3) Regarding the No of weeks per for current quarter, we are writing Customer exit to determine Quarter and no of weeks, but how to bring this info in query level.
4) Is there any standard code available (SAP Exit) to find Current week and No of Weeks in Current quarter.
Regards,
Suresh Molli

Advertisement

Hi Venkat Molli,
Follow the below step for the doing the same:
1. Create a customer exit variable on calweek.
2. Restrict the created variable for respective info object.
3. To Populate the data write code in CMOD.
     in enhancement function module: EXIT_SAPLRRS0_001 -> in Include ZXRSRU01 write the below code:
WHEN '<variable name>'.
     IF i_step = 1.
      CLEAR l_s_range.
      CALL FUNCTION 'RSVAREXIT_0P_CWEEK'
        IMPORTING
          e_t_range = lt_week.
      READ TABLE lt_week INTO l_s_range1 INDEX 1.
      v_last_week = l_s_range1-low+4(2).
      v_last_week =  v_last_week - 1.
      l_s_range1-low+4(2) = v_last_week.
      l_s_range-low      =  l_s_range1-low.
      l_s_range-sign     = 'I'.
      l_s_range-opt      = 'EQ'.
      APPEND l_s_range TO e_t_range.
    ENDIF.
4. Execute the report.
I hope you can handle you issue now.
Assign points if it is helpful.
Regards,
S P.

November 30, -0001

How to get Current week and No of Weeks for each quarter!!

Hi, As a part of report development I have to derive Current week and No.of Weeks in Curreny Query. Based on these information I have to calculate Phased target (Calculated KYF). Phased target = (Target for Quarter / No of weeks in Current Quarter) X

How to get Current row of ViewObject in the DoDML methode

Hi all I have two ViewObject EmplyesView and DeptView How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesViewOK, we can play this game on and on... I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don'

How to get current assigned participant id?

Hi mates, This might be a basic questions, but useful for me :) How to get current assigned participant id from screenflow? Or How to pass it as an argument from interactive activity? Below is what I tried. Participant.id or Instance.participant.id -

Get  current date and time

hello. How can I get current date and time in JAVA? Thanks.Sorry, I mean: how can I get the value of DATE, MONTH, and YEAR of the current date?      Date date = new Date();      System.out.println(date);Read other 4 answers

I have two iMac's on the same desk. Once iMac pairs with both keyboards and mice.  The other pairs with the mouse, but I cannot get the keyboard to connect.  How do I get a keyboard and mouse to connect to each iMac independently?

I have two iMac's on the same desk (about a foot apart). One iMac pairs with both keyboards and mice.  The other pairs with the mouse only; I cannot get the keyboard to connect.  How do I get a keyboard and mouse to connect to each iMac independently

How to get automatic plant and shipping point and storage location

hi, sap gurus, how to get automatic plant and shipping point and storage location automatically into the sales order i have done all the config settings for that but its not appearing automatically. regards, balaji.tHi Balaji... U can get the plant i

I have an Apple I Phone 4S which is great but, can someone help me how to get the photos and videos to my PC which runs on MS XP. I would like to be able to edit and copy to a DVD.

I have an Apple I Phone 4S which is great but, can someone help me how to get the photos and videos to my PC which runs on MS XP. I would like to be able to edit and copy photos and videos to a DVD.Connect your iPhone to your computer. Tp your pc sho

How to get system date and time?

Can someone show me a code on how to get system date and time. Thanks!there is one really easy way to get system time, the api gives a great example of code on this. use gregorian calendar, which you'll find in the api under GregorianCalendar. You on

How to get customer number and name from the SD document

Hi All, Can you please let me know how to get Customer Number and Name from the SD Document? Thanks a lot.... AnilHi, It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in t

How to fetch APPROVER NAME  and approval date dynamically for an user

Hi all.. How to fetch approver name and approval date dynamicall for an user in an email template.. can any help me to sort out this pbm,i am new to IDM.. Thanks in advance..Access policies get a static value.  You can't populate a field with an adap

How to get a wallet (like in Nokia 6600) for Nokia...

Dear All, Can you please tell me how to get a wallet (like in Nokia 6600) for my Nokia E63? Narottam Das Kolkata, IndiaUsing the data from your Excel spreadsheet, this is what I get from the curve-fit functions: Seems like a pretty-good fit to me. I'

How to find data dictionary and oracle schema tables for UTF8 char conversi

I am doing UTF8 char conversition, i got lot of convertable objects,as per document we don't need to worry about data dictionary objects and how to find data dictionary and oracle schema objects for UTF8 char conversition. USER.TABLE Convertible Trun

I need to have endnotes at the end with sections and numbering beginning again for each section. I also need to be able to write Chapter

I need to have endnotes at the end with sections and numbering beginning again for each section. I also need to be able to write Chapter #s above each section of endnotes. How do I do this, please?I have precisely the same problem and am wondering if

Print Multiple copies of report, and resetting Page number for each copy.

Dear frnds! i am using developer 6i reports i have a problem. i want to Print Multiple copies of report, and resetting Page number for each copy" that is 4 copies of an invoice is required 1 - for user copy 2- gate copy 3- accounts office 4- office c

Insert multiple images in one slide and setting dsiplay time for each

Hi, I am using Adobe Captivate4. I could not able to insert multiple images in one slide and set display time for each image. Need help in this regard.This is not about background image. I have 3 images and want to insert in one slide only. I could a

Get the current week and subtract 12 weeks

Hi Experts, Am getting the system current date and getting the current week using the FM->GET_WEEK_INFO_BASED_ON_DATE. Again I want to subtract 12 weeks including the current week. But still confused with the logic. Also I came to know that I can use

How to get current system date and store in db

may i know how to get the current system date so that i can store it into the databasejava.util.Date is NOT deprecated, just most of its methods are. Use new java.sql.Date(System.currentTimeMillis());to get the current date. Note that the date in a c

How to get Current Quarter and Fiscal Quarter for a Date - Fiscal Year starts from 1st April

Hi,  I need to calculate current quarter and fiscal quarter in my Sql query. I have a column for DateTime Datatype.  I need to find out Current Quarter Name like Q12012, Q22012, Q32012, Q42012 and Fiscal Quarter Name as well. Now Fiacal Year starts f

How to get current logged-in user name in data access driver or in universe

In universe, to get the current log in user is via @Variable('BOUSER'). Right now, I need to be able to get the user name in the data access driver. I am writing a customized data access driver because we need to patch some where clause on the the qu

How to get current tab name or tab id or related info?

Hi , I would like to hide/show tabs according to users' page privileges list. So I need get current tab ID or tab Name in runtime environment to know if show/hide it for current user. :APP_USER Could you please provide any info about this requirement