3 Replies Latest reply on Dec 17, 2006 11:50 PM by 306078

    fnd_global.apps_initialize does not work

      Hi have found that fnd_global.apps_initialize does not work in SQL developer. If you run it in Toad it work fine. The purpowse of fnd_global.apps_initialize is to allow you to run code as if it was been run in Apps 11i.

      Any idea why?

           fnd_global.apps_initialize (888,888,888);
        • 1. Re: fnd_global.apps_initialize does not work
          I have been able to use fnd_global.apps_initialize in both SQL Developer 1.0 and 1.1.

          When you say that it does not work, what do you mean?
          • 2. Re: fnd_global.apps_initialize does not work
            I have a piece of code that fires off a pile of concurrent requests. Under SQL developer the request id is always zero (i.e. a request is not created) but under Toad it is fine. Some one else in my Company has a similar issue. Any ideas?

            p_requestid NUMBER;
            i NUMBER;
            fnd_global.apps_initialize (111,111,111); -- prod

            FOR i IN 10670 .. 10675 LOOP
            p_requestid :=
            (application => 'INV',
            -- application short name
            program => 'INV_ITEM_CAT_ASSIGN_OI',
            -- program short name
            argument1 => i,
                      argument2 => 1,
                      argument3 => 1);
            --dbms_output.put_line('Req ' || p_requestid);
            END LOOP;
            • 3. Re: fnd_global.apps_initialize does not work
              I use the following and I can successfully submit a concurrent request:

              l_req_id number;
              fnd_global.apps_initialize(1234, 20419, 0);
              l_req_id := fnd_request.submit_request(application => 'FND',
              program => 'FNDCPPGD',
              argument1 => 'FND',
              argument2 => 'FNDCPPGD');

              This submits the "Concurrent Program Details Report" concurrent program within the "Application Developer" responsibility as user ID 1234 - reporting on itself, just for the sake of passing something in the parameters.


              I would put some debugs after the apps initialize to make sure that the values are set properly (ie fnd_global.user_id, resp_id, resp_appl_id). I assume that the IDs are right as it works in TOAD, but worth a check.

              Do you get a result from FND_RESPONSIBILITY_VL for the responsibility id? I have had some issues with userenv('LANG') not being set correctly (ie returns GB, but only have US translations for Apps), and I don't know whether that would affect submitting requests.

              Apart from that, no other suggestions leap to mind.