Thursday, August 29, 2013

Oracle Fixed Assets Data Extraction Report

SELECT DISTINCT
          fav.description        "Asset Description",
          fac.segment1           "Major Category",
          fac.segment2           "Minor Category",
          fav.CURRENT_UNITS      "Units",
          fab.cost               "Cost", 
          fal.SEGMENT3           "City"  ,     
          gcc.Segment1           "ExpAcnt1-Company",
          gcc.segment2           "ExpAcnt2-Costcentre",
          gcc.segment3           "ExpAcnt3-MainAccount",
          gcc.segment4           "ExpAcnt4-subAccount",
          gcc.segment5           "ExpAcnt5-project",
          gcc.segment6           "ExpAcnt6-region",
          gcc.segment7           "ExpAcnt7-Future1",
          gcc.segment8           "ExpAcnt8-Future2" ,
          gcc2.Segment1          "ClearAcnt1-Company",
          gcc2.segment2          "ClearAcnt2-Costcentre",
          gcc2.segment3          "ClearAcnt3-MainAccount",
          gcc2.segment4          "ClearAcnt4-subAccount",
          gcc2.segment5          "ClearAcnt5-project",
          gcc2.segment6          "ClearAcnt6-region",
          gcc2.segment7          "ClearAcnt7-Future1",
          gcc2.segment8          "ClearAcnt8-Future2"   ,
          fab.DATE_PLACED_IN_SERVICE "Date Placed in Service" ,
          fav.OWNED_LEASED           "Ownership" ,
          fav.NEW_USED               "Bought" ,
          ds.DEPRN_RESERVE           "Depreciation Reserve", 
          ds.YTD_DEPRN               "YTD Depreciation", 
          fab.deprn_method_code      "Depreciation Method",
          fab.life_in_months         "Life in Months"                     
     FROM fa_deprn_summary ds,
          fa_additions_v fav,
          fa_deprn_periods dp,
          fa_book_controls fb,
          gl_sets_of_books glsb,
          FA_CATEGORIES     fac,
          fa_books fab,
          fa_distribution_history fdh,
          gl_code_combinations gcc,
          gl_code_combinations gcc2,
          fa_locations fal     ,
          fa_category_books fcb             
    WHERE fb.book_type_code = ds.book_type_code
      AND fb.set_of_books_id = glsb.set_of_books_id
      AND ds.asset_id = fav.asset_id
      AND ds.book_type_code = dp.book_type_code
      AND ds.period_counter = dp.period_counter
      AND ds.deprn_source_code <> 'BOOKS'
      and ds.ASSET_ID =:asset_id
      and ds.book_type_code=:BOOK_TYPE_CODE
      and fav.ASSET_CATEGORY_ID =fac.CATEGORY_ID
      and fab.BOOK_TYPE_CODE =fb.BOOK_TYPE_CODE
      AND fab.date_ineffective IS NULL
      and fav.ASSET_ID =fab.ASSET_ID
      and fdh.ASSET_ID=fav.ASSET_ID
      and fal.LOCATION_ID=fdh.LOCATION_ID
      and fdh.DATE_INEFFECTIVE is null
      and gcc.CODE_COMBINATION_ID =fdh.CODE_COMBINATION_ID
      and gcc2.CODE_COMBINATION_ID=fcb.ASSET_CLEARING_ACCOUNT_CCID
      and fcb.CATEGORY_ID=fac.CATEGORY_ID
      and fcb.BOOK_TYPE_CODE =fb.BOOK_TYPE_CODE



No comments:

Post a Comment