Item Cost of Items on a particular date

HI All,
We need to get the item cost of items on a particular date.
I have tested the following but it gives multiple results:
SELECT T0.ItemCode, Max(T0.Dscription) 'Item Name',T0.CalcPrice
FROM OINM T0
WHERE T0.DocDate = [%0]
GROUP BY T0.ItemCode, T0.Calcprice
I have checked the audit report too but it shows the current item cost.
is there a way to get the desired data?
Thanks,
Joseph

Hi Joseph,
Try this. I've been using this and giving me correct details.
SELECT
T3.WhsCode 'Whse Code', T3.WhsName 'Whse Name', T0.[ItemCode], T1.[ItemName],
sum(T0.[InQty] - T0.[OutQty]) 'OnHand', O2.CalcPrice/sum(T0.[InQty] - T0.[OutQty]) 'Cost'
FROM OINM T0 
INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
INNER JOIN OITB T2 ON T1.ItmsGrpCod = T2.ItmsGrpCod
INNER JOIN OWHS T3 ON T0.[Warehouse] = T3.WhsCode
INNER JOIN
SELECT DISTINCT o.Warehouse, o.ItemCode, o.Balance CalcPrice
FROM OINM O  INNER JOIN
  SELECT T0.[Warehouse] 'Whse', T0.[ItemCode] 'Code', MAX(T0.[CreateDate]) 'cDate' , MAX(T0.TransNum) '#'
  FROM OINM T0 WHERE T0.[CreateDate] <= '[%1]'
  GROUP BY T0.[Warehouse], T0.[ItemCode]
) O1 ON O.Warehouse = O1.Whse and O.ItemCode = O1.Code and O.CreateDate = O1.cDate and O.TransNum=O1.#
) O2 ON T0.Warehouse = O2.Warehouse and T0.[ItemCode] = O2.ItemCode
WHERE
T0.[CreateDate] <= '[%1]'
and T1.[ItemName] = '[%2]'
GROUP BY T3.WhsCode, T3.WhsName, T0.[ItemCode], T1.[ItemName], O2.CalcPrice
HAVING (sum(T0.[InQty] - T0.[OutQty]) <> 0)
ORDER BY T3.WhsCode, T0.[ItemCode]
you can also modify it to fit your needs.
Regards,

Similar Messages

  • Work item Requested start at particular date

    Hi ,
    workitem should be sent to the agent  on particular date ( not in no.of.days ).
    Please help me out.

    You can do this in 2 ways
    1) Select expression in the Workflow>>Activity>>Requested start - Choose the expression and give a preassigned variable
    2) Put a manual wait step before the step that needs to be sent to the user.
    Hope this help.
    Regards
    Simin

  • How to count number of items present in a data block

    hi all,
    how to count how many items present in a particular data block in oracle forms 10g.
    whether it is a text_item or display_item or list_item etc is there any method to do this.
    please reply....

    hi all,
    i have written this when-button pressed but the problem is how to get the next item name in the block
    DECLARE
         V_COUNT NUMBER:=0;
         V_FIRSTITEM VARCHAR2(100):='';
    BEGIN
         GO_BLOCK('BLOCK_ITEMCOUNT');
         V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', FIRST_ITEM);
         LOOP
              V_COUNT := V_COUNT + 1;
              EXIT WHEN GET_ITEM_PROPERTY(V_FIRSTITEM, NEXTITEM) IS NULL;
              --V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', NEXTITEM);
              --V_COUNT := V_COUNT + 1;
         END LOOP;
    END;

  • Standard  report(for open PO order items) with estimated Delivery dates

    hi friends
    i would like to know if there is any standard  report(for open PO order items) with estimated Delivery dates on it.
    thanks
    alahari

    ME2M (by material)
    ME2L (by vendor)
    ME2N (by number)
    Use selection parameter WE101 for open GR
    and scope of list EINT (scheduling lines)

  • FINT interest calculation on cust overdue items from net due date required

    Hi.
    I am running FINT option i am running interest calculation from net due date onwards whereas the system is calculating the interest from Next date of due date.
    For example: Customer invoice is raised on 01.01.2011 and Net due date is 01.01.2011. I gave the option in the interest calculation - SPRO - FINANCIAL ACCOUNTING(NEW) - ACCOUNTS RECEIVABLE AND ACCOUNTS PAYABLE - BUSINESS TRANSACTIONS - INTEREST CALCULATION - PREPARE ITEM INTEREST CALCULATION, Ref date as as 1 - Value date (Baseline date from Net Payment).
    Still the system is calculating the interest from 02.01.2011 instead of from 01.01.2011.
    Can anyone help me in this regard.
    Regards,
    Padmavathi

    Hi,
    We can calculate interest on items cleared with in the calculation period.
    When you are calculating interest on open items, system will check open items as on the Calculation Date.
    But if you want to calculate Interest on items cleared with in the calculation period., you have to check Calculate Interest on Cleared Items also.
    For Instance: If you are calculating Interest on 31st July for the period of 01.07.2009 to 31.07.2009, in this case
    some open items are already cleared with in this calculation period, even though you have to calcuate interest for those cleared items for that many days. System will calculate interest for that many days.
    Try with this option, still if you need any help please let me know.
    Thanks
    Chandra

  • FPBW: Extract Open Items with a posting date in the future

    Dear all,
    I'm are currently searching for possibilities to extract Open Items with a posting date in the future from SAP IS-U 4.72 into SAP BW 3.5.
    Currently I'm using the Business Content extractor 0FC_OP_01 together with the mass transaction FPBW in IS-U.
    The problem I'm facing is within the mass transaction FPBW. I've have set the key date at 01.11.2007, but this job already runs for 52.000 seconds on the same database select-statement.
    Does anybody know a possible solution to improve the performance of the statement below? (I pasted it from the process overview)
    ================================
    SELECT
    /*+
      INDEX("DFKKOP" "DFKKOP~1" "DFKKOP^1" "DFKKOP____1" "DFKKOP____1__X" "DFKKOP_1")
      "BETRH" , "BETRW" , "BUDAT" , "BUKRS" , "FAEDN" , "GPART" , "GSBER" , "INKPS" , "SPART" , "VKONT" ,
      "WAERS" , "MAHNV" , "ABWBL" , "APPLK" , "AUGBD" , "AUGBL" , "AUGBT" , "AUGDT" , "AUGRD" , "AUGST" ,
      "AUGWA" , "BLART" , "BLDAT" , "EMGPA" , "GRKEY" , "HVORG" , "MANSP" , "MWSKZ" , "OPBEL" , "OPSTA" ,
      "OPUPK" , "PERSL" , "PYMET" , "QSSHB" , "SBETW" , "SPZAH" , "STUDT" , "TVORG" , "VTREF" , "XBLNR" ,
      "XMANL" , "HKONT" , "OPUPZ" , "OPUPW" , "STAKZ" , "WHGRP" , "AUGBS" , "XANZA" , "XRAGL" , "ABWTP" ,
      "ASTKZ"
    FROM
      "DFKKOP"
    WHERE
      "MANDT" = :A0 AND "AUGST" = :A1 AND "GPART" BETWEEN :A2 AND :A3 AND ( "AUGDT" = :A4 OR "AUGDT" > :A5
      AND ( "BUDAT" <= :A6 OR "AUGBD" <= :A7 ) OR "WHGRP" <> :A8 AND "OPUPW" = :A9 )
    ORDER BY
      "AUGST" , "GPART"#
    =================================
    I have already tried to create an index on the following fields (in the same order):
    - MANDT           Client
    - AUGST           Clearing status
    - GPART           Business Partner Number
    - AUGDT           Clearing date
    - BUDAT           Posting Date in the Document
    Any help would be appreciated!
    Thanks in advance,
    Steven Groot

    Hi Marcos,
    When you have created the Restricted keyfigures for Open Items, You have to add the date characteristic on which you are looking open item and add the variable there.Here you have to use a variable of type Interval and select the operator "<" the date of the Variable.If you go through, there are standard variable for keydate, which you can use directly.
    Hope you got the idea
    Regards
    Happy Tony

  • Function module for GL account open items at a key date

    Is there a function module for "GL account open items at a key date" similar to following for customer and vendor accounts?
    BAPI_AR_ACC_GETOPENITEMS Customer account open items at a key date
    BAPI_AP_ACC_GETOPENITEMS Vendor account open items at a key date
    If not, please suggest any alternatives. I am looking to capture the output of FBL3N (GL account line item display) in a program.
    Thank you in advance.
    Prasanna Pujari

    hi,
    please go through the below link i think it will help u.
    http://sapfunctional.com/FI/GL/Balance.
    Regard
    Abhishek Tripathi

  • How to implement tooltip for the list items for the particular column in sharepoint 2013

    Hi,
    I had created a list, How to implement tooltip for the list items for the particular column in SharePoint 2013.
    Any help will be appreciated

    We can use JavaScript or JQuery to show the tooltips. Refer to the following similar thread.
    http://social.technet.microsoft.com/forums/en/sharepointdevelopmentprevious/thread/1dac3ae0-c9ce-419d-b6dd-08dd48284324
    http://stackoverflow.com/questions/3366515/small-description-window-on-mouse-hover-on-hyperlink
    http://spjsblog.com/2012/02/12/list-view-preview-item-on-hover-sharepoint-2010/

  • Error While creating a regular item without any demo data.

    Hi All,
    In RMS13.1.1, during creation of an item without any demo data, and entering all the required inputs on the item master & itemsupp form. When we click on “Retail by Zone” the following error message got displayed “Exchange rates does not exist” on the Item Retail Price by Zone window form.
    Thanks,
    Sushanth.D
    Edited by: user10680684 on Jul 13, 2010 2:51 AM

    What you can do is open the Form's fmb code in Forms Developer IDE, or switch on session level or database level SQL_TRACE to see the SQL statements that the Form is firing to the database. (Find the tracefile in the udump folder). Replaying the SQL statements from the SQL trace file in e.g. SQL*Developer may lead to a cursor or block that e.g. does not return any rows. You may need to replace bind variables' placeholders (:a1 etc.) found in the trace file with the relevant business values for your items, zones, etc.
    Good luck and let us know how you progress,
    Erik Ykema

  • How to change the url of "Add New Item" of a particular list in SharePoint 2013???

    Hi Guys,
    How to change the url of "Add New Item" of a particular list in SharePoint 2013???
    I need to redirect it into the page where I have created my Visual web part.
    Please suggest
    Warm Regards,
    Tony Joy

    Hi,
         There are multiple ways to change the form url like javascript, SharePoint designer, custom code, editing default form to have custom web part etc, Please follow the url below that describe diffent methods and steps
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/ec2769a0-683c-4023-8804-b596e4f92a3a/change-default-forms-on-custom-list?forum=sharepointcustomizationlegacy
    Hope it helps!!!
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. Thanks, Ajeet

  • Custom field in VA01 at item level in Additional Data B Tab

    Hi ,
    I have a requirement to add a custom field at item level in Additional Data B tab of VA01/VA02. We have to store the data in that field in the VBAP table also have to validate the data entered in the field when user hit save.
    Can any body tell me step by step procedure to do that.
    Appreciate your response.
    Thanks,
    Rohit

    Add append structure  ZAVBAP  in table VBAP in Tcode: SE11.
    In this structure include the new fields to be added to the screen.
    Then in Tcode : SE80
    take program: SAPMV45A
    take screen 8459  and add the new field.
    Also add the validation in the flow logic.

  • How do you use the "Item Containing Start/End Date" in a Calendar?

    Hi
    I want to do a calendar where the days shown will be conditional to a certain interval. Now I though I could achieve that using the Item Containing Start Date of a calendar. But it doesn't seem to work. In the help it says :
    Enter an item in the application which holds the start date of the calendar. The format of the date in this item must be YYYYMMDD.
    This is what I did here
    http://apex.oracle.com/pls/otn/f?p=34530:1::::::
    I have 3 fields. 2 for the Start Date and End Date and 1 for the "Date Item" parameter. Only the latter has an effect on the calendar display, the calendar only displays the month of the "Date Item" (in monthly mode).
    Wether or not I check "Begin at Start of Interval", it doesn't affect the way those fields are affecting the Calendar.
    So, how do we use that "Item Containing Start/End Date" parameter?

    Hello,
    does yout Script work when you begin with ?:
    Start-Process powershell -Verb runAs
    Best regards,
    Stefan
    German Orchestrator Portal ,
    My blog in English

  • Cannot reject/delete sales order line item due to del.date in 2210

    Hi all,
    not sure if anyone else had this issue already....
    Situation :
    Sales order line item entered with delivery date in 2210.    We would like to correct this order but can't....
    every time SAP issues error :
    Error determining posting period (info
    S008, variant GL, RC 3)               
    I believe this is because we haven't maintained our calendars yet for 2210 :-D
    Question : without us having to load/define the calendar...is there a utility/oss program which we can use to delete the line item, or reject it...or even update the delivery date?
    Thanks for your help!

    If the system pop ups the error message M2012, then please refer note 10891 or 37532.  If the error message number is different, please update the forum.
    thanks
    G. Lakshmipathi

  • How to make a single payment for different open  items with same due date

    Hi,
    I have created a payment method  and selected "Payment per due day " option in payment method company code settings.
    Even I have selected that option, Payment will not happen grouping for the items with same due date
    for ex : I have two open items with one due date and another open item with another due date so when I am trying performing F110 system should make a single payment for the item with same due date and seperate payment for another item.
    But system making single payment for all items
    Could you please suggest anything how to make a seperate payment with due date.
    Regards
    VK GUPTA

    Hi,
    Please check Vendor Master data: FK02 ->company code data -> Payment transaction accounting: unflag 'individual payment'.
    Make a test and let me know if it's okay.
    regards

  • Excel 2007 accessing PivotItem.Visible gives error if the field item value is a DATE

    I have VBA code to manipulate the content of a pivot table - essentially it hides all but the first N items in a pivotfield.  Under Excel 2003 the code works fine, as expected irrespective of the data content of the pivot field item.  Under Excel
    2007, if the data content is a date, the VBA code generates one of several error conditions.
    pivotItems(i).Visible = True
    Generates error 1004 - Unable to set the visible property of the pivot class
    If pivotItems(i).Visible = True then...
    Trying to test the visibility generates error 13 - type mismatch
    ?pivotItems(i).Visible
    Trying to determine the visibility of the pivot item in the VBA immediate window, this generates error 2042
    I have an illustrative spreadsheet which permits the code to process two different pivot tables, one using a field containg dates; the other a field containing text.  Under Excel 2003, the code works on both pivot tables.  Under Excel 2007 it works
    on the text field table, but fails on the date field table.
    I have looked for answers on numerous support forums including answers.microsoft but found not found any answers... only the same or similar unanswered question.

    Hi Herbert,
    Thank you for your continued interest; please find a revised illustration of the problem here -
    http://www.mediafire.com/download.php?zc6ty9ctl1n7yd9
    I have made the following changes / additions to the problem illustrator:-
    Adopted the use of lists for the data source of the pivot table
    Removed reference to '(blank)' as a reserved item not hidden by the VBA code to avoid the possibility of hiding all items
    In respect of my original code (MK1), utilised a 'real' item name to be the
    reserved item
    Added a new (MK2) macro to alter the number of visible items which
    hides all but one of the VisibleItems collection
    makes the first N items in the collection visible
    checks that there are only N items visible (the position of the reserved item
    might be greater than N)
    The code still executes as expected under 2003, but fails (the same as before) under 2007 when the data type of the PivotItem is date.
    The MK1 code fails when testing the current visibility of the Item before trying to set the visibility with:- RTE 1004 Unable to
    get the PivotItems property of the PivotField Class
    The MK2 code fails when trying to set the visibility with:- RTE 1004 Unable to
    set the Visible property of the PivotItem Class as reported above.  Note - given that MK2 avoids trying hide invisible items or unhide visible items, I no longer believe that this error is due to the attempt
    to set visibility to current state as seen under Excel 2003. I am deeply confused by this now!
    I observe with care the different CLASSES on which these failures are reported even though in each case the operations are on the PivotItem.Visible property - MK1 queries it / MK2 attempts to alter it. 
    Just in case you have been wondering where this is going, this spreadsheet has no prupose beyond illustrating the Excel 2003 / 2007 problem being encountered elsewhere when manipulating pivot table items whose value are dates.  The requirement
    is to provide a simple user interface to a complex managing reporting spreadsheet consisting of a significant number of pivot tables and charts - altering one cell causes the VBA code to modify the collection of pivot tables to deliver a revised view of the
    data.  All works fine for 2003 users of the model, but not 2007 users.  I need one spreadsheet which will work correctly on both 2003 & 2007.
    Regards.

Maybe you are looking for

  • Active Directory client not dynamically updating DNS

    Hi, There has been some other issues mentioned on other threads regarding the Active Directory Plugin within Lion, it does appear to be flaky. I just wanted to make sure that the issue I'm having is not down to a mis-config by myself. We have several

  • Tracing in enterpise portal

    Hi All, I wanted to know if there is a option of tracing as to what the user is trying to do like in ABAP stack we have st01 similarly can we do tracing in JAVA stack i wanted to trace something in enterpirse portal like whether the request is reachi

  • Mail Form In Campaign

    Hi, We are using CRM 7.0 (Marketing module). I have created Attribute Context for Mail Forms in the IMG and it is also appearing in the Web UI. Nothing is appearing in Attributes when I'm selecting "Insert Attributes". Could anyone provide me the con

  • Where is my serial # for Photoshop Elements 11?

    I have just purchased Photoshop 11, and need the serial # to register. There are so many numbers on the packaging and none of them are marked (serial number) as per the info on Adobe. How many numbers or letters are in the serial number and how do I

  • Keynote animation for ios

    Does anyone know of anyway to include a keynote animation in an iPad app.? The plan is to design a keynote animation and pass it over to our iOS iPad developers to include within the App build. Not sure if Keynote is the right way to go though. Anyon