Sign Up

Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Sorry, you do not have permission to add post.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Oraask Logo Oraask Logo
Sign InSign Up

Oraask

  • Write
    • Add A New Post
    • Ask A Question

Oraask Navigation

Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials
Home/ Questions/Q 82107
In Process
Question
kenDonald
  • 0
kenDonaldJunior
Asked: April 2, 20232023-04-02T05:13:25+03:00 2023-04-02T05:13:25+03:00In: Oracle EBS Queries

How to Initialize Oracle APPS session using SQL Developer

  • 0

I have started using SQL Developer recently, and facing a problem when trying to select from APPS views that use multi-org like po_headers, ap_invoices, and so on. I tried some scripts to initialize the session, like fnd_global.apps_initialize but without luck. any help will be appreciated.

  • 1 1 Answer
  • 104 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    Related Questions

    • Return to Vendor Tables in Oracle APPS R12
    • Query to Get Supplier Details in Oracle APPS R12
    • Query to get posted AP invoice in Oracle APPS R12
    • Query to Get Chart of Account Description in Oracle APPS R12
    • What are GL Tables in Oracle APPS R12

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
      2023-04-03T00:50:45+03:00Added an answer on April 3, 2023 at 12:50 am
      This answer was edited.

      You can use this script to initialize a session in SQL Developer and to be able to select from multi-org views in Oracle EBS R12

      DECLARE
          l_user_id NUMBER;
          l_resp_id NUMBER;
          l_app_id NUMBER;
          l_org_id NUMBER;
          l_err_num VARCHAR2(1000);
          l_err_msg VARCHAR2(1000);
      
      BEGIN
      
          SELECT user_id
          INTO l_user_id
          FROM fnd_user
          WHERE user_name = 'OPERATIONS';
      
          SELECT responsibility_id, application_id
          INTO l_resp_id,l_app_id
          FROM fnd_responsibility
          WHERE responsibility_key = 'PAYABLES_MANAGER';
      
          BEGIN
      
              fnd_global.apps_initialize(l_user_id,l_resp_id,l_app_id);
      
              fnd_global.set_nls_context(p_nls_language => 'AMERICAN'
                                        ,p_nls_date_format => NULL
                                        ,p_nls_date_language => NULL
                                        ,p_nls_numeric_characters => NULL
                                        ,p_nls_sort => NULL
                                        ,p_nls_territory => NULL);
      
              fnd_profile.get(name => 'DEFAULT_ORG_ID',val => l_org_id);
              mo_global.set_policy_context(p_access_mode => 'S',p_org_id => l_org_id);
              mo_global.init(p_appl_short_name => 'SQLAP');
      
          EXCEPTION WHEN OTHERS THEN
              l_err_num := sqlcode;
              l_err_msg := substr(sqlerrm,1,1000);
              raise_application_error(l_err_num,l_err_msg);
          END;
      END;
      
      • 0
      • Reply
      • Share
        Share
        • Share onFacebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Adv 250x250

    Explore

    • Categories
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Dev Tools
      • Online Compiler
      • Base64 Converter
    • Wiki
      • SQL Tutorials
      • Java Tutorials
      • Python Tutorials
      • JavaScript Tutorials

    Footer

    Oraask

    About

    Oraask is a website for developers and software engineers who want to learn new skills, share their knowledge, and solve their coding problems. Oraask provides free content on various programming languages and topics, such as Oracle, Python, Java, etc. Oraask also allows users to ask questions and get answers from other members of the community.

    About Us

    • About Us
    • Contact Us

    Legal Stuff

    • Privacy Policy
    • Terms & Conditions

    Follow

    Oraask is licensed under CC BY-NC-SA 4.0Oraask CopyrightOraask CopyrightOraask CopyrightOraask Copyright

    © 2019 Oraask. All Rights Reserved
    With Love by Oraask.

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.