3 Replies Latest reply: Aug 23, 2011 1:49 PM by Stefan Wühl RSS

    Grouping item level

      Dear All

       

      My Data Table Contains Data as below

       

      TRANSACTION_DATEPRIMARY_QUANTITYNEW_COSTSUBINVENTORY_CODETRANSACTION_IDITEM_CODE
      9-Aug-11-50100.3789971530 - CFB606766030196037
      30-Jul-11100.3789971586083330196037
      30-Jul-1110099.52769275723 - STR586082830196037
      30-Jul-11100.7797641585334130196037
      30-Jul-1150100.0266872530 - CFB585333230196037
      2-Jun-11-50101.3558667723 - STR480718630196037
      31-Mar-11130101.3558667723 - STR354069130196037

       

      The Out put should be

       

      ITEM_CODESUBINVENTORY_CODEClosing QtyCostClosing Value
      30196037530 - CFB50100.37899715018.949855
      30196037723 - STR180100.378997118068.21948

       

      the conditions are

       

      1. The transaction_date shold be <= User Entered As of Date in Input box ( For Above Example Entered as 30-JUL-11)

       

      2. Closing Quantity = Sum(PRIMARY_QUANTITY)

       

      3. closing Balance = Closing Quantity * NEW_COST ( But New Cost Should Be Last Transaction id's and <=30-jul-11 for that particular item)