Group Team
Procedure apps_initialize can be used to apps initialize from backend.

It is tested in 11i.

CREATE OR REPLACE PROCEDURE apps_initialize
IS
v_responsibility_name VARCHAR2 (100) := 'Payables';
v_user_name            VARCHAR2 (100) := 'Oracle';
v_application_id         NUMBER := 0;
v_responsibility_id      NUMBER := 0;
v_user_id                 NUMBER := 0;
v_flag                      NUMBER := 0;
BEGIN
      --Getting Responsbility and Application Id
      BEGIN
           SELECT responsibility_id,
                      application_id
           INTO     v_responsibility_id,
                      v_application_id
           FROM   fnd_responsibility_tl
          WHERE  responsibility_name = v_responsibility_name
          AND LANGUAGE = USERENV ('LANG');
       EXCEPTION
          WHEN OTHERS
          THEN
                   DBMS_OUTPUT.put_line
                                ( 'Error in getting Responsibility information and error is '
                                 || SUBSTR (SQLERRM, 1, 200)
                                );
             v_flag := 1;
         END;
        ----Getting User Id
        BEGIN
             SELECT user_id
             INTO v_user_id
             FROM fnd_user
             WHERE user_name = v_user_name;
        EXCEPTION
            WHEN OTHERS
           THEN
                   DBMS_OUTPUT.put_line
                         ( 'Error in getting User information and error is '
                            || SUBSTR (SQLERRM, 1, 200)
                          );
                   v_flag := 1;
         END;

        IF v_flag = 0
        THEN
                fnd_global.apps_initialize (v_user_id,
                                                   v_responsibility_id,
                                                   v_application_id
                                                    );
        END IF;
EXCEPTION
    WHEN OTHERS
     THEN
            DBMS_OUTPUT.put_line
                   ( 'Error in procedure apps initialize and error is '
                     || SUBSTR (SQLERRM, 1, 200)
                    );
END;
/
Labels: edit post
3 Responses
  1. This is a good article & good site.Thank you for sharing this article. It is help us following categorize:
    healthcare, e commerce, programming, multi platform,inventory management, cloud-based solutions, it consulting, retail, manufacturing, CRM, technology means, digital supply chain management, Delivering high-quality service for your business applications,
    Solutions for all Industries,
    Getting your applications talking is the key to better business processes,
    Rapid web services solutions for real business problems,
    Web-based Corporate Document Management System,
    Outsourcing Solution,
    Financial and Operations Business Intelligence Solution,

    Our address:
    2002 Timberloch Place, Suite 200
    The Woodlands, TX 77380

    prologic-corp


  2. Sridevi K Says:

    Regards
    Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
    LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.


  3. It’s arduous to seek out knowledgeable people on this subject, but you sound like you recognize what you’re speaking about! Thanks online casino games


Post a Comment