Calculate quantity based on the day

Hi All,
I have a requirement to calculate average quantities/day  based on variable entry.
Date : variable ( range, mandatory)
Based on the user entry , the report should display quantity
average quantity on mondays ,
average quantity on Tuesday ,
average quantity on Wednesday ,
average quantity on Thursday ,
average quantity on Friday ,
for ex : march 01,2010 - march 15,2010 ( user entry)
in that date period we have three mondays (1,8,15)
the report should display average quantity for mondays and so on for otherdays..
any suggestions on how to proceed...
srinivas
Edited by: srinivas reddy on Mar 15, 2010 10:02 AM

Hi,
I dont know if others have a better solution, but if I were to suggest something, it would be to create a an infoobject to store the days, include it in your infocube.
The based on the date, it will populate the day in your infocube. Include this new infoobject into the report, then create restricted key figures using the new day infoobject to restrict.
Hope you could follow what I suggested and its useful for you.
regards,
Gary.

Similar Messages

  • How to cummulate the quantity based on the date condition?

    hi,
         In my query,i need to cummulate the open quantity based on the two date condition.
    If my Schedule line date > system date, i need to cummulate the open quantity.
          But in my query level i am getting 0 or 1 based on the above condition.
          i am struggling to cummulate the open qty based on the above condition.
        can any body throws an idea to resolve my issue.
    Regards,
    ravi.

    Thanks for suggestion,Almost i narrow down my issue to get the proper result.
    But  i have one doubt.
    Is it possible to user Formula variable  (Processing by replacement path-Reference char as Scheduline date) in my  Calculated Key Fig calculation.?? But here i am created  Scheduline date as Characher infoobject.
    Actually i am created Scheduline date as Character InfoObject,If i am using the following condition like
    (Schedule line date > system date) its throwing "X" value.
    For the above issue,if i am changing the Scheduline date as Key figure InfoObject means i will get the proper output for the condition(Schedule line date > system date) either 0 or 1.
    Is it correct????
    Regards,
    Ravi.

  • Open Order Quantity based on the processing Material (loop)

    Hi,
    How do you get the open order quantity from VBAP/VBAK, based on the material?
    As far as I know, the order is an open order if the Item Qty (VBAP-KWMENG) and Delivery Qty (LIPS-LFIMG) do not match.
    How you I get the full quantity for all Open Orders based on the Material?
    Points will be rewarded!
    Thanks,
    John

    Two ways i can think of..
    1. Standard vbap/lips check
    ( Use table VAPMA to start, since material is indexed on this table)
    2. From your MRP-MD06/MD04(There will be a table for MRP log.please check this)
    Thanks
    Siva
    Siva K

  • Customer Exit for Calendar Month based on the day (system Date)

    Hello,
    I need help in creating a customer exit for Calendar month without the user input. The logic is as follows:
    For the BEx variable created with customer exit option and no user input:
    If the day on the system date falls in between 1 to 14 take the calendar year/month value as previous month.
    If the day on the system date falls in between 15 through 31 then take the calendar year/month as current month.
    eg if report is run on March 24th2009 the calendar year/month variable should be calculated as 03/2009 (March 2009)
    if the report is run on March 1st2009 the calendar year/month should be calculated as 02/2009 (Feb 2009).
    The code should be effective when run in the first 15 days of Jan when the previous month would contain the previous year as well.
    Thank You
    Srishti

    Thanks Shanthi. I am trying to incorporate the logic when the query is run in beginning of Jan when the year should be the previous year.Following is the code.please let me know if it would work. Is there a way I can test it as well?
    CASE I_VNAM.
    WHEN 'ZCURCALMON'.
    IF i_step = 2.
    data: mm(2),
            dd(2),
            yy(4),
            FM(6).
    if sy-datum+4(2) EQ 1.
    sy-datum(4) = sy-datum(4) - 1.
    else.
    sy-datum(4) = sy-datum(4).
    endif.
    if sy-datum+6(2) LE 15.
      mm = sy-datum+4(2) - 1.
      concatenate sy-datum(4) mm into FM.
    else.
      concatenate sy-datum(4) sy-datum+4(2)  into FM.
    endif.
    l_s_range-low = FM.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    Endif.
    ENDCASE.
    Thanks
    Srishti

  • Conditionally Color a row based on the Day of the Week for that row ?

    Hi,
    I have a Table containing some timing entries for each day. I have been trying to format some rows depending on a value in one of the columns for that row. What I would like to achieve is color the cell background gray for every row where the Date found in the first Column isn't a Week Day.
    I have been trying many things by now, but can't seem to figure it out. Does anyone have suggestions ? I have included a screenshot of what I would like to achieve :
    Thanks a lot in advance,
    Stefaan
    Message was edited by: Stefaan Lesage

    Variations on my post linked in Badunit's message here:
    You'll need a second table with one column and as many rows as Table 1 (which contains the dates).
    The formula for Table 2 assumes the dates are in column B of Table 1.
    =OR(WEEKDAY(Table 1::B)=1,WEEKDAY(Table 1::B)=7)
    Enter the formula in the same row as the first data row in Table 1, and Fill it down.
    Rule for conditional formatting for all cells in Table 2: Equals TRUE
    Other instructions as in the linked message.
    Regards,
    Barry

  • Factoring based on 26 days

    Hi friends
    The client requirement is to calculate payroll based on 26 days flat.  I am sure we will face issues in the month of February where we have only 24 working days and month like March(27 days), April(25 days), May(27 days) and August(27 days). Could anyone please adivse me on the possibile problems which can occur if we go for this.  Would like to understand the scenarios in case if some employees leaves or joins in the middle of the month and what would be the payroll calculation.
    Friends please help.
    Santhosh.S

    Hi
    Could you please help me with an example like if the employee join on 12th Feb what would be his salary for that month likewise if an employee resigns in the month of March. 
    Regards
    Santhosh.S

  • Quantity based Over Heads Calculation

    Hi SAP Gurus,
    I am trying to calculate Quantity Based Over Heads.  But the system is calculating wrongly.  In the sense, the OH amount is equal to the total amount of all the line items in the costing sheet above this line item.  Which is wrong.
    Actually i have calcuated Qty Based OHs in ECC5 and it had worked perfectly.  Now i have done the same settings in ECC6.  But system is taking some wrong base for this.
    I have rechecked all my settings and also shown to some of my friends.  But of no use
    Can any one will help me in this regard.
    Ponts will be awarded suitable
    Thanks in advance
    Surya

    not answered

  • Percentage based on the Date and Dimension -  WEBI

    Hello,
    I have to calculate percentage based on the Dates and a Dimension.
    I have BEX Query as source and reporting is done on BOXI - WEBI
    Here is the table structure in the report.
    List# , Process01, Process02.
    List# is unique and Process01-Has 4 operations, Process02 has 3 operations (and these Operations can change from 3 to 7 or 2).
    Operations will have a 'Date' only when it is completed.
    and when all the operations in a 'Process' have 'Date' then i need to get the 'Latest Date'. If few of the operations are not confirmed, then i need to get the percentage like when 2 of 4 operations have date it will be 50% and when no operation is confirmed then 0% and so on .
    Example Cube data:
    List#,ProcessCategory,Operation,Date
    100,Process01,456,11/11/2010.
    100,Process01,457,11/12/2010.
    100,Process01,489,
    100,Process01,490,
    100,Process02,890,11/13/2010.
    100,Process02,891,11/14/2010.
    100,Proceess02,892,11/15/2010
    Result:
    List#, Process01, Process02
    100,50%,11/15/2010.
    Please help me in this, i tryed different logics but it is giving ERROR at percentage.
    Your help would be appreciated!
    Thanks in advance.

    I applied this:
    If([Process Category] InList("Process01") And IsNull([Date]);[Percentage];Max(Date)))
    [Percentage] = (Count([Date])/Count([Operation]))*100.
    but, this is not becoming true - even when Operation has one Date
    Showing result as:
    List#,Process01,Process02
    100, 11/12/2010, 11/15/2010
    But result should be
    100,50%,11/15/2010
    Can anyone help me achieve the right result!
    Thanks in advance.

  • Require a function module to calculate sum of the quantity based on GRNDATE

    hi friends,
    I need to calculate the sum of the quantity based on GRN DATE and invoice date.
    the invoice date given in select-options should be captured by program and from the previous day it need to retrieve the GRN dates and corresponding quantities and i need to do the summation of all these quantities can anybody tell any function module.
    Thanks in advance.

    Try function MD_CONVERT_MATERIAL_UNIT
    the table of UOM's is MARM.
    Doug

  • Calculate Avg  for the given months based on the no. of days in months

    Dear Experts
    I  have a report in which there is a characterictic claenderyr/month.The Input paramter is claenderyr/month which is restricted by a variable of type interval. i mean user will enter calenderyr/month as interval say 012010 to 06.2010. Now I have to calculate Avg sale Qty for the given months based on the no. of days for the given range of months. How I can achieve this in BW Query. Pl. advice
    Dinesh Sharma

    Hi,
    Create formula for the sales qty.
    maintain the exception aggregation as average based on calday
    Best Regards,
    M.H.REDDY

  • Currency Translation based on Last Day of the Acquistion month

    Dear all,
                Request to help me in understanding how we can calculate the currency translation rate as per the last day if the acquistion month..
    For Example if the  Acquistion date : 01/01/2008 (mm/dd/yyyy) the currency translation should happend based on the rate maintained as on 31/01/2008.
    Thanks
    Pavan Kumar Prakhya

    First, you will need to convert the actual acquisition date to the end date of the Fiscal Period. This can be done by using two separate Function Modules. First, get the actual Fiscal Period by entering the date and Fiscal Year Variant into the DATE_TO_PERIOD_CONVERT Function Module. Use the Fiscal Year and Fiscal Period from this and determine the end date of the Fiscal Period by using Function Module LAST_DAY_IN_PERIOD_GET with Fiscal Year, Fiscal Period and Fiscal Year Variant as your inputs.
    For the conversion, use the Function Module CONVERT_TO_LOCAL_CURRENCY. The inputs for this would be the last date of the Fiscal Period, the amount to be converted, the from currency code, the to currency code, blank in rate, AS01 in type of rate and X in read TCURR. This assumes, however, that month-end rates (rate type = AS01) have been loaded into your source system and these rates have been transferred to your BW environment.

  • Rolling 30 Day Calculation Based on the Weekend Date

    Hi Guys,
    I am trying to calculate a sum of rolling 30 day based on the weekend date. The table I am going to query has a date column that only has weekend date(Saturdays only). Based on that I have to calculate the formula for rolling 30 days. I am using the formula to RelativeDate formula to do this calculation.
    ToDate(FormatDate(RelativeDate(CurrentDate();-DayNumberOfWeek(CurrentDate() -  this formula is to get the last Sat of the week.(Previous Week)
    =RelativeDate([Previous_Week];-30) This is to get the rolling 30 days based of the last Saturday of the week.
    Here is where I face the problem and would need your suggestion -
    when I do a sum using the previous date and rolling 30 day I am getting an error
    =sum([Acc]) Where [Week Ending] Between([Previous_Week];[Rolling 30 Days])
    Error-  Missing or bad operand in Where expression.
    Is there any other formula I could use?
    Thanks for your help in advance,
    Jitan

    Hi,
    You are missing paranthesis () in your formula. Try using
    =sum([Acc]) Where ( [Week Ending] Between([Previous_Week];[Rolling 30 Days]) )

  • How to calculate Goods issue date based on the time of delivery

    Hi SAP Gurus,
    I seek your help/suggestion for the given scenario.
    The user requires calculating the GI date based on time of delivery.
    Based on the delivery priority (like Priority 1= Day 1, Priority 2= Day 2) maintained in customer master, the need is something like below-
    1st case= If Retail Customeru2019s delivery orders received before midday (Noon cut off) require to be dispatched on same working day (Day 1)
    Wholesaler customer delivery orders received before midday require to be dispatched by the next
    Working day (Day 2 Including day of receipt)
    2nd case= Retail customeru2019s delivery orders received after midday require to be dispatched by the next working day
    Wholesaler customer delivery orders received after midday require to be dispatched by on day 3
    Kindly suggest , how to proceed in this. I am new to SAP world so need ur help to tackle this.
    Thanks a lot in advance for the valuable inputs.

    What I proposed to do was,
    a. Create routes like 0 day route, 1 Day route, 2 day route etc.
    b. Route determination is based on the Shipping condition of the customer. Put in the shipping condition for the customer as 00 - immediate delivery. 01 - By Truck, 02 - By Rail, 03 - Ship etc
    c. Now, put in your route determination in such a way that routes change in the sales order with shipping condition (SC). Like, if the shipping condition is set to 00, then 0 day route comes up. Meaning immediate delivery, if SC is 01, then your normal route by truck picks up. etc.
    When the sales order is manually created, you know the time of creation. As route is one of the criteria, the material confirmation happens based on number of days you put in the route to reach the destination. Now that you have the material available for today's delivery, the delivery program can be run to create it, or it can be manually created.
    Now, when you configure the route you have to specify 'Transit duration in calendar days'.
    When you have the sales order created electronically (say thru EDI), then, you may have to ask them to send in shipping condition. Else, you have to modify the function module Idoc_input_orders in such a way that if the sales order creation time is < 12 PM, then put shipping condition as 00, else copy what ever is there in the customer.
    If you do not want to check the time manually when the user creates the sales order, then you may have to use the user exit MV45AFZZ (and I think you can use Save_order_prepare) to check the time and change the shipping condition. By this you will avoid extra coding in Idoc_input_orders and also need not bother if the user changed the route or not.
    Hope my explanation helps.
    Regards,
    Mukund S

  • Credit charges based on the number of credit days offered to the customer

    AOA,
    I have a scenario.
    We have credit charges based on the number of credit days offered to the customer. This scenario will be executed on credit sales only.
    Example of pricing, a product mobile is offered to customer A on 20 Days credit
    Mobile   $1000
    10 Days $1000
    20 Days $2500
    Total      $4500 (Invoice Amount)
    Any idea how can I acheive this in SAP.

    Customer A wants to buy product " Mobile "
    Scenario is of Credit sales. Pricing is as follows:
    Price                       $1000
    10 Days                  $1000
    Total After 10 days $2000
    20 Days                    $2500
    Total After 20 days $4500
    Gross Amount         $4500
    The amount of invoice will be $4500.
    If customer pays the amount with in 10 days, then customer only pays $1000.
    If customer pays the amount with in 20 days, then customer only pays $2000.
    If customer pays the amount after 20 days, then customer pays $4500.

  • Based on the user response need to calculate measures in universe

    Hello Folks,
    I have report where user prompts for the single day (Ex: OCT 1 2014).All calculations should be at universe layer.
    1.Based on the user response I need to create a report for previous months .
    2. PYTD and YTD measures based on user prompt from universe. [PYTD - JAN 1 2013-OCT 1 2013, YTD - Jan 1 2014- OCT 1 2014].
    Example Date Set :
    DIM 1                    SEP13...............................................................OCT 14      PYTD   YTD
    Florida  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    Arizona  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    M1...M6 are the measures need to come from universe based on the user prompt.
    M1,M2 Need to give previous 13 months based on user response.
    M3,M5 [PYTD - JAN 1 2013-OCT 1 2013]
    M4,M6 YTD - Jan 1 2014- OCT 1 2014].
    Thanks for your help in advance.

    Hello Folks,
    I have report where user prompts for the single day (Ex: OCT 1 2014).All calculations should be at universe layer.
    1.Based on the user response I need to create a report for previous months .
    2. PYTD and YTD measures based on user prompt from universe. [PYTD - JAN 1 2013-OCT 1 2013, YTD - Jan 1 2014- OCT 1 2014].
    Example Date Set :
    DIM 1                    SEP13...............................................................OCT 14      PYTD   YTD
    Florida  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    Arizona  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    M1...M6 are the measures need to come from universe based on the user prompt.
    M1,M2 Need to give previous 13 months based on user response.
    M3,M5 [PYTD - JAN 1 2013-OCT 1 2013]
    M4,M6 YTD - Jan 1 2014- OCT 1 2014].
    Thanks for your help in advance.

Maybe you are looking for

  • *FIX?* Adobe Application Manager - Download Error (Creative Cloud)

    So I just started the subscription for the Creative Cloud and I downloaded the Adobe Application Manager, which seemed to have installed fine, and when I go into my creative cloud and click download, under for example photoshop, I get Download Error

  • Help needed!!! Exporting using compressor

    Hi! I´m exporting an animation using the option Export using compressor, since I have quite a few proyects to export. I do this in order to have a batch export. Everything goes all right, no errors or something strange, but whe i check the render fil

  • Help !!! My forms from NT to Sun Solaris .. weird now

    Hello, I have brought my forms, originally developed on NT, to UNIX Sun Solaris and every single fonts in the forms have changed. Is there a command to fix the fonts when bring to another platform ? Thanks so much in advance. Thuy null

  • Need basic inputs on ESS/MSS

    Hi Experts, Im new to ESS/MSS and i have been asked to gather some knowledge on ESS/MSS. I have got configuration help and details on tht as well Can anyone give me what are the Technical details some one should know while configuring ESS/MSS and is

  • Lost my playlists and something else :o(

    I have a MacBook Pro, with the HD partitioned into "Mac HD" and "Audio". I have a rather large music library on "Audio" that is linked to my Serato library. Today, I noticed that some of my playlists were missing. I found this online: iTunes: How to