1 Reply Latest reply: Sep 25, 2013 9:27 AM by user12197430 RSS

    Need to create custom offer letter templates for irec offer letters

    882517


      Hi All,

      I am trying to create a custom template for irec offer letters. The additional fields I require in the offer letter are configured as DFF on the Irec page. Steps I followed to create a custom template:

      1.Created a custom rtf and used tag names as specified in the standard "IRCESOLDD_SD.xml" file for the additonally configured DFF fields.

      2.Created a new template definiton and used the standard data definiton "iRecruitment Offer Letter Data" as reference while creating my template definiton.

      3.Associated this custom template to the required business group.

       

      But while navigating the irec page I get an error like below:

       

      Exception Details.

      oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select distinct tmpl.language||decode(tmpl.territory,'00',null,'-'||tmpl.territory) Template_Locale ,la.Name||':'||decode(tmpl.territory,'00',null,te.territory_short_name)||decode(tmpl.language,tb.default_language,decode(tmpl.territory,tb.default_territory,' (*)',null),null) name ,decode(tmpl.language,tb.default_language,decode(tmpl.territory,tb.default_territory,1,2),2) sort_order from xdo_lobs tmpl ,fnd_iso_languages_vl la ,fnd_territories_vl te ,xdo_templates_b tb WHERE tmpl.application_short_name= :1 and tmpl.lob_code= :2 and tmpl.lob_code = tb.template_code and tmpl.lob_type in ('TEMPLATE','MLS_TEMPLATE') and tmpl.file_status = 'E' and lower(tmpl.language)=la.iso_language_2 and upper(tmpl.territory)=te.territory_code(+) order by tmpl.language||decode(tmpl.territory,'00',null,'-'||tmpl.territory)) QRSLT ORDER BY sort_order,name at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912) at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:886) at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:1009) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:797) at oracle.apps.irc.offers.webui.IrcSaveForLaterCO.processFormRequest(IrcSaveForLaterCO.java:234) at oracle.apps.irc.offers.webui.CreateOfferCO.processFormRequest(CreateOfferCO.java:364) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:819) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1205) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2974) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431) at _OA._jspService(_OA.java:212) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:619) ## Detail 0 ## java.sql.SQLException: Missing IN or OUT parameter at index:: 1 at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1783) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3444) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3493) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491) at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:860) at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669) at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723) at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source) at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4560) at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743) at oracle.jbo.server.ViewRowSetImpl.activateRowSetState(ViewRowSetImpl.java:4972) at oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3747) at oracle.jbo.server.ViewRowSetIteratorImpl.getCurrentRow(ViewRowSetIteratorImpl.java:886) at oracle.jbo.server.ViewRowSetImpl.getCurrentRow(ViewRowSetImpl.java:2731) at oracle.jbo.server.ViewObjectImpl.doPassivateSettings(ViewObjectImpl.java:13050) at oracle.jbo.server.ViewObjectImpl.doPassivateSettings(ViewObjectImpl.java:12778) at oracle.jbo.server.ApplicationModuleImpl.passivateVOs(ApplicationModuleImpl.java:6825) at oracle.jbo.server.ApplicationModuleImpl.doPassivateState(ApplicationModuleImpl.java:6636) at oracle.jbo.server.ApplicationModuleImpl.doPassivateState(ApplicationModuleImpl.java:6667) at oracle.jbo.server.ApplicationModuleImpl.doPassivateAMState(ApplicationModuleImpl.java:6627) at oracle.jbo.server.Serializer.passivate(Serializer.java:191) at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:290) at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:267) at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:5305) at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5182) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.passivateState(OAApplicationModuleImpl.java:2542) at oracle.jbo.server.ApplicationModuleImpl.passivateStateForUndo(ApplicationModuleImpl.java:7634) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.passivateStateForUndo(OAApplicationModuleImpl.java:3634) at oracle.apps.irc.offers.server.OffersAMImpl.apiValidate(OffersAMImpl.java:3239) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:797) at oracle.apps.irc.offers.webui.IrcSaveForLaterCO.processFormRequest(IrcSaveForLaterCO.java:234) at oracle.apps.irc.offers.webui.CreateOfferCO.processFormRequest(CreateOfferCO.java:364) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:819) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1205) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2974) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431) at _OA._jspService(_OA.java:212) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:619) java.sql.SQLException: Missing IN or OUT parameter at index:: 1 at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1783) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3444) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3493) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491) at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:860) at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669) at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723) at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source) at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4560) at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743) at oracle.jbo.server.ViewRowSetImpl.activateRowSetState(ViewRowSetImpl.java:4972) at oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3747) at oracle.jbo.server.ViewRowSetIteratorImpl.getCurrentRow(ViewRowSetIteratorImpl.java:886) at oracle.jbo.server.ViewRowSetImpl.getCurrentRow(ViewRowSetImpl.java:2731) at oracle.jbo.server.ViewObjectImpl.doPassivateSettings(ViewObjectImpl.java:13050) at oracle.jbo.server.ViewObjectImpl.doPassivateSettings(ViewObjectImpl.java:12778) at oracle.jbo.server.ApplicationModuleImpl.passivateVOs(ApplicationModuleImpl.java:6825) at oracle.jbo.server.ApplicationModuleImpl.doPassivateState(ApplicationModuleImpl.java:6636) at oracle.jbo.server.ApplicationModuleImpl.doPassivateState(ApplicationModuleImpl.java:6667) at oracle.jbo.server.ApplicationModuleImpl.doPassivateAMState(ApplicationModuleImpl.java:6627) at oracle.jbo.server.Serializer.passivate(Serializer.java:191) at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:290) at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:267) at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:5305) at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5182) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.passivateState(OAApplicationModuleImpl.java:2542) at oracle.jbo.server.ApplicationModuleImpl.passivateStateForUndo(ApplicationModuleImpl.java:7634) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.passivateStateForUndo(OAApplicationModuleImpl.java:3634) at oracle.apps.irc.offers.server.OffersAMImpl.apiValidate(OffersAMImpl.java:3239) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:797) at oracle.apps.irc.offers.webui.IrcSaveForLaterCO.processFormRequest(IrcSaveForLaterCO.java:234) at oracle.apps.irc.offers.webui.CreateOfferCO.processFormRequest(CreateOfferCO.java:364) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:819) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1205) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2974) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431) at _OA._jspService(_OA.java:212) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:619)

       

      Could anyone please help me with this?

       

      Regards,

      Divya

        • 1. Re: Need to create custom offer letter templates for irec offer letters
          user12197430

          Hi Divya,

           

          When ever you will get exception with SQL statement just copy that statement to SQL editor and run the parameter.

          that statement will give you proper error which you can understand

           

          Check the below statement for your environment and check your offer letter territory and language if you can found out into the output of the below query.

           

          Query :-

           

          SELECT *

          FROM (SELECT DISTINCT

                       tmpl.language

                       || DECODE (tmpl.territory, '00', NULL, '-' || tmpl.territory)

                          template_locale,

                          la.name

                       || ':'

                       || DECODE (tmpl.territory, '00', NULL, te.territory_short_name)

                       || DECODE (tmpl.language,

                                  tb.default_language,

                                  DECODE (tmpl.territory,

                                     tb.default_territory, ' (*)',

                                     NULL),

                                  NULL

                          )

                          name,

                       DECODE (tmpl.language,

                               tb.default_language,

                               DECODE (tmpl.territory, tb.default_territory, 1, 2),

                               2

                       )

                          sort_order

                FROM xdo_lobs tmpl,

                     fnd_iso_languages_vl la,

                     fnd_territories_vl te,

                     xdo_templates_b tb

                WHERE   

          --          tmpl.application_short_name = :1

          --            AND tmpl.lob_code = :2

          --            AND

                      tmpl.lob_code = tb.template_code

                      AND tmpl.lob_type IN ('TEMPLATE', 'MLS_TEMPLATE')

                      AND tmpl.file_status = 'E'

                      AND LOWER (tmpl.language) = la.iso_language_2

                      AND UPPER (tmpl.territory) = te.territory_code(+)

                ORDER BY tmpl.language

                         || DECODE (tmpl.territory, '00', NULL, '-' || tmpl.territory))

               qrslt

          ORDER BY sort_order, name

           

          Let us know if you need any further help.

           

          Regards,

          Jigar Makwana