Stock Analysis

Hi Experts,
I am doing a report on stock analysis,
And I am in trouble for one of the field ' Po quantity ' which is calculated
by , sum of  ekpo-menge and substracting it from ekbe-menge which is
[ movement type ( 101 ) - (102)  is ekbe-menge] .
Both ekpo and ekbe  is based on the matnr  from mard  table.
Finally I got the answer.... but only for few records the report is generated that to taking lots of time
and for huge records its showing dump error.
Please advice me is there any other method to calculate this Po quantity else guide me in correcting this error.
Thanks
R.Karthik

Wow - that is a lot of data.  I hope you have some WHERE clauses in your actual code, as what you have written will bring back A LOT of data.
Here's some ideas:
1) If you aren't using any data from MARD to slim your query (a WHERE statement against a MARD field) I would use MARC.  This is the material per plant, whereas MARD goes to the storage location level (LGORT).  If you have multiple storage locations per plant, this multiples your data.
2) Don't do a SELECT * - you're bringing back way to much data from the tables.  Bring only the fields you need.
3) Move your SQL queries to more INNER JOINS and bypass some of the loops.
4) For your WHERE statement, it's probably worth doing a dynamic WHERE clause based on the user's choice for the radio-button re: open orders vs. PO balance.
For instance here's something I tried, and it works:
TABLES: mara.
TYPES: BEGIN OF typ_item,
         matnr TYPE matnr,
         werks TYPE werks_d,
         menge TYPE etmen,
         wemng TYPE weemg,
       END OF typ_item.
DATA: gt_item TYPE TABLE OF typ_item,
      gs_item TYPE typ_item,
      gt_where TYPE TABLE OF string.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
                s_mtart FOR mara-mtart.
PARAMETERS: r_open RADIOBUTTON GROUP rad1,
            r_bal  RADIOBUTTON GROUP rad1.
START-OF-SELECTION.
  APPEND 'MARA~MATNR IN S_MATNR' TO gt_where.
  APPEND 'AND MARA~MTART IN S_MTART' TO gt_where.
  CASE 'X'.
    WHEN r_open.
      APPEND 'AND EKET~WEMNG = 0' TO gt_where.
    WHEN r_bal.
      APPEND 'AND EKETMENGE GT EKETWEMNG' TO gt_where.
  ENDCASE.
  SELECT mara~matnr
         marc~werks
         SUM( eketmenge ) SUM( eketwemng )
         INTO TABLE gt_item
         FROM ekpo INNER JOIN mara ON ekpomatnr = maramatnr
                   INNER JOIN marc ON ekpomatnr = marcmatnr
                                  AND ekpowerks = marcwerks
                   INNER JOIN eket ON ekpoebeln = eketebeln
                                  AND ekpoebelp = eketebelp
        WHERE (gt_where)
        GROUP BY maramatnr marcwerks.
  LOOP AT gt_item INTO gs_item.
    WRITE:/ gs_item-matnr, gs_item-werks, gs_item-menge, gs_item-wemng.
  ENDLOOP.
Hope this helps,
Mark

Similar Messages

  • Report for monthly/ weekly stock analysis

    Hi,
    Could anybody please let me know the transaction code for the following.
    -> I would like to call a report for stock analysis (quantity basis not stock value), What I want is to call up figures of monthly / weekly usage over 6 months.
    Thanks in advance

    Hi ,
    Pls try MC45.
    Enter only one object to analyse either : plant/ pur org/sales org
    Input your period to analyse
    Report shows  consumed materials with stock value and qty ..Click double line & triple line tabs to get more details.
    thnks
    nandu

  • Stock analysis report

    Hi all,
            I want to create Stock analysis report in BW3.5 can anybody tell me is there any standard data source for stock analysis or any standard cube in bw if yes then please help me out.
    thankes

    Hi Ankit,
    First insatall the business content objects:
    0IC_C03,corresponding update rules from the info sources, Infos source 2LIS_03_BX,BF,UM.
    Then load the data from BX Extractor first then load the data from BF and UM data sources
    For futher informatins go through the PDF document how to inventory management!
    Hope this might help you
    Regards
    Ram

  • Scenario of stock analysis report

    Hi,
    Can anybody explain me about the stock analysis report in detail.
    Thanks & Regards,
    B.SREENIVASULU.

    Hi Bysani,
    Here is a list and if required more just let me know or any particular report .
    Activities in Materials Management
    Display Stock List
    MB52
    Display Stock in Transit Cc
    MB5T
    Display SLED/Date of Production
    MB5M
    Display Valuated Special Stock
    MBBS
    Display Stocks with Subcontractor
    MBLB
    Display Availability Overview
    CO09
    Display Stocks for Posting Date
    MB5B
    Display Material Items
    MR51
    Display Cancelled Material Documents
    MBSM
    Display Material Document for Reason for Movement
    MBGR
    Read/Display Material Document Archive
    MBAL
    Display Consignment Stocks
    MB54
    Display Customer Consignment Stock and Returnable Packaging with Customer
    MB58
    Stock Overview
    MMBE
    List of Material Documents
    MB51
    Display Stock/Requirement Situation
    MD04
    Display GR/IR List of Balances
    MB5S
    Analyze Conversion Differences
    MB5U
    List of Stock Values: Balance Display
    MB5L
    Stock Consistency Check
    MB5K
    Manage Held Data
    MBPM
    Reservation Management Program
    MBVR
    there are many more if you go to the Environment , reporting ,list displays node in the SAP standard menu under Materials management , you will find this node (Environment , reporting , list display) under lot many sub nodes .
    regards
    kp

  • Stock Analysis : Dead Stock : More than 60 Days.- Report

    Dear SAPians
    Good Evening
    I need a SAP report i want to know if there is a SAP standard report i dontr want to have a Z-Report. My requirement is
    <b>Stock Analysis : Dead Stock : More than 60 Days.</b>Required Fields are
    <b>Item code   Description  S.Loc  Qty   Value.</b>
    Pls ssuggest me .
    Thank You
    with regards
    Moosa Anis
    +91 9922 577 477 / +91 99608 47444

    MC50 or MB5M use for dead stock

  • Standard stock analysis report

    Hi Experts,
    As per client requirement, needed stock analysis report based on following formula, Ratio of
    Stock at the end of month
    Avarage quantity issued per month during year
    if ratio is 5 to 10 then it slow moving material
    if ratio is 10 to 15 then it very slow moving material
    if ratio is 15 to remaining then it non moving material
    which standard reports will help in finding exact solution, please don't suggetst for Z-reports as needs to be done with standard's only.
    Thanks in advance...

    Dear,
    Have a look below as found...
    Formula
    Inventory Turnover = Cost of Goods Sold (COGS) / Average Inventory at value.
    If you are not familiar with the term Cost of Goods Sold, this is the cost of your revenues.
    Average Inventory is measured in value and not in volume.
    If you divide both elements you know how often you sold youu2019re average inventory.  u201CSo what?u201D you ask. I will explain next.
    Concept and use
    I will present you with two business scenariou2019s to point out the significance of the Inventory Turnover ratio.
    Scenario 1
    You sell one product. You invest 10.000 EUR as starting stock. You run your business for one year and at then end of the year you are completely sold out. Your revenue accumulates to 12.500 EUR.  For simplicity sake your gross profit is 2.500 EUR (12.500 - 10.000).
    Revenue = 12.500
    COGS = 10.000
    Average Inventory = 5.000 (10.000 starting stock + 0 end stock / 2 = 5.000 average stock)
    Inventory Turnover = 2
    ROI = 50% > 2.500 (R-C) earned out of 5.000 (A)
    Scenario 2
    Again you sell one product. But this time you invest 5.000 EUR in starting stock. After 6 months you sold your stock and you replenish your stock again for 5.000 EUR. After another 6 months youu2019re sold out. Your revenue is again 12.500 EUR. Your gross profit is 2.500 EUR (12.500 - 5000 - 5000).
    Revenue = 12.500
    COGS = 10.000
    Average Inventory = 2.500 (5.000 starting stock + 0 end stock / 2 = 2.500 average stock)
    Inventory Turnover = 4
    ROI = 100% > 2.500 (R-C) earned out of 2.500 (A)
    Conclusion
    Looking at the two scenarios the increased inventory turnover means increased operating efficiency: your ROI increased from 50% to 100%! Obviously you invested half the money in scenario 2 to achieve the same profits.
    This doesnu2019t mean businesses should try to achieve a maximum inventory turnover per se. Achievable ratios differ per material type (finished goods, semi or raw), but also per moving speed (ABC class). Last but not least the type of industry very much determines what ratio you can achieve: process industries typically have higher inventory turns than, say, heavy equipment manufacturers.
    You can find out what the industry standards are by purchasing metrics from data suppliers like Reuters or Gartner. This will give you an idea how well you are doing compared to your competitors. Or you can just use inventory turnover as an internal benchmark. In this case you periodically review the inventory turnover for different sets of materials and set targets that you wish to achieve.
    Inventory turnover is typically a financial measurement (see relation to ROI). In order to improve the ratio, close cooperation with procurement/production planning is required, since they directly influence the stock levels.
    Again, as with many KPIs and reports donu2019t judge based on this value alone, but use other stock controlling reports to minimize your inventory and still have a sound service level.
    Finally you can read an interesting business case on how inventory turns made Dell a leader in itu2019s business.
    Regards,
    Syed Hussain.
    Have a look at: http://www.kowboyz.nl/blog/mc44-inventory-turnover/
    Edited by: Syed Hussain on Jul 10, 2009 12:16 PM
    Edited by: Syed Hussain on Jul 10, 2009 12:18 PM

  • I would like to run a stock analysis program called Toolkit 6 on my Macbook Pro, but it only works on the Windows platform.  Is there software that allows me to run Windows applications on the Mac?

    I would like to run a stock analysis program called Toolkit 6 on my Macbook Pro, but it only works on the Windows platform.  Is there software that allows me to run Windows applications on the Mac?

    Yes it's MS Windows! You will need a license of MS Windows (preferable Windows 7) and from there you can decide on the strategy for running Windows on your iMac. You can use Boot Camp (you already have this) or you use virtualization software such as Parallels or Fusion. For your situation I'd recommend virtualization software. However for only one program I'd do some due diligence to see if there is a OS X version. You can start with the App store or simply use Google to search.
    Kappy has provided a good article on running Windows on a Mac and the various options. Here is the link:
    Kappy's explanation
    Roger

  • Ageing stock - analysis per warehouse

    Hi there,
    could you pls let me know whether there is any transaction that gives stock ageing analysis not for plant, but only for specified warehouse?
    thanks a lot for help.
    I

    Hi,
    In the Standard, Stock Ageing Analysis can be carried out at Plant level.
    T Code - MC46.
    Regards,
    Bijoy Kumar

  • Stock analysis based on vendor material number

    Hi
    Is there any report which can show the total stock of a material with split on vendor material number (I am entering different vendor material numbers upon goods receipt) or any query I can write to get the above result?
    The requirement is as follows: I will order an item with name say X and vendor supplies the item with different name say Y. So I am maintaining vendor specific name in vendor material number. Now I want to see the stock X with what quantity of it is Y.
    Thanks

    Dear Praveen
    You could use the following;
    Input and Output Conversion of Material Numbers  
    Use
    Like every other part in the SAP system, an inventory-managed manufacturer part has an SAP-specific material number that uniquely identifies it. If this material number is uncommon or unknown to the vendor, you should consider the following (especially in the purchasing process):
    ·        You can enter a part with its Manufacturer Part Number (MPN) and its External Manufacturer, and not just with its material number. This is possible because of the input conversion of material numbers.
    ·        The system displays this part with its Manufacturer Part Number and the External Manufacturer in lists and screens. This is possible because of the output conversion of material numbers.
    You have to increase the maximum field length for input and output values in the Output Length for Material Numbers field to enter and display the MPN and the manufacturer code in one field
    Prerequisites
    You have made the following settings in Customizing:
    ·        You have activated the conversion exit for material numbers.
    ·        You have maintained a delimiter. The delimiter separates the MPN and the external manufacturer when they are entered or displayed in one field.
    ·        You have specified a maximum output length for material numbers. This means that the fields for the long material number are scrollable, and the output columns for lists are wider.
    You configure and activate the conversion exit for material numbers in Customizing by choosing Logistics - General ® Interchangeability of Parts ® Set Up Conversion Exit for Material Numbers.
    Features
    Input Conversion
    If you have activated the conversion exit, you can enter the relevant MPN instead of the material number in the relevant input fields.
    If the MPN is not unique, you enter the external manufacturer in the same field, separating the MPN and the external manufacturer by the delimiter defined in Customizing.
    You have defined: as the delimiter.
    Enter 45L700W:36121 (Manufacturer Part Number, Delimiter,and External Manufacturer) for the part, instead of material number 1011. If the MPN is unique, you only have to enter 45L700W (the Manufacturer Part Number).
    You can now scroll the input field for the material number. This allows you to enter the maximum output length for material numbers, which has also been defined in Customizing.
    Input conversion gives you an alternate and additional input option. You can still enter the ERP material number to identify a part.
    The system determines the correct material number from your input, and passes it to the program logic. The system handles your input as follows:
    ·        If your entry contains the delimiter, the system splits the entry at the delimiter, interprets both parts of the entry as the Manufacturer Part Number and the External Manufacturer respectively, and searches for a part corresponding to these entries
    ·        If your entry does not contain a delimiter, the system interprets your entry as an (ERP) material number, and searches for the corresponding part in the material master. If this is unsuccessful, the system interprets your entry as an MPN, and searches for the corresponding part.
    If the system cannot determine a part clearly, or the search is unsuccessful, it issues an error message.
    Value Range for MPN on the Selection Screen
    The system converts the MPN into a material number internally.
    To ensure that the system correctly interprets the value range for an MPN that is entered as selection criteria, when the conversion exit is activated, the system provides both the material number and the MPN as selection criteria in the selection screen.
    Output Conversion
    If the conversion exit is activated, the output conversion ensures that the system displays the MPN and the external manufacturer on screens and in lists, separated by the delimiter in the field or column that usually displays the ERP material number.
    If the Output Length for Material Numbers field in Customizing is not long enough to display both the MPN and the external manufacturer, the system displays the MPN, if it is unique.
    If the MPN is not unique or the output length too short, the system displays the ERP material number.
    The system displays parts with the output length defined in Customizing. In addition:
    ·        You can scroll the output field for the material number on screens.
    ·        The system adjusts the layout of lists to the output length.
    List Formatting
    If you use the inventory-managed MPN, you have to change the list formatting as follows:
    ·        Variable length of the material number in reports
    In cases of the automatic conversion of the material number into an MPN and external manufacturer, the system takes account of the Output Length for Material Numbers field (defined in Customizing) when it structures the lists for selected reports. This ensures that columns are aligned, line breaks are correct, and the lists can be read.
    ·        Adding a field for the external manufacturer
    The external manufacturer should also be displayed in lists because the MPN, into which the material number is automatically converted, is not always unique.
    In Customizing, you have defined whether the external manufacturer should be displayed with the MPN. The system adds the field for the external manufacturer immediately after the field for the MPN in lists and on the screen.
    You can display the external manufacturer with or without an active conversion exit.
    ·        Sorting by MPN, not by material number
    You can sort some lists by material number.
    You can sort by MPN in cases where the MPN is displayed instead of the material number.
    with kind regards
    Sundar

  • Non-moving stock analysis

    hi all,
    i would like display stocks of the materials those haven't moved or consumed last two months. can you please tell me what are the transaction codes, except MC50, MC46 etc.

    Hi Melih,
    I don't think this is an exact solution (maybe you can use it):
    In MC.A you can put in the layout a field called 'Last gds issue' that shows when tha last goods issue took place. Using this you can filter the list.
    BR
    Csaba

  • Stock balance analysis

    Dear,
    I have a requirement regarding material stock analysis.
    For example-I have two stores in a plant.I want to see the stocks as well value of stock on a particular date suppose 25/06/2008 for a particular store.
    -If i will use MC.9,it will show the opening balance of the starting of the month & closing balance also,as there is no date option.It will not also show the Stock transfer accounting as no accounting is done for it.
    -If i will use MB5B,in this also It will not also show the Stock transfer accounting as no accounting is done for it.
    -In MB52,it will show only reciept stock.
    So apart from these, is there any Transction in which we can check the detail.Pls guide me.
    Regards,
    DD

    Hi,
    I'm not sure if there is std report in sap, but You can use below table
    MBEWH - Stock total with period and year
    MSEG - Material Document Detail table
    MKPF - Material Document Header table
    for ex:- you want to total stock for 25/05/2008 then
    take period 05, year 2008 stok from MBEWH, add goods recipt, subtract goods issue stock then you will get particular date total stock
    you want to stock for storage location then you consider below tables with period and year
    MARDH Storage Location Data for Material
    MSLBH Special Stocks with Vendor
    MSKAH Sales Order Stock
    MSKUH Special Stocks with Customer
    MSPRH Project Stock
    hope you will understand
    Regards,
    Sankaran

  • Stock Aging Analysis Report by Serial Number

    Hi Experts,
    Is it right to create a Stock Analysis Report for all materials based on Serial Numbers? Because I have now developed a Stock Aging Report which will display the values of stock aging based on Goods Receipt created however, when I base it on Goods Receipt and Serial Numbers, the number won't tally. Please explain what happened? Is this approach not feasible?
    Please help.
    Thanks a lot for your answers!

    Hi @Bijoy,
    We are now experiencing a lot of issues regarding tracking the stock by serial numbers because the current stock aging report only applies to a FIFO stock system. There are also stocks that are transferred from Location to another Location (Sto Loc to Sto Loc2) and they wanted their stocks' aged to be based on the first Storage Location Posted. Please tell me if this is feasible.
    Thanks a Lot!

  • Stock Ageing Analysis

    Dear all,
    We are planning to Golive by September1st,2007.Customer is having some stock pretaining to some ten years back where some are  unused in the mean period of time(say from 1995 to 2007).They want to upload that stock with the relevant dates so that to do the Dead stock analysis.Whatever we upload for cutover data will be on current date.How to address this.
    Regards,
    Milton.I

    Dear Vijay,
    WE also come across similar demand from the customer for the old stock and aging.
    In that casewe gave solution as follows,
    1. Capture the actual date in the Document Date ( Not Posting Date) field and keep posting date as today's date.
    2. You can analyze the material aging based on Document date either in MB51 or in other reports.
    3. If that is not sufficient, then develop Z-Report based on Document date.
    4. But one caution, This analysis is not possible with SAP standard Dead Stock or slow - Moving stock reports as those are based on Posting Date.
    If this resolves your query, please close the Issue,
    Thanks & Regards,
    Krishna Reddy

  • Logic for carry forward of previous stock to current period stock.

    Hi Experts,
    Client is using already MC.9 for see the stock analysis report, however as per there requirement we are exploring BOM as well as fetching quantity from table level as well. in my report I am experiencing  difficulty to carry forward previous period closing stock quantity to current period stock quantiy, if there is no received for current period, however the same is happens in MC.9
    Could any one tell me what is the logic behind MC.9 which is do carry forward previous period closing  stock to current period stock quantity in report.
    As per the requirement I am using S031, S032,S033, however unable to get logic for carry forward the previous month stock quantity to current month.
    have a requirement of creating a report of showing material stock period wise for each plant in below mention format.
    Header 1
    Header 2
    Header 3
    Header 4
    LFGJA/LFMON
    ROH (MT)
    HALB (MT)
    FERT (MT)
    11.2013
    100.000
    121.000
    121.00
    12.2013
    50.000
    12.000
    123.00
    01.2014
    23.231
    .23.234
    45.342
    02.2014
    23.231
    34.094
    45.098
    03.2014
    34.098
    98.983
    00.000
    04.2014
    00.000
    69.093
    98.098
    05.2014
    00.000
    89.098
    00.000
    For Example Break up of ROH material plant wise in below mention format.
    LFGJA/LFMON
    WERKS
    MENGE (MT)
    11.2013
    P001
    30.000
    11.2013
    P002
    50.000
    11.2013
    P003
    20.00
    Thanks in advance,
    SKN

    Hi,
       The last period closing stock = current period opening stock. You may get the details from MBEWH and S032 tables. Refer the doc: Material Stock and Valuation History tables - how to read them
    Regards,
    AKPT

  • Stock report MB51/MB5L

    Please while i am executing the T-code MB51/MB5L in order to get the stock availability with values ,i got the report only in local currency AED ( UAE dirham) but i need the stock value in EUR how to configure that

    Hi,
    You don't have the option of seeing the stock value in other currency than the company currency in MB51 and MB5L. You have the option of seeing stock in desired currency in MC.4 (plant stock analysis), MC.1 and in MC.6 (Storage location GR/GI analysis). If you want this option in MB51 or MB5l, you need to modify the report by giving coding. The table name is RMCS0 for analyysis currency and field name is AWAER1. Thanking you.

Maybe you are looking for

  • Hi problem with Oracle 10g On windows 2003 SR1

    Hi,    I am installing NW2004S on windows 2003 SR1 (Std.Edition). After the installation of Oracle 10g I am getting the error "I*SQLPlus service" can't be started. Any help on this regard is greatly appreciated. Regards, Rao.M

  • How do you display your music from iTunes in Ventrilo?

    Not sure how many people use or are familiar with the program Ventrilo (online - chat program, used in video games, etc) - there is a way to display the song you are listening to beside your User Name in the chat window on Ventrilo, however I cannot

  • Android Emulator get hangs on starting the application in debug Mode

    I have deployed the application on Android Emulator in debug mode but on starting the app it get hangs. I have set the Java Debugging to true in the cvm.properties file and also started Java debugger from JDev before launching the ADF Mobile app on a

  • OSX update 10.5.1

    Hi I just downloaded the OSX 10.5.1 update and now I cannot open safari or ichat, whenever I try to open them I jsut get a window that says "You cannout use the application "Safari/iChat" with this version of OSX, can anyone help me resolve this prob

  • Error in the header files

    Hi, I need to find a way out of this errors.can anyone help me . $ aCC db.cc -I$ORACLE_HOME/rdbms/public -I/disk1/oracle/product/10.2.0.2/* Error (future) 600: "/disk1/oracle/product/10.2.0.2//rdbms/public/occiCommon.h", line 269 # Type specifier is