1 Reply Latest reply on Feb 12, 2013 4:26 AM by 979900

    Oracle FA Asset Transfer API Error FA_DISTRIBUTION_PVT.units_in_sync return

      Hi All,

      I am using below code to transfer the asset from one location to another and stuck the error message as below. Can any one help me out of this.
      TRANSFER failed!.
      Error: ORA-01403: no data found
      Error: Error: function FA_DISTRIBUTION_PVT.units_in_sync returned failure
      Error: User-Defined Exception
      Error: Error: function FA_DISTRIBUTION_PVT.do_distribution returned failure
      Error: Error: function FA_TRANSFER_PUB.do_transfer returned failure

      l_return_status                                    varchar2(1);
      l_msg_count                                         number:= 0;
      l_msg_data                                              varchar2(4000);
      l_trans_rec                                         fa_api_types.trans_rec_type;
      l_asset_hdr_rec                                    fa_api_types.asset_hdr_rec_type;
      l_asset_dist_tbl                                    fa_api_types.asset_dist_tbl_type;
      temp_str                                              varchar2(512);
      fnd_profile.put('PRINT_DEBUG', 'Y');
      -- fill in asset information

      l_asset_hdr_rec.asset_id := 100001;
      l_asset_hdr_rec.book_type_code := 'IAEA MT FA BOOK';

      -- transaction date must be filled in if performing
      -- prior period transfer
      -- l_trans_rec.transaction_date_entered := to_date('01-JAN-1999 10:54:22','dd-mon-yyyy hh24:mi:ss');
      l_trans_rec.transaction_date_entered := to_date('21-DEC-2012 10:54:22','dd-mon-yyyy hh24:mi:ss');

      fill in distribution data for existing distribution lines
      affected by this transfer txn. Note: You need to fill in
      only affected distribution lines.
      For source distribution, you must fill in either existing
      distribution id or 2 columns(expense_ccid,location_ccid) or
      3-tuple columns(assigned_to,expense_ccid,and location_ccid)
      depending on the makeup of the particular distribution
      of the asset.
      l_asset_dist_tbl(1).distribution_id                          := 396330;
      l_asset_dist_tbl(1).transaction_units                          := 1;
      l_asset_dist_tbl(1).assigned_to                          := 2948;
      l_asset_dist_tbl(1).expense_ccid                          := 2606;
      l_asset_dist_tbl(1).location_ccid                          := 5255;
      either above 2 lines or below 4 lines must be provided
      for source distribution:

      l_asset_dist_tbl(1).transaction_units := -2;
      l_asset_dist_tbl(1).assigned_to := 11;
      l_asset_dist_tbl(1).expense_ccid :=15338;
      l_asset_dist_tbl(1).location_ccid := 3; */

      --fill in dist info for destination distribution
      l_asset_dist_tbl(2).transaction_units                               := 1;
      l_asset_dist_tbl(2).assigned_to                                    := NULL;
      l_asset_dist_tbl(2).expense_ccid                                    :=2606;
      l_asset_dist_tbl(2).location_ccid                                    := 5255;

      l_asset_dist_tbl(2).transaction_units                               := 1;
      l_asset_dist_tbl(2).assigned_to                                    := 2948;
      l_asset_dist_tbl(2).expense_ccid                                    := 2606;
      l_asset_dist_tbl(2).location_ccid                                    := 5272;

      l_trans_rec.who_info.last_updated_by                          := FND_GLOBAL.USER_ID;
      l_trans_rec.who_info.last_update_login                          := FND_GLOBAL.LOGIN_ID;

                               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,
                               p_calling_fn                               => NULL,
                               x_return_status                          => l_return_status,
                               x_msg_count                               => l_msg_count,
                               x_msg_data                               => l_msg_data,
                               px_trans_rec                               => l_trans_rec,
                               px_asset_hdr_rec                          => l_asset_hdr_rec,
                               px_asset_dist_tbl                          => l_asset_dist_tbl);
                if (l_return_status != FND_API.G_RET_STS_SUCCESS) then
                     dbms_output.put_line('TRANSFER failed!.');
                     l_msg_count := fnd_msg_pub.count_msg;
                     if (l_msg_count > 0) then
                          temp_str := substr(fnd_msg_pub.get(fnd_msg_pub.G_FIRST,
                          dbms_output.put_line('Error: '||temp_str);
                          for I in 1..(l_msg_count -1) loop
                               temp_str :=
                               dbms_output.put_line('Error: '||temp_str);
                          end loop;
                     end if;
                     dbms_output.put_line('TRANSFER completed successfully!');
                     dbms_output.put_line('THID = ' ||
                end if;


      Tajinder Singh
        • 1. Re: Oracle FA Asset Transfer API Error FA_DISTRIBUTION_PVT.units_in_sync return

          Please do the following procedure.

          There were 2 hidden segments in the accounting flexfield.

          All segments of the accounting flexfield must be displayed, though they can use default values.
          When doing an asset transfer, the system must be able to create all values for the new
          distribution, including the complete CCID.

          Display the segement and populate or provide a default value for usage on those segments so they can populate at build.