5 Replies Latest reply on Jun 17, 2013 6:26 AM by ThAn

    Getting error while loading assets using API

    user12257567

      The error is as follows.

      l_error:Error: function fa_cache_pkg.fazcbc returned failure

      l_error:Error: function fa_addition_pub.do_addition returned failure

       

      Can anyone please let me know if you have solution

        • 1. Re: Getting error while loading assets using API
          vinod2303

          Can you please provide your API script here. also error message is not complete, can you please paste complete error message??

          Use FA_SRVR_MSG.get_message in a for loop to retreive complete error message for this API.

           

          Thanks,

          Vinod

          • 2. Re: Getting error while loading assets using API
            user12257567

            Hi Vinod,

             

            The error is as follows.

            FA Details Update Failed for BX Number:BX130614

            FA Details Update Failed  x_error_buf:ORA-0000: normal, successful completion - FA Details Update Failed ....!

            l_error:

            l_error:Error: function fa_cache_pkg.fazcbc returned failure

            l_error:Error: function fa_addition_pub.do_addition returned failure

            l_error:

            l_error:

            l_error:

            l_error:

            l_error:

            l_error:Error: function fa_cache_pkg.fazcbc returned failure

            l_error:Error: function fa_addition_pub.do_addition returned failure

            l_error:

            l_error:

            l_error:

            l_error:

            l_error:

            l_error:Error: function fa_cache_pkg.fazcbc returned failure

            l_error:Error: function fa_addition_pub.do_addition returned failure

            l_error:

            l_error:

            l_error:

            l_error:

             

            the code which we are using is.

            lx_trans_rec.transaction_type_code          :='CAPITALIZED';

                    lx_trans_rec.transaction_date_entered       :=l_receiving_date;

                    lx_dist_trans_rec.transaction_type_code     :='CAPITALIZED';

                    lx_dist_trans_rec.transaction_date_entered  :=l_receiving_date;

                    lx_asset_hdr_rec.book_type_code             :='CTO CORP BOOK';

                    lx_asset_desc_rec.asset_number              :=p_bx_number;

                    lx_asset_desc_rec.description               :=l_make||'.'||l_model;

                    lx_asset_desc_rec.asset_key_ccid            :=1001;

                    lx_asset_desc_rec.in_use_flag               :='YES';

                    lx_asset_desc_rec.inventorial               :='YES';

                    lx_asset_desc_rec.owned_leased              :='OWNED';

                    lx_asset_desc_rec.new_used                  :='NEW';

                    lx_asset_desc_rec.current_units             :=1;

                    lx_asset_desc_rec.unit_adjustment_flag      :='NO';

                    lx_asset_type_rec.asset_type                :='CAPITALIZED';

                    lx_asset_cat_rec.category_id                :=1;

                    lx_asset_fin_rec.date_placed_in_service     :=l_receiving_date;

                    lx_asset_fin_rec.deprn_start_date           :=l_receiving_date;

                    lx_asset_fin_rec.deprn_method_code          :='STL';

                    lx_asset_fin_rec.life_in_months             :=240;

                    lx_asset_fin_rec.cost                       :=l_purchase_price;

                    lx_asset_fin_rec.original_cost              :=l_purchase_price;          --Added by sive for the Original cost

                    lx_asset_fin_rec.recoverable_cost           :=l_purchase_price;          --Added by sive for the Original cost

                    lx_asset_fin_rec.prorate_convention_code    :='CTO PRORAT';

                    lx_asset_fin_rec.depreciate_flag            :='YES';

                   

                    -- deprn info

               lx_asset_deprn_rec.ytd_deprn                   := 0.00;

               lx_asset_deprn_rec.deprn_reserve               := 0.00;

               lx_asset_deprn_rec.bonus_ytd_deprn             := 0;

               lx_asset_deprn_rec.bonus_deprn_reserve         := 0;

              

                        l_asset_dist_rec.units_assigned         := 1;

                        l_asset_dist_rec.expense_ccid         := 1060;--4013;

                        l_asset_dist_rec.location_ccid         := 1;--1001;

                        l_asset_dist_rec.assigned_to         := NULL;

                        l_asset_dist_rec.transaction_units      :=1;

                        lx_asset_dist_tbl(1)             := l_asset_dist_rec;

             

             

                       FA_ADDITION_PUB.DO_ADDITION(

                        -- Standard Parameters --

                        p_api_version           => 1.0,

                        p_init_msg_list         => FND_API.G_FALSE,

                        p_commit                => FND_API.G_FALSE,

                        p_validation_level      => FND_API.G_VALID_LEVEL_FULL,

                        x_return_status         => l_return_status,

                        x_msg_count             => x_msg_count,

                        x_msg_data              => l_msg_data,

                        p_calling_fn            => l_calling_fn,

                        -- Transaction Object --

                        px_trans_rec            => lx_trans_rec,

                        px_dist_trans_rec       => lx_dist_trans_rec,

                        -- Asset Object --

                        px_asset_hdr_rec        => lx_asset_hdr_rec,

                        px_asset_desc_rec       => lx_asset_desc_rec,

                        px_asset_type_rec       => lx_asset_type_rec,

                        px_asset_cat_rec        => lx_asset_cat_rec,

                        px_asset_hierarchy_rec  => lx_asset_hierarchy_rec,

                        px_asset_fin_rec        => lx_asset_fin_rec,

                        px_asset_deprn_rec      => lx_asset_deprn_rec,

                        px_asset_dist_tbl       => lx_asset_dist_tbl,

                        -- Invoice Object --

                        px_inv_tbl              => lx_inv_tbl);

             

             

                                    IF (l_return_status <> fnd_api.g_ret_sts_success)

                                    THEN

             

             

                                            x_ret_code  := sqlcode;

                                            x_error_buf := sqlerrm||' - FA Details Update Failed ....!';

                                            FND_FILE.PUT_LINE( FND_FILE.LOG,'FA Details Update Failed for BX Number:'||p_bx_number);

                                            FND_FILE.PUT_LINE( FND_FILE.LOG,'FA Details Update Failed  x_error_buf:'||SUBSTR(x_error_buf, 1, 200));

             

             

                                                  IF (fnd_msg_pub.count_msg > 1)

                                                  THEN

                                                        FOR j IN 1 .. fnd_msg_pub.count_msg

                                                        LOOP

             

             

                                                              fnd_msg_pub.get(p_msg_index      =>  j,

                                                                              p_encoded        =>  'F',

                                                                              p_data           =>  l_msg_data,

                                                                              p_msg_index_out  =>  l_msg_index_out);

             

             

                                                             l_error   :=    SUBSTR(l_error, 1, 400)||SUBSTR(l_msg_data, 1, 400);

             

             

                                                             FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_error:'||SUBSTR(l_msg_data,1,400) );

             

             

                                                        END LOOP;

             

             

                                                  ELSE

             

             

                                                        fnd_msg_pub.get(p_msg_index       =>  1,

                                                                       p_encoded         =>  'F',

                                                                        p_data            =>  l_msg_data,

                                                                        p_msg_index_out   =>  l_msg_index_out);

             

             

                                                        l_error      :=     SUBSTR(l_error, 1, 400)||SUBSTR(l_msg_data, 1, 400);

             

             

                                                             FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_error:'||SUBSTR(l_msg_data,1,400) );

             

             

                                                  END IF;

             

             

             

             

                                    ELSIF (l_return_status = 'S')

                                    THEN

                                               x_ret_code  := sqlcode;

                                           x_error_buf := sqlerrm||'FA Details Updated Successfully ';

                                            FND_FILE.PUT_LINE( FND_FILE.LOG,'FA Details Updated Successfully for BX Number:'||p_bx_number);

             

             

                                    END IF;

             

             

               END;

             

            Regards,

            Siva

            • 3. Re: Getting error while loading assets using API
              ThAn

              Hi,

               

              did you check status of last depreciation run already? This sometimes avoides successful processing

              of additions via fa_addition_pub api, when status of depreciation is "Error" in fa_books_control...

               

              Regards

              • 4. Re: Getting error while loading assets using API
                user12257567

                Hi,

                 

                DEPRN_STATUS='C'.

                 

                Regards,

                • 5. Re: Getting error while loading assets using API
                  ThAn

                  Hi,

                   

                  enable debug/tracing for FA module via sys admin (use profile option "fnd: debug log enabled"),

                  have a look at last log message written to fnd_log_messages and rerun your api call.

                  Next have a look at table fnd_log_messages again and try to figure out if there's additional
                  information written.

                   

                  Regards