1 2 Previous Next 20 Replies Latest reply: Apr 14, 2013 5:20 AM by Mini Go to original post RSS
      • 15. Re: APPS initialization is not working in APEX(under VPD)
        Mini
        Hi Vikram,

        Im not sure what is wrong with that pl-sql intialization block as it seems to be fine, but not sure why it is not carrying the EBS user sessin lang to the apex.

        Whether apex_util.set_session_lang api will be useful for capturing lang, if so how i can use it in the apex.

        Thanks

        Brgds,
        Mini
        • 16. Re: APPS initialization is not working in APEX(under VPD)
          Mini
          Hi Vikram,

          I can get the EBS language session code to an apex item with help of Rod, if i used the below query in the page item source like
          select decode(nls_language,'ARABIC','AR','AMERICAN','US', nls_language)
          from icx_sessions
          where session_id = icx_sec.getsessioncookie;
          Since i have apex session access to the EBS cookie and due to that i can fetch the EBS session code to an apex page item.

          Due to that i can show the Arabic data in the apex.

          But as a part of the page item and labels translation in apex im not sure of how to pass this ebs language session code to the application item FSP_LANGUAGE_PREFERENCE in the apex url, once it is redirected from EBS menu to APEX so that i can get the labels and page item to be in translated language automatically without changing it manually in apex.

          Thanks in advance.

          Brgds,
          Mini
          • 17. Re: APPS initialization is not working in APEX(under VPD)
            VC
            Create a database procedure to set the item session state and use that procedure in Share components > Authentication schemes > Post-Authentication Procedure Name
            OR
            Use Share components > Authentication schemes >Source > PL/SQL Code and Post-Authentication Procedure Name

            Please note that you have to include your above sql statement logic into the procedure to fetch the lang and set to FSP_LANGUAGE_PREFERENCE
            //something like
            set_lang('FSP_LANGUAGE_PREFERENCE');
            
            //your proc will look like
            procedure set_lang(p_item in varchar2)
            as
            begin
            //fetch lang into l_lang
            set into app item
            apex_util.set_item_session(p_item,l_lang);
            end;
            • 18. Re: APPS initialization is not working in APEX(under VPD)
              Mini
              Hi Vikram,

              Thanks for the reply.

              I have followed the below steps like you adviced.

              <li>i searched for set_item_session procedure but i dint get in apex_util, instead i referred with set_session_state and created procedure like below
              create or replace procedure set_lang(p_item in varchar2)
              as
              l_lang varchar2(30);
              begin
              select distinct decode(nls_language,'AMERICAN','US', nls_language) into l_lang
              from apps.icx_sessions;
              --set into app item
              apex_040200.htmldb_util.set_session_state(p_item,l_lang);
              end; 
              <li>i gave under post-authentication procedure name under my custom authentication scheme like
              set_lang('FSP_LANGUAGE_PREFERENCE');
              <li> Also i gave under the plsql code under the custom authentication scheme
              begin
              set_lang('FSP_LANGUAGE_PREFERENCE');
              end;
              After all these steps, i tried to navigate from ebs menu to apex im getting the below error like
              Error in PLSQL code raised during plug-in processing.
              ORA-44004: invalid qualified SQL name
              
              Technical Info (only visible for developers)
              
                  is_internal_error: true
                  apex_error_code: WWV_FLOW_PLUGIN.RUN_PLSQL_ERR
                  ora_sqlcode: -44004
                  ora_sqlerrm: ORA-44004: invalid qualified SQL name
                  component.type: APEX_APPLICATION_AUTH
                  component.id: 6826901411823313
                  component.name: Custom
                  error_backtrace:
              
                  ORA-06512: at "SYS.DBMS_ASSERT", line 188
                  ORA-06512: at "APEX_040200.WWV_FLOW_AUTHENTICATION", line 1233
              Suppose if i removed the procedure which i referred under the post-authentication function name means, im  not getting the above error but not sure whether it is recognizing the ebs session language to the FSP_LANGUAGE_PREFERENCE application item.

              How i can idenfity in apex like whether the ebs session language is set for the FSP_LANGUAGE_PREFERENCE item. Whether it will reflect in the apex url once it is navigated from the EBS menu.

              Thanks

              Brgds,
              Mini
              • 19. Re: APPS initialization is not working in APEX(under VPD)
                VC
                Mini wrote:
                Hi Vikram,

                Thanks for the reply.

                I have followed the below steps like you adviced.

                <li>i searched for set_item_session procedure but i dint get in apex_util, instead i referred with set_session_state and created procedure like below
                I meant apex_util.set_session_state
                How i can idenfity in apex like whether the ebs session language is set for the FSP_LANGUAGE_PREFERENCE item. Whether it will reflect in the apex url once it is navigated from the EBS menu.
                Use debug option and run you page in debug mode
                • 20. Re: APPS initialization is not working in APEX(under VPD)
                  Mini
                  Hi vikram,

                  Since i enabled the debug mode in the application and also the debug option underneath the page but i couldnt find any changes to the page, like i couldnt see the
                  application item FSP_LANGUAGE_PREFERENCE with the ebs session language code(either 'ar' or 'en').

                  But i got a clue like if i hardcode like below in the LaunchApex.jsp which does the redirection to apex page from the ebs menu i can get the corresponding Arabic or English fonts according to the code that i hardcode in the jsp. This is the below jsp code.
                  <%@ page contentType="text/html;charset=UTF-8" %><%--
                  /* LaunchApex.jsp */
                  --%><%@ page
                  import="java.io.*"
                  import="java.net.*"
                  import="java.sql.*"
                  import="javax.servlet.http.*"
                  import="java.util.Enumeration"
                  import="java.util.Properties"
                  import="java.lang.Math"
                  import="oracle.apps.fnd.common.VersionInfo"
                  import="oracle.apps.fnd.functionSecurity.Function"
                  import="oracle.apps.fnd.functionSecurity.RunFunction"
                  import="oracle.apps.fnd.common.WebAppsContext"
                  import="oracle.apps.fnd.common.AppsEnvironmentStore"
                  import="oracle.apps.fnd.common.WebRequestUtil"
                  import="oracle.apps.fnd.common.ResourceStore"
                  import="oracle.apps.fnd.security.CSS"
                  import="oracle.apps.fnd.common.Message"
                  import="oracle.jdbc.OracleConnection"
                  import="oracle.jdbc.OraclePreparedStatement"
                  import="oracle.jdbc.OracleResultSet" %>
                  <%
                  // Session has to be validated first
                  WebAppsContext ctx = WebRequestUtil.validateContext(request, response);
                  if (ctx==null) {
                  return; }
                  String cookieName = ctx.getSessionCookieName();
                  boolean validSession = ctx.validateSession(cookieName);
                  WebRequestUtil.setClientEncoding(response, ctx);
                  %>
                  <html>
                  <head>
                  <title>Launch Apex</title>
                  <!-- LaunchApex.jsp -->
                  </head>
                  <body>
                  <%
                  String p_application = request.getParameter("application");
                  p_application = ( p_application==null ? "NONE" : p_application);
                  String p_page = request.getParameter("page");
                  p_page = ( p_page==null ? "1" : p_page);
                  String p_item_names = request.getParameter("item_names");
                  p_item_names = ( p_item_names==null ? "" : p_item_names);
                  String p_item_values = request.getParameter("item_values");
                  p_item_values = ( p_item_values==null ? "" : p_item_values);
                  AppsEnvironmentStore m_env = (AppsEnvironmentStore) ctx.getEnvStore();
                  try {
                  String l_launcher = ctx.getProfileStore().getProfile("OAE_LAUNCHER");
                  l_launcher = l_launcher + "/pls/apex/f?p=" + p_application + ":" + p_page;
                  l_launcher = l_launcher + "::APPS:::" + p_item_names + ":" + p_item_values;
                  if (ctx!=null) ctx.freeWebAppsContext();
                  response.sendRedirect(l_launcher);
                  } //try
                  catch (Exception e) {
                  out.println("Exception found : <pre>");
                  e.printStackTrace(new PrintWriter(out));
                  out.println("</pre>");
                  } //catch
                  %>
                  </body>
                  </html>
                  In the above jsp in the line
                  l_launcher = l_launcher + "::APPS:::" + p_item_names + ":" + p_item_values;
                  if i gave like below means
                  l_launcher = l_launcher + "::APPS:::" + 'FSP_LANGUAGE_PREFERENCE' + ":" + 'ar';
                  i can get the page items and labels to be turned automatically to Arabic soon after i logged into apex home page via EBS menu, and same like for English i gave like below

                  l_launcher = l_launcher + "::APPS:::" + 'FSP_LANGUAGE_PREFERENCE' + ":" + 'en';
                  But im not sure of how to pass the 'ar' or 'en' dynamically to the parameter p_item_values according to the ebs login language session. You have any idea of how to pass the ebs session language code dynamically to the item_values parameter in the jsp.

                  Thanks in advance.

                  Brgds,
                  Mini
                  1 2 Previous Next