0 Replies Latest reply on Mar 4, 2015 2:59 PM by 2646854

    Concurrent Program

    2646854

      Hi,

      Would you please help me to see what can be an issue for running an update statement with concurrent program

      We need to give a functional user a possibility to submit this program in order to update some wrong data

      We've add this procedure in an executable program with two inputs  livre and inv_name

      CREATE OR REPLACE PROCEDURE APPS.FA_update (livre IN varchar2,inv_nameIN varchar2,ERRBUF OUT VARCHAR2,RETCODE OUT VARCHAR2) as

      Nbr_status NUMBER;

      BEGIN

                      select count (inventory_name)into Nbr_status  from fa_inv_interface

              WHERE inventory_name =inv_name AND asset_id IN (SELECT asset_id  FROM fa_books  WHERE book_type_code =livre AND date_ineffective IS NULL)

              AND status = 'TO RECONCILE';

                If  Nbr_status>0 then

                 UPDATE fa_inv_interface

                 SET status = 'NEW' WHERE inventory_name =inv_name AND asset_id IN (SELECT asset_id  FROM fa_books  WHERE book_type_code =livre AND date_ineffective IS NULL)

                 AND status = 'TO RECONCILE';

                 COMMIT;

              else

                  Fnd_File.PUT_LINE(Fnd_File.OUTPUT,'Pas de données trouvées');

            

              end if;

                  Fnd_File.PUT_LINE(Fnd_File.OUTPUT,'Nombre immobilisations  à modifier '||Nbr_status) ;    

      EXCEPTION WHEN NO_DATA_FOUND THEN NULL

      END FA_update ;

      /