BAPI to extract from MBEW/MBEWH for a given period

Hi ABAPpers,
            We have two tables MBEW and MBEWH for Material Valuation. Based on the changes in few fields like VERPR, the record in MBEW will be transferred to MBEWH. Is there any BAPI that helps me to extract the data for a given period of a given fiscal year without asking me to probe from which table we need to fetch data from and which record in MBEWH is valid for that period of that year. Please suggest possible ways to do it.
Thanks.
Edited by: VKUPPILI on Dec 19, 2011 2:53 PM

Hi
Although it's not your question, see SAP Note 193554 - Stock/valuation data of previous periods, I think that it helps you to understand how to understand how to work the history tables.
I hope this helps you
Regards
Eduardo

Similar Messages

  • Data extraction from MBEW & MBEWH

    Hi All,
    We have to fetch stock data from MBEW & MBEWH.
    for this purpose which datasources are applicable ?
    Thanks

    0CO_PC_ACT_02 extracts data from MBEW only not from MBEWH.
    It extracts data for current period & for previous period only.

  • Extract the "bind" variables for a given query running in 10g.

    how can we extract the "bind" variables for a given query running in 10g? The performance of a query may vary based on the parameters supplied to it. For example, a query like the following
    SELECT * FROM CUSTOMER_ORDERS WHERE CUSTOMER = :CUST_ID
    .might run differently when the :CUST_ID is "123" who may have very few orders versus "456" who may have tens of thousands of orders.
    So, if we see a spike in the system due to a query, we need visibility into what the exact query syntax and values are for any database session. We're aware of an Oracle view called V$SQL_BIND_CAPTURE, but what we're finding with this view is that it's only a snapshot of variables that are refreshed on an interval. That view does not give us a live view into what values are being used in the various sessions in realtime.
    If someone ould provide us with some SQL (or other means) to do get a realtime view into the SQL and variables currently running in the database, it would be greatly appreciated.

    In addition to what's been said in the other thread, you could add a layer of logging either in the database or out.
    v$sql_bind_capture and the associated ash view dba_hist_sqlbind contain sample data.
    You could up the sample rate but it's not advisable - it's still just a sample.
    If you're on 11g, this is where adaptive cursor sharing might help.
    Not help in finding the values of your binds, but help in using different plans where there is such a skew for different bind values and the plan is perhaps wrong for customer 456.
    The problem when you're got such a skew and you're using bind variables is that the two don't really go together.
    When the query is next parsed and you've got bind variable peeking enabled, you might get the 123 plan is that is the bind value at parse time and then run into problems for 456 or even vice versa.
    See http://jonathanlewis.wordpress.com/2009/05/06/philosophy-1/ for a discussion on binds and histograms which reflects the reasons for using either.

  • Block stock calculation from mseg table for any given date.

    I am calculating stock from mseg table for any given date. Not just month end stock or current stock. It could be back date also. It is tallying also with MB5B stock report of that date. Now I have to bifurcate that stock into unrestricted stock, quality stock and block stock.
    I have checked INSMK and ZUSTD field in mseg table, but could not concluded. Should I check movement type wise? Block/ Quality stock could be transferred into unrestricted stock also. That also I have to take care.
    Can anyone clearly explain how the stock type posting takes place in mseg table when goods receipt as block / quality stock and when the same goods transferred in unrestricted stock, what are the reference indication.

    DATA : LIST_TAB TYPE TABLE OF ABAPLIST.
    DATA: BEGIN OF VLIST OCCURS 0,
          FIELD1(5)  TYPE C,
          FIELD2(19) TYPE C,
          FIELD3(16) TYPE C,
          FIELD4(17) TYPE C,
          FIELD5(25) TYPE C,
          FIELD6(24) TYPE C,
          FIELD7(25) TYPE C,
          FIELD8(25) TYPE C,
          END OF VLIST.
    TYPES : BEGIN OF ITAB,
           MATNR(18) TYPE C,
           WERKS(5) TYPE C,
           END_MENGE(20) TYPE C,
           END OF ITAB.
    DATA : ITAB TYPE STANDARD TABLE OF ITAB WITH HEADER LINE,
            WA_TAB TYPE ITAB.
    ----submit command to run mb5b in the background and -
    ----push the data into an internal table -
    " Calling MB5B for displaying the Closing Stock
    SUBMIT RM07MLBD USING SELECTION-SCREEN  '1000'
                    WITH DATUM BETWEEN S_DATE-LOW AND S_DATE-HIGH
                    WITH MATNR IN S_MATNR WITH WERKS IN S_WERKS
                    WITH BWART-LOW = '601' EXPORTING LIST TO  MEMORY
                    AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        LISTOBJECT = LIST_TAB
      EXCEPTIONS
        NOT_FOUND  = 1
        OTHERS     = 2.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        LIST_INDEX         = -1
      TABLES
        LISTASCI           = VLIST
        LISTOBJECT         = LIST_TAB
      EXCEPTIONS
        EMPTY_LIST         = 1
        LIST_INDEX_INVALID = 2
        OTHERS             = 3.
    LOOP AT VLIST WHERE FIELD1 CS '|'.
    CHECK SY-TABIX GE 4.
    MOVE :  VLIST-FIELD1+1(4) TO ITAB-WERKS,
            VLIST-FIELD2+1(18) TO ITAB-MATNR,
            VLIST-FIELD8 TO ITAB-END_MENGE.
    APPEND ITAB.
    ENDLOOP.
    This is the program to call MB5B and the standard program and use the following settings for the closing stock opening stock and block stock

  • Material stock received and issued for a given period of time

    HOW to get the material stock received and issued for a given period of time including the open orders.
    if there is any BAPI Available then please tell me. or give me the table relations thaks.
    thanks inadvance

    hi friend,
    Why don't you try using a TIMER. Try using this code
    Timer timer = new Timer((TIMER), new ActionListener()
         public void actionPerformed(ActionEvent ae)
    // perform your task here...
    timer.setInitialDelay(TIMER);
    timer.setRepeats(true);
    timer.start();
    I think this will work fine.
    Bye,
    Ravi.

  • To find whether the reports are in use or not for a given period

    Hi Basis Gurus,
    We have an requirement here that the client wants to know that the whether the reports for a given period are in use (working) or not.
    I think we can do it when we have audit logging activated ,but now we dont have audit logging activated now.
    Let me give you an example below
    Suppose for past 1 year 100 reports are prepared and out of 100 reports 95 reports are not working and remaining 5 reports are working.How can i get the detials from the SAP system without audit logging activated.
    Please help me
    Regards,
    Anil.

    Hello,
    See if ST03N helps you.
    Switch to expert mode in ST03N. Naviagate to Workload > Month > month . Click on the available month. Then in the " Analysis Views" visible on the lower LHS, Select transaction profiles > standard. See if you have your 'Z' report in that.
    Thanks and regards,
    Anish

  • Generate report for employees on leave for a given period

    Hi,
    I want to know how can i extract a report of a list of employees who are on leave for a given period of time?
    For instance i want to a list of employees who are on vacation / leave (any kind of leave) for the period of April 2010
    Is there a standard report to generate this info? or any other way of doing it?
    Regards,
    Humaira

    HI all,
    Thanx for the response.
    The info set Query was great help.
    the Tcode PT_QTA10 only gives me the leave Quota of the employees which was also helpful. Thanx
    Regards,
    Humaira

  • Pending  GR / IR Balances report  for a given period

    Hi,
              How can you  check  pending  GR / IR doc's  for a given  period ?  In  MB5S there is no date field in selection sreen as well as output  layout. 
    Please  give  suggetions .
    Thanks &  Regards,
           Aruna.

    Hi,
    Check ME2l, ME2M report..use Selection Parameters as "RECHNUNG" for pending IR and "WE101" or "WE103"  for open GRs and ur required selection of vendor, material and document date
    Regards,
    Vikas

  • How to find what transaction an user was running for a given period

    hi
    could anybody tel me
    how to find what transaction a particular user was running for a given period
    in the past.............

    Hi,
    U need to findout the list of Tcode excuted by SAP user
    1) Tcode: ST03N
    2) Select Expert Mode option
               (there u find  Server Host name & Today)
       If u select Host name u find DAY/WEEK/Month (same thing will in Today option)
    3)Now u need to select the option of DAY,WEEK etc.
    Now u can find in two ways
    1) Transaction profile (Standard / EarlyWatch)
    2) User (user profile)
    If u select the Transaction profile
    Under these u find the option of Aggregation----application/package/tranasation etc.
    I hope these will help u to findout.
    Regards
    ASR

  • Need a function to calculate employee attendance data for a given period

    need a function to calculate employee attendance data for a given period
    as
    Working days,
    CL ,
    SL,
    PL,
    LWP
    regards,
    Gaurav Sood.

    Issue resolved

  • Automatically log back in for a given period of time

    I just started to work on web and have the following issue:
    We want some (mobile) users to be able to automatically log back in for a given period of time. It is not difficult to set cookie (valid user information without clear text) on the mobile device. For now the question is how we can log in using this cookie info.
    Web application uses "j_security_check", "j_security_check" checks the user/password.
    Question is how we can autologin using cookie information. Thanks guys!

    it is not problem to check cookie on exists and valid. Problem is 'where' where can I do it using 'j_security_check'

  • Projectwise settlement report for a given period

    Dear PS experts,
    Is there any report which i can see the projectwise settlement to AUC, Fixed asset and Cost center for a given period?.
    Regards
    Vetrivelan.

    May be you could try Tcode : KSB5 to see the settlement documents through dynamic selection and export to excel and filter it for  your project.

  • Batch wise stock for a given period or month

    Hi,
    My company wants to implement stock ageing report in MM.
    We manage the stocks in Batches. For us the main criteria for stock ageing is batch creation date.
    The report should run stock ageing based upon the date range given as an input screen
    For ex : date range in input can be of today or as of 30.06.2010.
    If the report is run as of today then I am able to get the batch stock from table MCHB . Quantity from field "CLABS"  and the batch creation date from the field "ERSDA"
    But if the report to be run as of 30-06-2010. Then I am not able to get the data from MCHBH as of 30.06.2010.
    I have checked for one material in the table and as per stock it should be 351 as of 30-06-2010 but in the MCHBH table for the month 06. year 2010 it is showing as 136 pcs only.
    As our LIS tables are not getting populated correctly I am not able to check those tables too.
    Can any one guide me with the logic or the table where I can get the batch stocks for a particular month.
    I need Material, Batch, Quantity month and year .
    Please advice how can i get the data and from which table.
    Thanks you for your support in advance.
    Regards
    Fazal

    Hi Jurgen,
    Thanks for your reply. I am not looking for any analysis report or LIS report.
    i am looking for simple ageing report for a date entered by the user. I got the logic and tables for the current date but if i need to refer the stock ageing of previous date like my stock ageing at 30-06-2010. I am not able to get any tables where i can have the batch stock for a given date or a month.
    The report output format to be
    stock <=30 days
    stock>30 and <=90
    stock>90 and <=180
    stock>180 days
    The criteria for calculation will be the date entered by the user in the input screen. If the user enters the date as 30-06-2010 then all the stock received in the month of june and still lying in my storage location will fall the category <=30 and display in the report.
    Stocks received in the month of march, april and may will fall under the category "stock >30 and <=90".
    If I can get the batch wise stock for a particular month , I can pick the posting date of the Goods receipt from the batch number and calcuate my ageing (i.e date entered in the input scren of the report 30-06-2010 - batch posting date).
    I am also referring to the note which you have sent but in the mean while if you can help me to identify the tables where I can get the batch stock for a particular month.
    Thanks
    Fazal.

  • Sequence Usage for a given Period

    Hi All,
    We would like to log the activity happening on a sequence and its usage in RAC environment. i.e In simple words
    we would like to know the increase in the maxvalue of the sequences for a given range or period say on a given Day @ 9.00 AM start of business hours the Seq.currval returns 100 and @ 3.00 PM same day same Seq.currval returns 500. How or Where to get the sequence which was heavily used during a day/period/time, can we have this information from ORACLE metadata repository. We want to cache those sequences which are heavily being used in DMLs for a specific range/period, all though from the development perspective we might be able to answer this we want to know whether this is possible from querying metadata. Hope to have a healthy discussion on this.
    Note - We are not storing the Sequence values in any of the physical tables in our schema.
    Thanks in advance.

    Thanks Asif for your participation. But we have around 900 sequenecs in our schema and we dont want to do this manually and we seek a way where System can say this to us by querying the metadata. Dont we have any metadata views which can give us about this particular data, we dont want to compare the snapshots between a period.
    We invite more participants.
    Thanks in advance

  • Purchase order for the given period

    dear friends
    good morning.
    Could any 1 of u tel me whether there is special way to list out the purchase orders created for a specific period (like for a month or week or quarter year ).
    hav a gr8 day
    regards
    sakthi

    If SAP BI data is available, you can obtain a list of purchase orders using a variable on the creation date from ODS 0PUR_O02 for Purchasing Data.  More information on this is available at the following URL:  http://help.sap.com/saphelp_nw70/helpdata/en/f1/1cb45733b38f47b6f5e9fa83309601/content.htm
    You can also query or read from InfoCube 0EM_C04 Procurement Evaluations.  More info can be found here: http://help.sap.com/saphelp_nw70/helpdata/en/1d/714e8154e340408512b23362eaeac5/frameset.htm
    Best regards,
    [Jeffrey Holdeman|https://wiki.sdn.sap.com/wiki/display/profile/Jeffrey+Holdeman]

Maybe you are looking for

  • Syncing the same iTunes library among multiple computers

    I have two computers, a Windows 7 laptop and a new iMac. iTunes on both computers are signed into the same Apple ID. I currently have my iTunes library on my laptop, but I would like to also have the exact same library on my iMac. For instance, if I

  • OnRelease, loops, level10 v level10.button ???

    After looking at some of the previous onRelease/for loop topics, I'm still stuck. I have 26 buttons for 26 letters in the alphabet. The buttons are defined on the stage already (they look like they're drawn in chalk, oh boy!). I'd like to do a loop t

  • Data recovery from a disk that is unmounted

    Here is my problem: disk utility had indicated that I had a couple of bad blocks in my start up disk and recommended that it be replaced. Since I already had a second internal hard drive with plenty of room on it, I simply installed OS 10.4 on the se

  • ADFS Group Filtering not working

    Hello guys I have deployed ADFS on our company. It's working good. When I define ADFS claim it looks like this: c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]  => issue(store = "Acti

  • Fail to re-deploy an application on Oracle EPM 11.1.1.1.0

    Hi, I am just trying to verify that whether Alias Table takes effect. So I add change some aliases for testing, and then re-deploy the application to activate it. But the re-deploy job is aborted by the system with an exception as below. Have anyone