4 Replies Latest reply: Jun 17, 2013 2:57 AM by Md. Zahid Khan RSS

    Unable to fetch data to additional column in Advance table

    Md. Zahid Khan

      Hi,

       

      We have a requirement to add additional column to Advance Search table. Moreover, we need to sort the table using this additional column.

       

      Now we have achieved the following:

      1.       The required VO was already extended previously and the additional column (LAST_UPDATE_DATE) is already present in the EO definition. So we have only added the tag for LAST_UPDATE_DATE in VO XML as:

         <ViewAttribute

            Name="LAST_UPDATE_DATE"

            IsPersistent="false"

            Type="oracle.jbo.domain.Date"

            ColumnType="DATE"

            AliasName="LAST_UPDATE_DATE"

            Expression="LAST_UPDATE_DATE"

            SQLType="DATE" >

         </ViewAttribute>

      2.       Added a new column of MessageStyledText and added the updated the following property:

      Prompt=LastUpdateDate. View Instance= TaskPerzSumVO. View Attribute= LAST_UPDATE_DATE. Sort Allowed=true

       

      The field is now visible in Advance Table and whenever we search, getting fixed value as ‘1901-01-01’. Whereas I’ve checked manually in the respective table, we have the proper data. But in the front-end we are not getting the data into our additional column of Advance table. Moreover, if we try to sort the table by clicking the LAST_UPDATE_DATE column, we are getting NPE Error. Spec of NullPointerException is as follow:

      ## Detail 0 ##

      1. java.lang.NullPointerException

              at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:989)

       

      Kindly help us to get proper data in our additional column. Thanks!

       

      Regards,

      Zahid

        • 1. Re: Unable to fetch data to additional column in Advance table
          Sandeep M.

          Hi Zahid,

           

          I assume that you are working on standard page and extending EO and VO.

          Adding  <ViewAttribute> tag alone will not help.

          Please add the VO attribute from the VO wizard by selecting it from available attributes in EO and ensure that it is added in SQL as well and mapped correctly in attribute mapping section.

           

          Secondly If your attribute is coming from EO then this tag should be something like below:

             <ViewAttribute

                Name="WfItemKey"

                EntityAttrName="WfItemKey"

                EntityUsage="XxqcFamilyAccommReqEO"

                AliasName="WF_ITEM_KEY" >

             </ViewAttribute>

           

          Also  IsPersistent="false" is used for transient attributes so it should not be present in your case.

          Hope its clear.

          • 2. Re: Unable to fetch data to additional column in Advance table
            Md. Zahid Khan

            Hi Sandeep,

             

            Thanks for the reply.

             

            Yes, we are extending the standard EO and VO. Again, the standard VO was already extended previously, hence I was only adding the EO attribute ( in VO's SQL statement) and adding EO tag in the already Extended VO.

             

            Moreover, you're also correct where the VO xml tag I was using was for transient attribute. I've tried with persistent=true. No change. Error persists.

             

            When I've used the tag specified by you, i.e. the following tag:

               <ViewAttribute

                  Name="LAST_UPDATE_DATE"

                  EntityAttrName="LAST_UPDATE_DATE"

                  EntityUsage="TaskEO.LAST_UPDATE_DATE"

                  AliasName="LAST_UPDATE_DATE" >

               </ViewAttribute>

            Now the page fails to load completely. It is now displaying the following error:

            Exception Details.

            oracle.apps.fnd.framework.OAException: Could not load application module 'oracle.apps.jtf.cac.task.server.TaskPerzSumAM'.

            ## Detail 0 ##

            JBO-30003: The application pool (oracle.apps.jtf.cac.task.server.TaskPerzSumAM) failed to checkout an application module due to the following exception:

            oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.NoObjException, msg=JBO-25003: Object TaskEO.LAST_UPDATE_DATE of type Entity Usage not found

             

            For your reference, the extended VO (before applying your specified veiw attribute tag) snippet is as follows:

            <?xml version='1.0' encoding='windows-1252' ?>

            <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">

            <ViewObject

               Name="TaskPerzSumVOEx"

               Extends="oracle.apps.jtf.cac.task.server.TaskPerzSumVO"

               BindingStyle="OracleName"

               CustomQuery="true"

               ComponentClass="oracle.apps.xxe.f632.jtf.cac.task.server.TaskPerzSumVOExImpl"

               FetchMode="FETCH_AS_NEEDED"

               UseGlueCode="false" >

               <SQLQuery><![CDATA[

               SELECT TaskEO.LAST_UPDATE_DATE

                FROM jtf_tasks_b TaskEO,

            /*<other join contions>*/

            ]]></SQLQuery>

                <DesignTime>

                  <Attr Name="_isCodegen" Value="true" />

                  <Attr Name="_isExpertMode" Value="true" />

                  <Attr Name="_version" Value="10.1.3.41.57" />

                  <Attr Name="_codeGenFlag2" Value="Access|Def|Coll|VarAccess" />

               </DesignTime>

                  <ViewAttribute

                  Name="LAST_UPDATE_DATE"

                  IsPersistent="true"

                  Type="oracle.jbo.domain.Date"

                  ColumnType="DATE"

                  AliasName="LAST_UPDATE_DATE"

                  Expression="LAST_UPDATE_DATE"

                  SQLType="DATE">

               </ViewAttribute>

            </ViewObject>

             

            Kindly help.

             

            Many Thanks,

            Zahid

            • 3. Re: Unable to fetch data to additional column in Advance table
              Sandeep M.

              Hi Zahid,

               

              This is the error:

               

              29000: Unexpected exception caught: oracle.jbo.NoObjException, msg=JBO-25003: Object TaskEO.LAST_UPDATE_DATE of type Entity Usage not found

               

              Entity usage tag should have only EO name and not the attribute name.

               

              use below tag instead:

               

              EntityUsage="TaskEO"

               

              Also I mentioned that instead adding tags manually, please try VO wizard to add this attribute from EO attributes available list.

              • 4. Re: Unable to fetch data to additional column in Advance table
                Md. Zahid Khan

                Hi Sandeep,

                 

                Added the VO additional column thorugh Jdeveloper wizard, it generated a transient column. Further on, on editing the fileds and applying the VOExtension
                worked. Thanks a lot.

                 

                Many Thanks,

                Zahid