Calculate stock reach based on MRP data by date

HI
I have a challenge that I'm unable to solve by myself - I hope you guys can help me out:-)
I have an ODS containing current stock and expected future movements of different types. In the ODS I have (simplified):
1) Material
2) Date of movement
3) Type of movement
4) Quantity (with +/- sign)
I need a query that will return for each material (in the rows) either the date when the stock will reach 0 or the number of days until that movement occurs.
My ODS could hold the following data for a material:
Mat  date     Type      Qty:
1                  Stock      +100
1       01.01  Sales         -20
1       05.01  Sales         -70
1       10.01  Sales         -50
In this example the query should return "10.01" (which is the date we will run out of stock) or the number of days between today and that date.
I have experimented with the "cumulated" option and conditions in kfy definition in query designer, but since cumulation is only for display I can' use that.
I can't build a cumulated value into the model either, because there are several movement types and sometimes the user needs to only take some of them into consideration.
Since consumption is very non-linear I need the exact date we run out and I can't base calculations on average data (like average daily sales).
Does anybody have an idea how to solve this?

Post Author: Tned
CA Forum: Desktop Intelligence Reporting
Thanks Prashant
However, when i add either the status or condition variables to the report all lines related to the ID are returned not just the last entery by date.
Thanks again.Terry

Similar Messages

  • Customer Outstanding based on invoice date

    Hi,
    As you know that we have statndard report for Customer Outstandings which will give us the cusomer outstanding balance with time buckets. in that we calculate the outstanding amoount based on Posting Date.
    Now i want to calculate the same based on invoice date insted of posting date . In the statndard report it was calculated based on posting key date with  SAP Exit. variable.
    Please guide me how to calculate the Custiomer Outstanding amount based on invoice Date.  And guide me how to create buckets  based on invoice date.
    Thanks & Reagards,
    Anand

    Hi,
    Buckets means you need to Substract some Date with invoice date, so you can create Customer Exit Variable with Formula type and do it.
    See the Material age Buckets report and develope your report.
    Calculating the Ageing of the Materials
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/a-c/calculating%20the%20ageing%20of%20the%20materials.pdf
    For all other Customer Exit Variables code pls see.
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    Thanks
    REddy

  • Stock report for a period (based on posting date)

    Hi Experts,
    We have a requirement as under:
    1) We want a report for a period say from 01.04.2011 to 30.09.2011 (closed period for both MM and FI postings). Report is being taken on a later date say 01.12.2011.
    2) The report should say the status of stock as of 30.09.2011 only even of being taken in the month of December
    3) I tried to take the desired report through MB5B for the period 30.09.2011 to 30.09.2011 (selection date fields) on 20th december, 2011 and noticed that if same report with the same selection criteria is taken at two different times, output data is not the same whereas MM and FI posting periods are already closed.
    Can anybody suggest alternative SAP standard report where output will remain the same if report with same selection criteria is taken at different intervals ELSE in case of change we should be able to see the documents posted in between if back dated entries have been posted after opening MM /FI period.
    thanks

    sure it speaks the same, but it mentions as well the reasons (1) and has much more information (2)  and a solution.(3)
    1)
    user starts transaction MB5B for a very large number of materials or for all materials in a plant
    During the runtime of transaction MB5B, goods movements are posted in parallel:
               - The results of transaction MB5B are incorrect.
               - Each run of transaction MB5B returns different results for the same combination of "material + plant".
    Example: Transaction MB5B should process 100 materials with 10,000 MM documents each. The system takes approximately 1 second to read the material master data  and it takes approximately 1 hour to read the MM and FI documents. A goods movement for a material to be processed is posted approximately 10 minutes after you start transaction MB5B. The stock for this material before this posting has already been determined. The new MM document is also read, however. The stock read before the posting is used as the basis for calculating the stocks for the start and end date.
    Even for an old and closed period, MB5B starts today and calculates backwards  any movement to finally get the stock for  the time your specified in your selection.
    2)
    The SAP standard release does not include a solution
    so you have to understand that there is no real alternative transaction in SAP
    3) and then they provide a large section with a workaround that can be developed by an experienced programmer within 3 to 5 days.
    So how shall anyone here be able to tell you an alternative report?
    if someone does, then it is an owndeveloped z-report which is not available in your sap system.
    if you know that people want lookup period closing stocks at any time in future, then either schedule MB52 at month end and store the list somewhere (and do not allow backposting)
    or have an Abaper create a stock report based on the history tables MARDH, MCHBH, MBEWH etc.
    And even here you may encounter an issue at some day, if you start archving special stocks or material masters, because then the stock figures from the historic tables are gone and you cannot rebuilt a reliable stock report .

  • How to calculate a boolean based on data from a table fed by a BI Query

    Hi Gurus,
    I am currently struggling with the following issue:
    - I have a query in my VC model wich returns 4 ratios
    - I put the result of the query in a table in the VC model
    - then, I added a column in the table. this column is a boolean which should be true if the value of one of my 4 ratios is not 0, otherwise, it is false
    - I want that boolean to be "updatable" by the users.
    I tried to define the default value of the boolean based on the value from the signficant ratio... no luck
    I tried to change the value from the configuration tab of the column, but then I can not update afterwards....
    Has anyone ever seen that issue and found a solution ?
    Thansk for your help
    PY

    Hi Deep!
    Thanks for your feedback! I felt a bit alone in my world before you answered
    Your idea is great and it would work if I hadn't to display the data with a hierarchy.
    Actually, the only thing I did not mention is that we are posting data against fiscal period, and we are budgeting for the next 10 years (no comment on that, and the precision we could reach ). So, to display the information we are using a cusomized hierarchy on 0FISCPER using 0FISCYEAR.
    So when I used your option, the hierarchy has been deactivated on the table. But to be sure I correctly implemented your proposition, here are the steps we used :
    1) connect the query output port "data" to the share
    2) add the boolean in the share
    3) map the boolean with the rule based on the data coming from the query
    4) connect the share to the table.
    Note that we the current version we use of VC I am not able to edit the field mapping between the share and the table...
    Did I miss something ?
    If yes, could you drive me to the correct procedure ?
    If no, would you have any idea ? I already tried to change the default value of the field in the "define Data" maintenance popup of the table. I also tried to assign a value to the boolean based on the Action option of the column used in my condition...
    Thanks for your help
    PY

  • Calculate due on date in incoming invoice based on p.date of purchase order

    We would like to calculate due on date in incoming invoice based on posting date of purchase order position. We want to be able to see the posting date of the purchase order lines from miro transaccion. Then we would add 85 days to calculate the due on date. I have tried to create an "item list variant" from OLMRLIST transaccion (Customizing - Logistics invoice verification) and add the posting date but it is not possible to access this value.
    Thanks in advance.

    Hi,
    have a look at badi MRM_PAYMENT_TERMS.
    Check as well OSS Note 1156325 - BAdIs in the Logistics Invoice Verification environment
    Best regards.

  • Calculate difference in value based on two date parameters

    Hi All,
    I have a table and need to calculate the difference in rent amount for a property based on two date parameters.
    I have uploaded sample data here:
    https://app.box.com/s/pu8oa4f3jhrhm0ylshdz2fuo7541vn4z
    Thanks
    Jag

    Hi jaggy99,
    Do you have the knowledge of
    Excel Add-In? If you don't have knowledge of C#/VB.NET language and Visual Studio, I don't think Excel Add-In is what you want. As I said previously, your problem is totally about the business logic, we don't provide solution for a complete requirement.
    Based on your sample data, I think VBA code is suitable.
    If you're not familiar with VBA, please take a look at the MSDN documents for scratch:
    Getting Started with VBA in Excel 2010
    The steps should be like this:
    1. Sort all the records by [Rent Change Date] field
    2. Loop throuth the records and find the FromDate and ToDate as well as the corresponding [Rent Charged] field
    3. Calculate the difference and save the data into a new range
    It's not so hard, please have a try, if you encounter any development problems, you can post in this forum.
    Thanks.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Stock Report as on any date.

    i am developing a stock report as on any date where i have to get the closing stock of unrestricted blocked and transit stock as on any date.
    i have taken a table mkpf and mseg to get the quantity and date.
    i am not getting what all movement type i should use to get the closing stock for unrestricted blocked and transit and what method i shoud use?
    please help me out.

    Jairaj Kumar ,
    Your Report is Little bit complex and time consuming as well.We did a Report same as like you but not Special Stock (means for all of Stock).
    For Closing Balance Which will be Opening Balance of next perio/ next day , can be calculated based on DEBIT / Credit inidcator available in the table you are using. This will used of calculate Stock balance. along with movement type for date range.
    Hope this will give some info about for ur requirement. Note refer to Tcode MB5L for reference.

  • Costing error while change mrp data in material master

    Hi dears,
    This is Rem process. when i try to change the material master MRP data ex. ( mrp type M1 to M0)
    system not allow to change and show the error as
    Product cost collector 000000750122 is still active (assigned to PrCtr 50601-025)
    i need to change the mrp data in mm02 and i donot want to do delete the pcc .
    any process to carryover
    thanks
    Edited by: raj on May 24, 2010 12:22 PM

    Hi,
    MRP is mainly configured for a material so that tere would not be any need for manual checking of the stock so as to create a PR. 
    The parameters which you have specified for a particular material like reorder point and lot size will help in planning for a particular material.
    If you need only Qty of two (Less) then  there s no need of configuring a MRP for that material
    And lot size is also decided basing on certain other factors like
    1) Lead time
    2) Transportation costs involved in procuring the material etc
    So ifyou want to generate PR for a qty of 100 then you need ot change the lot size
    I hope this gives you clarity
    Thanks & Regards
    Pavan

  • Receivable Aging Report for India based on Invoice Date

    We have a reporting/legal need for our India location to report the aging of their receivables based on the invoice date of the documents rather than the net due date.  Is there an existing report available that already does this?
    Currently when you use FBL5N and related aging reports RFDOPO10 etc. it calculates the arrears from the net due date.  They need to calculate the arrears from the document date.

    The report S_ALR_87012168 still does not allow me to choose that I want to calculate the arrears from the document date rather than the net due date:
    I guess what they really need to know is how old the receivables are based on the date they were created.
    As in the example below, current aging reports use the Net Due to calculate a days in arrears of 6 days (based on current date of 2008/11/05).
    Ty Doc. Date  Pstng Date Bline Date Net due dt Arrea
    RV 2008.09.30 2008.09.30 2008.09.30 2008.10.30     6
    What they need is the number of days in arrears based on the document date (2008.09.30) which would increase the numer of days the receivable has been open to 36.

  • Calculations based on Summarized data in Cross Tab

    First off, I'm pretty experienced with Crystal.
    I've run accross something that seems like it should be realy easy to do, and the sort of thing you would expect to do  in a cross tab... so maybe I'm missing something totally obvious.
    I'm doing a year over year comparison of some financial data broken down by month and by quarter.
    So, my Rows are Quarter, and a field called 'YEARMONTH' (calculated field, YYYYMM, for ease of sorting)
    My column is Year, and for summarized fields, I have the data field I'm interested in which is a float. Let's call it 'Dollars' for sake of argument.
    What I want to do is create a summary field (next to the total field) called 'Difference' or 'Delta' that calculates for reach row the difference between my two years (2008, and 2009)
    The only solution I can come up with is to dummy in a record from the datasource with a year value of 'Difference' and some other dummy values so that it will show up as a column on the cross tab, and then somehow use the currentrowcolum function or some such creature to mask the output in the column. but now that I type it out here, I'm not sure it's going to work. I also don't think it's going to export the way I want it to either.
    I'd really prefer it to be in a cross tab, and not in some manually created cross-tab emulation using manual running totals, but I'll go there if I have to.
    Thanks a ton!

    This is what I did in my report to get the difference
    my crosstab looks like this
                        2004     2005    Total
    Total              T1         T2         T
    USA               A          B          C
    INDIA              X          Y          Z
    right click on T1 and go to format field and write the suppress condition like this
    numberVar d:=0;
    currencyVar array arr1;
    currencyVar array arr2;
    numberVar e;
    if GridRowColumnValue('year')=2004 then
    (e:=e+1;
    redim preserve arr1[e];
    arr1[e]:=CurrentFieldValue)
    else
    (e:=e+1;
    redim preserve arr2[e];
    arr2[e]:=CurrentFieldValue);
    false
    right click on T and go to format field and write the Display string condition like this
    currencyVar array arr1;
    currencyVar array arr2;
    totext(arr1[1]-arr2[1])
    right click on A and go to format field and write the suppress condition like this
    currencyVar array four;
    currencyVar array five;
    numberVar d;
    if GridRowColumnValue('year')=2004 then
    (d:=d+1;
    redim preserve four[d];
    four[d]:=CurrentFieldValue)
    else
    (d:=d+1;
    redim preserve five[d];
    five[d]:=CurrentFieldValue);
    false
    right click on C and go to format field and write the Display string condition like this
    currencyVar array four;
    currencyVar array five;
    numberVar g;
    g:=g+1;
    ToText(four[g]-five[g])
    Note: Please select the option "column totals on top" for crosstab in customize style
    Hope this helps!
    Raghavendra

  • Purchase Order Based on MRP

    Hi,
    when ever i create PO from the order recommendation based on MRP i see same items in multiple rows.
    For eg If raw material RM1 and RM2 are to be ordered based on MRP and required qty is RM1=10 , RM1-20, RM2=4, RM2=9
    when i raise PO through Order recomd the PO takes 2 RM1 and 2 RM2 material in PO
    Is it possible to consolidate this similar item in PO.
    swap

    Hi...
    It seems strange that he says, because MRP Wizard by consolidating units of a single product when the delivery dates are the same. Now, what clearly if you can do is to select only one of the lines by modifying the quantities. The lines will be used is not possible to eliminate the recommendations so as not to lose the consistency of it.
    I hope you will be helpful,
    Best regards,

  • 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.

  • How to update the price based upon PGI date

    Hi
            I have issue of updation of the Prices and freight based on PGI date in the billing we are using the two billing types for the excsies and tax invoice creation .And in the copy control pricing type is maintained Aas "C" for the billing types with single delivery but someHow MRP in the excise billing has been picked from the condition record thats validity is ended and in Tax invoice it picks up the correct prices
    Both pricing condition types has pricing type "B" from Billing date and in the freight we have maintained as "A" SRD
    But for the some cases specially for the excise related part that is based upon the MRP we are facing this issue
    Pricing date is some how coming from sales document
    Please find the problem details in the attachment

    Hi,
    if you see two condition tabs snap shots you can understand clearly because that two invoices has been created in two different dates and you have maintained the pricing date C-billing date ( KOMK-FKDAT).Due to this,the price of ZMRP is coming differently.After you creation of first invoice then you would have changed ZMRP amount.Now while you are creating second invoice ,system has taken new price of ZMRP in billing level.
    Note:While creating second invoice, PGI date might have come into billing level but someone would be changed billing date manually at header level of billing document.Please check that one also.
    Kindly let me know if you need further help on this.
    Thanks,
    Naren

  • MRP Data Tables

    Dear Experts
    Pl tell about the MRP Data Table Where the Data Is stored .
    Like Requirement qty , Plant Stock,Open Purchase order, STO,subcontracting , Shortage qty.
    tables which will help me out to get the data from table .
    Rgds
    Pankaj Agarwal

    Dear use the following function module to get the details of what you are asking
    MD_STOCK_REQUIREMENTS_LIST_API
    Give plant and material number and execute...you will get all the data.

  • Stock qty/value on specifiec date

    Hi All
    Can anybody explain how  can we find the Stock qty and value on paricular date period through the table instead of transaction MB5B.I am waiting for your valid inputs.
    Thanx

    This is not possible as SAP only captures stock data at month level. Transaction MB5B actually uses posting date in material document to provide stock for a particular posting date; it does not read a table that provides stock data by posting date. Now if you need to view stock data at a particular month, this should be possible by viewing a combination of regular stock tables (e.g., MARD for regular storage location stock, MBEW for valuated stock at plant level, MKOL for consignment stock), and their historical data tables (e.g., MARDH, MBEWH, MKOLH).
    Please keep in mind that the period data in these tables does not get updated every month. They are updated only if there is a stock posting affecting these tables on that particular month. As such, you will need to come up with the logic to project data for a particular month based on these tables, which should be possible using data from these tables.
    Revi

Maybe you are looking for