[Home] [Help]
287: --g_total_assets := 0;
288:
289: -- Get concurrent request id for the mass reclass preview request.
290: -- h_request_id is used when request_id is inserted into the interface
291: -- table, fa_mass_reclass_itf.
292: -- Need to fetch request id from fnd_global package instead of fa_mass_reclass
293: -- table, since fa_mass_reclass table stores the latest request id for
294: -- the SRS Preview report requests(run after this module) or
295: -- Run requests only.
309: /*=========================================================================
310: Delete rows previously inserted into the interface table with the same
311: request id, if there is any.
312: =========================================================================*/
313: DELETE FROM fa_mass_reclass_itf
314: WHERE request_id = h_request_id;
315: COMMIT;
316:
317: /*=========================================================================
380: concat_string => h_new_concat_cat,
381: segarray => h_cat_segs);
382:
383: /* Loop all the qualified assets, and insert all the validated assets
384: into the interface table, fa_mass_reclass_itf. */
385: OPEN mass_reclass_assets;
386:
387: LOOP
388: a_index := a_index + 1;
458: -- to avoid records with duplicate asset id's in a_tbl.
459: a_index := a_index - 1;
460: END IF; /* IF (a_tbl(a_index).asset_id <> */
461:
462: /* Insert asset records into the interface table, FA_MASS_RECLASS_ITF,
463: at every 200 assets. */
464: -- If g_asset_count(number of valid assets) = 200, insert all the 200
465: -- asset records in a_tbl(1..a_index) into the interface table,
466: -- re-initialize the pl/sql table, a_tbl, and reset g_asset_count
565: UPDATE fa_mass_reclass
566: SET status = 'FAILED_PRE'
567: WHERE mass_reclass_id = X_Mass_Reclass_Id;
568: /* Delete rows inserted into the interface table. */
569: DELETE FROM fa_mass_reclass_itf
570: WHERE request_id = h_request_id;
571: /* Commit changes. */
572: COMMIT WORK;
573: /* Retrieve message log and write result to log and output. */
600: UPDATE fa_mass_reclass
601: SET status = 'FAILED_PRE'
602: WHERE mass_reclass_id = X_Mass_Reclass_Id;
603: /* Delete rows inserted into the interface table. */
604: DELETE FROM fa_mass_reclass_itf
605: WHERE request_id = h_request_id;
606: /* Commit changes. */
607: COMMIT WORK;
608: /* Retrieve message log and write result to log and output. */