How to calculate the quaterly based (in year 4 quater)?

Hi all,
     this is krishna . quarter wise i am calculating .in year  4 quarters .
    i quarter 01.01.2007 to 31.03.2007,
    second quarterly .01.04.2007 to 31.06.2007 ,
     Like this i want calculate.
     that i want to write in select statement .
      this is my own table in that table i have in-period ( date field).
    how to retrieve the this field .
    it very urgent for me.
   Regards,
    krishna.

check the code .
REPORT zforum12 message-id vij.
PARAMETER: DATE LIKE SY-DATUM.
DATA : MON(2) TYPE C.
data : v1 like sy-datum.
data : v2 like sy-datum.
MON = DATE+4(2).
CASE MON.
WHEN '01' OR '02' OR '03'.
WRITE:/ 'FIRST QUARTER'.
perform quarter_dates.
WHEN '04' OR '05' OR '06'.
WRITE:/ '2ND QUARTER'.
perform quarter_dates.
WHEN '07' OR '08' OR '09'.
WRITE:/ '3RD QUARTER'.
perform quarter_dates.
WHEN '10' OR '11' OR '12'.
WRITE:/ '4TH QUARTER'.
perform quarter_dates.
ENDCASE.
form quarter_dates.
if mon = '01' or mon = '02' or mon = '03'.
v1+0(4) = date+0(4).
v1+4(2) = '01'.
v1+6(2) = '01'.
v2+0(4) = date+0(4).
v2+4(2) = '03'.
v2+6(2) = '31'.
write:/ 'Quarter start date', v1.
write:/ 'Quarter end date', v2.
endif.
if mon = '04' or mon = '05' or mon = '06'.
v1+0(4) = date+0(4).
v1+4(2) = '04'.
v1+6(2) = '01'.
v2+0(4) = date+0(4).
v2+4(2) = '06'.
v2+6(2) = '30'.
write:/ 'Quarter start date', v1.
write:/ 'Quarter end date', v2.
endif.
if mon = '07' or mon = '08' or mon = '09'.
v1+0(4) = date+0(4).
v1+4(2) = '07'.
v1+6(2) = '01'.
v2+0(4) = date+0(4).
v2+4(2) = '09'.
v2+6(2) = '30'.
write:/ 'Quarter start date', v1.
write:/ 'Quarter end date', v2.
endif.
if mon = '10' or mon = '11' or mon = '12'.
v1+0(4) = date+0(4).
v1+4(2) = '10'.
v1+6(2) = '01'.
v2+0(4) = date+0(4).
v2+4(2) = '12'.
v2+6(2) = '31'.
write:/ 'Quarter start date', v1.
write:/ 'Quarter end date', v2.
endif.
endform.                    " quarter_dates
just pass the values into ur select v1 and v2 .
regards,
vijay

Similar Messages

  • How to calculate the previous year YTD balance in profit & loss statement

    Dear all,
    I would like to seek for advice on how to calculate the previous year YTD (Year to date) balance in profit & loss statement
    For example, if I enter May 2009, the YTD value should be a sum up of value from Jan to May.
    I have tried the current year YTD could be set in column selection dimension "financial period"
    FACT PER( Code = YearFirst(@Per):@Per )  Order By PER.Code Descending
    Then, I tried the previous year YTD in another column using
    FACT PER( Code = YearFirst(@Per-12):@Per-12 )  Order By PER.Code Descending
    But it failed -> Abnormally display three column, while the financial period I enter 200903 in parameter @Per
    Would anyone kindly help me on that?
    Regards,
    Simon Chiu

    Dear Jim,
    Thanks for your reply.
    However, the problems still cannot be solved.
    My expected output is 1 column listing the YTD value from previous year.
    I have tried two times using both the Code = YTD(@Per-12) and Code = YearFirst(@Per)-12:@Per respectively. However, the Excel display various column.
    I am using Financial Period 200903. In the last three column, it display the data in Financial Period 200901, 200902 and 200903 respectively.
    For the current year, the YTD is correct and show 1 column listing the sum of account in the Financial Period 200901, 200902 and 200903
    Would you kindly advice the code setting and how to set? Also, how I can access the syntax builder?
    Regards,
    Simon Chiu

  • How to calculate the Current APC (Acquisition and Production Cost)

    Hi,
    Please help me how to calculate the Current APC.
    The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
    The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
    The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line “Acquisition Value” and column “Posted values”.
    I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic.
    Please help me.
    Thanks in advance,
    Satish

    Hi,
    you'll find the logic in fm FI_AA_VALUES_CALCULATE
    A.

  • How to calculate the Current APC

    Hi,
    Please help me how to calculate the Current APC.
    The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
    The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
    The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line “Acquisition Value” and column “Posted values”. 
    Thanks in advance,
    Satish

    Hi,
    I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic where it is being done.
    Please help me.
    Thanks in advance,
    Satish

  • Does anyone know how to calculate the impedance using waveforms

    does anyone know how to calculate the impedance using waveforms?

    studentproject wrote:
    the waveforms represent the voltage and current values across a capacitive load. I am trying to find out if there is a way to do automatic calculations using the inputs from the waveforms
    Hopefully a single sinusoid tone.  Otherwise things get really interesting.  Also know that impedance is based on the frequency.  I'll have to dig into this again.  I have not had to calculate an impedance in well over 10 years.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to calculate the quota base quantity in quota arrangement?

    Hi all,
    As we all know, when a new supplier is added in the quota arrangment, we take the help of quota base qunatity so that the new supplier does not get any unfair advantage over the existing suppliers. Would you please help me on how to calculate the quota base quantity or on what basis the quota base quantity is calculated?*
    Regards,
    Ranjan

    Dear,
    Quota arrangement divides the total requirements generated over a period of time among the sources of supplied by assigning a quota.
    Quota u2013 quota is equal to a number and its represents the proportionate of requirements. Total quota of all the vendors is equal to 100% of requirements.
    This quota arrangement is also specific to material and plant level.
    Quota rating = quota allocate quantity + quota base quantity / quota.
    Quota based quantity used only when a new vendor introduced.
    In the as on date situation, the minimum quota ratings will considered as preferred vendor.
    The 2 vendors has 2 same quota rating, the vendor who is having the highest quota will considered first.
    In the running quota, a new source of supply is included. (In situation of short supply) including a new source not means to reduce the quota for existing.
    Regards,
    Syed Hussain.

  • How to calculate the individual sums of multiple columns in a single query

    Hello,
    Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
    Will appreciate any help or suggestion.
    Thanks

    user13667036 wrote:
    Hello,
    Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
    Will appreciate any help or suggestion.
    ThanksLooks like you want a simple group by.
    select
              yr
         ,      mnth
         ,      region
         ,     sum(handled_package)
         ,     sum(expected_missing_package)
         ,     sum(actual_missing_package)
    from test
    group by
         yr, mnth, region
    order by      
         yr, mnth, region;I wouldn't recommend storing your data for year / month in 2 columns like that unless you have a really good reason. I would store it as a date column and add a check constraint to ensure that the date is always the first of the month, then format it out as you wish to the client.
    CREATE TABLE test
         year_month                              date,
        Region                     VARCHAR2(50),
        CITY                       VARCHAR2(50),             
        Handled_Package            NUMBER,       
        Expected_Missing_Package   NUMBER,   
        Actual_Missing_Package     NUMBER
    alter table test add constraint firs_of_month check (year_month = trunc(year_month, 'mm'));
    ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
      2  Values (to_date('2012-nov-12', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
    Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
    ERROR at line 1:
    ORA-02290: check constraint (TUBBY.FIRS_OF_MONTH) violated
    Elapsed: 00:00:00.03
    ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
      2  Values (to_date('2012-nov-01', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
    1 row created.
    Elapsed: 00:00:00.01
    ME_XE?select
      2        to_char(year_month, 'fmYYYY')    as year
      3     ,  to_char(year_month, 'fmMonth')   as month
      4     ,  Region
      5     ,  CITY
      6     ,  Handled_Package
      7     ,  Expected_Missing_Package
      8     ,  Actual_Missing_Package
      9  from test;
    YEAR         MONTH                REGION                         CITY                    HANDLED_PACKAGE EXPECTED_MISSING_PACKAGE ACTUAL_MISSING_PACKAGE
    2012         November             Western                        San Fransisco                       200                       10                      5
    1 row selected.
    Elapsed: 00:00:00.01
    ME_XE?Then you have nice a nice and easy validation that ensures you data integrity.
    Cheers,

  • How to control the measure based on the related dimension.

    Hi Experts,
    In order to improve performance, I have created three kinds of time tables in DB,such as Year .Month, Day.
    Then import them into the physical layer in RPD, and combine them into one dimension in BMM.
    Actually, it has three level fact related with three time tables,so they are also dragged into one fact in BMM,and one column will be corresponding with three column derived from different Fact table in physical layer.
    So I want to know how to control the measure based on the related dimension.
    For example:
    when users drag the Year,Sales column, it will come from Year Dimension and Year Fact Table.
    when users drag the Month,Sales column, it will come from Month Dimension and Month Fact Table.
    when users drag the Day,Sales column, it will come from Day Dimension and Day Fact Table.

    Hi,
    Create a dimension Hierarchy, with Year >> Month >> Day Levels and
    Next Double click on Year Table LTS >> click on Ocntetnt Tab >> set as Year
    same way for Month LTS and Day LTS.
    So now when you select year column then server canknow which LTS to hit and Hits Year LTS.
    Mark If Helpfu/correct
    Thanks.

  • How to calculate the size of web forms in hyperion planning?

    Hi Experts,
    I am trying to calculate the size of planning forms in Hyperion smart view., but i am unable to find out the way to calculate.
    Can you pls explain how to calculate the size of web form in Smart view?
    --- Srini.

    Hi Srini,
    First, here is what Oracle says:
    Data Form Size Estimation:
    To get a rough estimate of data form size, open the data form and select File > Save As from the browser. The size of the .HTML file is the portion of the data form that changes based on grid size. The .JS files remain the same size and can be cached, depending on browser settings. Information such as data form definitions, pages, and .gif files are not compressed when data forms are opened and sent to the Web browser.
    I have not been able to find out using their method.
    In any case, you can find out the size of grid by using below
    1. Right click on the form grid and click "View source"
    2. Save the source file as "Example.html"
    3. Right click the saved file and click "Properties"
    4. The Form size whould be same as that of file..
    Let me know if it helps.
    Cheers
    RS

  • How to Calculate the Actuall work days ....

    Hi Friends,
    how to calculate the Actuall Working days Based on the Joining date for 5day work and 6 days work?
    is there any FM to calculate this?
    Thanks in Advance,
    sudha.

    Hi Sudha,
    In your company , If they are maintaining Time Events then you can get the information of Employee's Presense or Absense from infotype 2011 (Time Events) and Absense from 2001 (Absense)..
    Also Consider Factory Calender for it.. and check out working days..
    Table TEVEN
    Try below FM as well..
    HR_DV_TIMEEVENTS_GET
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • How sap calculate the arrears interest?

    Hi All,
    I am doing the configuration about arreas interest.
    My configuration:
    Interest Type:Item interest calculation
    Calendar type:30/360
    Time-based Terms:
        Credit interest: arrears interest calc
        Premium:0
    Reference Interest Rate Values:1.0
    I make some tests.
    overdue day: 1 day
    overdue_amount |interest|increased_interest
    1000           | 0.834  |            
    2000           | 0.917  | 0.083
    3000           | 1.001  | 0.084
    4000           | 1.084  | 0.083
    Could you help me to find how sap calculate the arrears interest?
    Many Thanks!
    Message was edited by:
            Chen Zhonghua

    Hi
    First u have to define interest calculation types ( i.e. Item interest calculation typeP)
    u have define GL accounts Interest Recevied account
    then u have to define prepare interest areas calculations in that u have to define interest indiacator .
    then
    u have to define refeence interest rates
    define time based terms
    enter interest values
    then u have to define AR calculation of interest on arrears  in that u have to define business transactions
    then u have to assign interest indicator to customer master
    then execute the Interest calculation F.24
    Regards
    Suresh

  • How to calculate the unit for RATE?

    Hey All,
    I am not sure if there is something standard for this or not.
    I am calculating the 'Rate' by using 'Value/Amount' and 'Quantity' as follows -
    Rate == Value /  Quantity
    I need to calculate the unit for the rate as below -
    Rate unit == Value unit (Currency) /  Quantity unit (Base_uom) 
    (for example -
    if value is 1000 USD and quantity is 10 TO then Rate should come out as 100 USD / TO)
    Could anyone please suggest how to calculate the unit in this case?
    Many Thanks!
    Tanu

    Hi,
    Go through the below link it may give some idea
    http://help.sap.com/saphelp_nw04/Helpdata/EN/19/1d7abc80ca4817a72009998cdeebe0/content.htm
    Regards,
    Marasa.

  • How to calculate the Daily Call Volume

    Hello,
    Can anyone please advise how to calculate the daily call volume in a contact center - the counts of the calls terminated in ICM ?
    Is there any webview report or a SQL query which provides the count ?
    Many thanks in advance for the help!
    Thanks & Regards,
    Naresh

    The ICM software generates a Termination_Call_Detail record for each call that arrives at the peripheral. From This report you can get the number of calls to ICM as well as the call details.
    To get the report run this sql query
    select * from dbo.t_Termination_Call_Detail where convert (varchar(10), DateTime, 101) = '12/03/2010'

  • How to calculate the variance in PO price history?

    hi
    i hav standard report ME1P, since i need to do some modifications in this program i copied to Y prgrm,,,'
    im getting all the values properly...
    but my prblm is im not getting how to calculate the variance? im not getting the logic behid it...
    can anybody expln me in breif plz....
    Regards
    Smitha

    Hi Venu,
    there is another way as well, however, you won't be able to see Variance and Variance% as a saperate keyfigure which is not under the period. Thats the reason I didn't mention it earlier.
    What you can do is, Drag the period to the columns, Now create a structure that has the two keyfigures std price, moving price. Here if you add Variance and Variance%, Then these CKF's would come under period as well, which you don't need. And the system won't allow you to add these CKF's outside this structure. The reason being because the interpretation of the data then wouldn't make any sense here. You can create a new structure as well with these CKF's but they would become a subpart of your previous structure.
    choose the required characteristics in the Rows section. Save it.
    Let us know, Sorry man, can't help u much at this problem.
    regards,
    Sree.

  • How to setup the security based on roles in Organization.

    Hi,
    How to setup the security based on roles in Organization.
    For example:Few users are Manager and a few user are Non Manager .Manager should have access to all work data including Non Manager and Non Manager should access based role.How to setup this? How OBI server identify the user role?
    kindly let me know.
    Regards.,
    CHR

    Hi,
    You need to have Back End support to achieve this. In Back End you need to create two groups . You need to know what joins has to be made for which group (which is more important) and also make session variable for the userrole (with SQL supporting it). In the BMM layer, we need to put the security join conditions in the 'where clause'.
    And make a common report. User loggin in with the respective userid will have userrole and joins assigned in the Back end. And they will be viewing the report according to their access.
    Hope this will solve your problem.
    Regards
    MuRam

Maybe you are looking for

  • Help - Photo Gallery

    Hi, am new to web design...I 'm a volunteer for a animal charity and I am trying to design a new web site....I want to imbed a photo gallery thumbnails that the home can have access to, to up load new pictures, and stories of the animals etc.....some

  • How to  create a 16:9 matte

    I need to create a 16:9 ( letterbox ) matte so i can drop it on my clips after altering it. The Widescreen matte filter won't work, since it's clip base therefore if i distort or rotate the clip itself, the widescreen black bars also distorts/rotates

  • SVG workflow is a joke

    Hey. Since Adobe does not provide any good tool for UI design (Photoshop is messy, Fireworks has its memory fatal bug and Illustrator is not pixel perfect with rounding errors wherever you look), I wanted to ask what you would suggest to design for w

  • Art work for song title

    Hi All I wonder is there a tool on that can be used to search for art work based on artist and song title rather that album. Surly there must be something out there that can do this rather simple task, or is it that simple! Thanks

  • Denise Money

    How do I get out of Windows 8 Safe Mode?