Fixed Assets Additions API


Fixed asset additions uses following API

API Name: FA_ADDITION_PUB.do_addition

Public type definitions are available in FA_API_TYPES

Signature:
PROCEDURE do_addition(
    -- Standard Parameters --
    p_api_version           IN            NUMBER,
    p_init_msg_list         IN            VARCHAR2 := FND_API.G_FALSE,
    p_commit                IN            VARCHAR2 := FND_API.G_FALSE,
    p_validation_level      IN            NUMBER   :=FND_API.G_VALID_LEVEL_FULL,
    x_return_status         OUT NOCOPY    VARCHAR2,
    x_msg_count             OUT NOCOPY    NUMBER,
    x_msg_data              OUT NOCOPY    VARCHAR2,
    p_calling_fn IN VARCHAR2,
    -- Transaction Object --
    px_trans_rec            IN OUT NOCOPY fa_api_types.trans_rec_type,
    px_dist_trans_rec       IN OUT NOCOPY fa_api_types.trans_rec_type,
    -- Asset Object --
    px_asset_hdr_rec       IN OUT NOCOPY fa_api_types.asset_hdr_rec_type,
    px_asset_desc_rec      IN OUT NOCOPY fa_api_types.asset_desc_rec_type,
    px_asset_type_rec      IN OUT NOCOPY fa_api_types.asset_type_rec_type,
    px_asset_cat_rec       IN OUT NOCOPY fa_api_types.asset_cat_rec_type,
    px_asset_hierarchy_rec IN OUT NOCOPY fa_api_types.asset_hierarchy_rec_type,
    px_asset_fin_rec       IN OUT NOCOPY fa_api_types.asset_fin_rec_type,
    px_asset_deprn_rec     IN OUT NOCOPY fa_api_types.asset_deprn_rec_type,
    px_asset_dist_tbl      IN OUT NOCOPY fa_api_types.asset_dist_tbl_type,
    -- Invoice Object --
    px_inv_tbl             IN OUT NOCOPY fa_api_types.inv_tbl_type );

1. Pass standard set of parameters
2. Transaction object has to be prepared and pass it to px_trans_rec
3. Prepare asset object information and pass it to px_asset_hdr_rec, px_asset_type_rec, px_asset_cat_rec
4. Prepare Invoice object and pass it to px_inv_tbl
5. Get result through x_return_status & x_msg_data OUT parameters


Public Types
-- Asset Transaction Record Type
TYPE trans_rec_type IS RECORD (
      transaction_header_id          NUMBER                           ,
      transaction_type_code         VARCHAR2(20)                     ,
      transaction_date_entered      DATE                             ,
      transaction_name                VARCHAR2(30)                     ,
      source_transaction_header_id  NUMBER                           ,
      mass_reference_id              NUMBER                           ,
      transaction_subtype            VARCHAR2(9)                      ,
      transaction_key                  VARCHAR2(2)                      ,
      amortization_start_date       DATE                             ,
      calling_interface             VARCHAR2(30)     DEFAULT 'CUSTOM',
      mass_transaction_id           NUMBER                           ,
      deprn_override_flag           VARCHAR2(1)      DEFAULT 'N'     ,
      member_transaction_header_id  NUMBER                           ,
      trx_reference_id              NUMBER                           ,
      event_id                      NUMBER                           ,
      desc_flex                     DESC_FLEX_rec_type               ,
      who_info                      STANDARD_WHO_rec_type
     );
----------------------------------------------------------------------------------
-- Information used to uniquely identify an asset     
-- Neither asset_id and book_type_code cannot be null
----------------------------------------------------------------------------------
TYPE asset_hdr_rec_type IS RECORD (
      asset_id            NUMBER(15)     ,
      book_type_code      VARCHAR2(15)   ,
      set_of_books_id     NUMBER(15)     ,
      period_of_addition  VARCHAR2(1)
     );
-------------------------------------------------

-- Descriptive asset information --

--------------------------------------------------

TYPE asset_desc_rec_type IS RECORD (
      asset_number            VARCHAR2(15)                                          ,
      description             VARCHAR2(80)                                          ,
      tag_number              VARCHAR2(15)                                          ,
      serial_number           VARCHAR2(35)                                          ,
      asset_key_ccid          NUMBER                                                ,
      parent_asset_id         NUMBER                                                ,
      manufacturer_name       VARCHAR2(360)                                          ,
      model_number            VARCHAR2(40)                                          ,
      warranty_id             NUMBER                                                ,
      lease_id                NUMBER                                                ,
      in_use_flag             VARCHAR2(3)                                           ,
      inventorial             VARCHAR2(3)                                           ,
      commitment              VARCHAR2(150)                                         ,
      investment_law          VARCHAR2(150)                                         ,
      property_type_code      VARCHAR2(10)                                          ,
      property_1245_1250_code VARCHAR2(4)                                           ,
      owned_leased            VARCHAR2(15)                                          ,
      new_used                VARCHAR2(4)                                           ,
      current_units           NUMBER                                                ,
      unit_adjustment_flag    VARCHAR2(3)                                           ,
      add_cost_je_flag        VARCHAR2(3)                                           ,
      status                  VARCHAR2(150)                                         ,
      lease_desc_flex         DESC_FLEX_rec_type,
      global_desc_flex        DESC_FLEX_rec_type
     );

TYPE asset_type_rec_type IS RECORD (
      asset_type          VARCHAR2(11)    DEFAULT 'CAPITALIZED'
     );

TYPE asset_cat_rec_type IS RECORD (
      category_id              NUMBER                ,
      desc_flex                DESC_FLEX_REC_TYPE
     );
-------------------------------------------
-- Asset Financial Information --
---------------------------------------------

TYPE asset_fin_rec_type IS RECORD (
      set_of_books_id               NUMBER,
      date_placed_in_service        DATE,
      deprn_start_date              DATE,
      deprn_method_code             VARCHAR2(12),
      life_in_months                NUMBER,
      rate_adjustment_factor        NUMBER,
      adjusted_cost                 NUMBER,
      cost                          NUMBER,
      original_cost                 NUMBER,
      salvage_value                 NUMBER,
      prorate_convention_code       VARCHAR2(10),
      prorate_date                  DATE,
      cost_change_flag              VARCHAR2(3),
      adjustment_required_status    VARCHAR2(4),
      capitalize_flag               VARCHAR2(3),
      retirement_pending_flag       VARCHAR2(3),
      depreciate_flag               VARCHAR2(3),
      disabled_flag                     VARCHAR2(1), --HH group enable disable
      itc_amount_id                 NUMBER,
      itc_amount                    NUMBER,
      retirement_id                 NUMBER,
      tax_request_id                NUMBER,
      itc_basis                     NUMBER,
      basic_rate                    NUMBER,
      adjusted_rate                 NUMBER,
      bonus_rule                    VARCHAR2(30),
      ceiling_name                  VARCHAR2(30),
      recoverable_cost              NUMBER   );

TYPE asset_deprn_rec_type IS RECORD (
      set_of_books_id          NUMBER,
      deprn_amount             NUMBER,
      ytd_deprn                NUMBER,
      deprn_reserve            NUMBER,
      prior_fy_expense         NUMBER,
      bonus_deprn_amount       NUMBER,
      bonus_ytd_deprn          NUMBER,
      bonus_deprn_reserve      NUMBER,
      prior_fy_bonus_expense   NUMBER,
      reval_amortization       NUMBER,
      reval_amortization_basis NUMBER,
      reval_deprn_expense      NUMBER,
      reval_ytd_deprn          NUMBER,
      reval_deprn_reserve      NUMBER,
      production               NUMBER,
      ytd_production           NUMBER,
      ltd_production           NUMBER,
      impairment_amount        NUMBER,
      ytd_impairment           NUMBER,
      impairment_reserve       NUMBER,
        allow_taxup_flag         BOOLEAN
     );

TYPE asset_dist_rec_type IS RECORD (
      distribution_id   NUMBER,
      units_assigned    NUMBER,
      transaction_units NUMBER,
      assigned_to       NUMBER,
      expense_ccid      NUMBER,
      location_ccid     NUMBER
     );

Comments

Popular posts from this blog

Query to get FSG report details with row/column set

Sub Ledger Period Close Exception Report - R12

Sub Inventory Transfer API.