user75ponic user75ponic - 5 months ago 13
SQL Question

PLSQL- How to exit FORALL Loop

I have the following code snippet in a procedure, currently

apps.fnd_global. apps_initialize
method execution is part of FORALL loop.

I would like to call
apps.fnd_global. apps_initialize
not in the loop. When insert finishes, then
apps.fnd_global. apps_initialize
should execute only once.

How can I do this?

FORALL i IN 1 .. my_array.COUNT
INSERT
INTO my_table
......
COMMIT;

apps.fnd_request.submit_request (application => 'PO',
program => 'REQIMPORT',
argument1 => l_p4,
argument2 => l_p5,
argument3 => l_p6,
argument4 => '',
argument5 => 'N',
argument6 => 'N');
COMMIT;

Answer

You can try by loop:-

FOR i IN 1 .. my_array.COUNT
   LOOP
       INSERT
       INTO my_table
        ......
   END LOOP;
   commit;      

     apps.fnd_request.submit_request (application   => 'PO',
                                      program       => 'REQIMPORT',
                                      argument1     => l_p4,
                                      argument2     => l_p5,
                                      argument3     => l_p6,
                                      argument4     => '',
                                      argument5     => 'N',
                                      argument6     => 'N');
Comments