Sunday, 18 September 2016

Oracle Apps: Project Number disappear when the OTL Timecard is saved.

In one of the project We came across an issue in OTL Timecard. It took some time to finally figure out the reason, none of the google GOD or metalink notes helped. So I thought of sharing the details here, which might help someone.

The OTL Timecard was customized, but if the employee save the timecard before submitting, the Project Number gets disappeared from the screen. If he/she continue and submit the timecard without saving, it works fine. If he/she tries to update and existing timecard, then also the Project Number does not appear in the LOV field.

The customization done was as follows :

1. Expenditure Type was made hidden by modifying the Timecard Layout ldt file.
2. Customized the ProjectVO and added SYSLink and Expenditure Type to the Project VO and default the SysLinkFunc and ExpType when the Project Number is selected from the Project LOV.

The issue was the Sequence Number of the Expenditure Type field in the TIMECARD layout ldt. In the standard ldt, the sequence Numbers are as follows.

SYSTEMLINKAGEFUNCTION  --> 200
PROJECT                                  --> 210
TASK                                          --> 220
EXPENDITURETYPE                --> 230

Since the timecard is customized and the Expenditure is getting defaulted from the Project LOV the sequence number of component EXPENDITURETYPE should be less than the component PROJECT. Otherwise when the page tries to load the Project, the EXPENDITURETYPE component's value will come as NULL and the Project LOV will not return any value. The value of ExpenditureType field and the SysLink field will be added as a dynamic whereclause when the page tries to query the Project Number. This happens if the EXPTYPE and SYSLINKFUNC is specified in the QUALIFIER_ATTRIBUTE7.

So the solution was to change the sequence of EXPENDITURETYPE to 205.

Sample from the Layout ldt:
PROJECT:
 BEGIN HXC_LAYOUT_COMPONENTS "XXAJ Employee Timecard Layout - Project"  
      OWNER = "ORACLE12.1.3"  
      COMPONENT_VALUE = "XXAJPROJ"  
      REGION_CODE = "HXC_CUI_TIMECARD"  
      REGION_CODE_APP_SHORT_NAME = "HXC"  
      ATTRIBUTE_CODE = "HXC_TIMECARD_PROJECT"  
      ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"  
      SEQUENCE = "210"  
      COMPONENT_DEFINITION = "LOV"  
      RENDER_TYPE = "WEB"  
      PARENT_COMPONENT = "XXAJ Employee Timecard Layout - Day Scope Building blocks for worker timecard matrix"  
      LAST_UPDATE_DATE = "2004/05/24"  
      BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXAJ Employee Timecard Layout - Project"  
           OWNER = "ORACLE12.1.3"  
           QUALIFIER_ATTRIBUTE_CATEGORY = "LOV"  
           QUALIFIER_ATTRIBUTE1 = "XXAJEmpProjVO"  
           QUALIFIER_ATTRIBUTE2 = "N"  
           QUALIFIER_ATTRIBUTE3 = "XXAJ_EMP_PROJ_LOV"  
           QUALIFIER_ATTRIBUTE4 = "809"  
           QUALIFIER_ATTRIBUTE5 = "12"  
           QUALIFIER_ATTRIBUTE6 = "HxcCuiProjectNumber|XXAJPROJ-DISPLAY|CRITERIA|N|HxcCuiProjectId|XXAJPROJ|RESULT|N|HxcCuiProjectNumber|XXAJPROJ-DISPLAY|RESULT|N|HxcCuiExptypeExpType|EXPTYPE|RESULT|N|HxcCuiExptypeSysLinkFunc|SYSLINKFUNC|RESULT|N"  
           QUALIFIER_ATTRIBUTE7 = "EXPTYPE|ExpType|SYSLINKFUNC|SysLink"  
           QUALIFIER_ATTRIBUTE8 = "ProjectNumber"  
           QUALIFIER_ATTRIBUTE9 = "ProjectId#NUMBER"  
           QUALIFIER_ATTRIBUTE10 = "xxaj.oracle.apps.hxc.selfservice.timecard.server.XXAJEmpProjVO"  
           QUALIFIER_ATTRIBUTE11 = "TIMECARD_BIND_START_DATE|TIMECARD_BIND_START_DATE"  
           QUALIFIER_ATTRIBUTE17 = "OraTableCellText"  
           QUALIFIER_ATTRIBUTE20 = "N"  
           QUALIFIER_ATTRIBUTE21 = "Y"  
           QUALIFIER_ATTRIBUTE22 = "L"  
           QUALIFIER_ATTRIBUTE25 = "FLEX"  
           QUALIFIER_ATTRIBUTE26 = "PROJECTS"  
           QUALIFIER_ATTRIBUTE27 = "Attribute1"  
           QUALIFIER_ATTRIBUTE28 = "XXAJPROJ"  
           LAST_UPDATE_DATE = "2004/05/24"  
      END HXC_LAYOUT_COMP_QUALIFIERS  
 END HXC_LAYOUT_COMPONENTS  

EXPENDITURETYPE :
 BEGIN HXC_LAYOUT_COMPONENTS "XXAJ Employee Timecard Layout - Expenditure Type"  
      OWNER = "ORACLE12.1.3"  
      COMPONENT_VALUE = "EXPENDITURETYPE"  
      SEQUENCE = "205"  
      COMPONENT_DEFINITION = "HIDDEN_FIELD"  
      RENDER_TYPE = "WEB"  
      PARENT_COMPONENT = "XXAJ Employee Timecard Layout - Day Scope Building blocks for worker timecard matrix"  
      LAST_UPDATE_DATE = "2004/05/24"  
      BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXAJ Employee Timecard Layout - Expenditure Type"  
           OWNER = "ORACLE12.1.3"  
           QUALIFIER_ATTRIBUTE_CATEGORY = "HIDDEN_FIELD"  
           QUALIFIER_ATTRIBUTE18 = "EXCLUDE"  
           QUALIFIER_ATTRIBUTE19 = "|CSV|"  
           QUALIFIER_ATTRIBUTE20 = "N"  
           QUALIFIER_ATTRIBUTE21 = "Y"  
           QUALIFIER_ATTRIBUTE22 = "L"  
           QUALIFIER_ATTRIBUTE23 = "FORM"  
           QUALIFIER_ATTRIBUTE25 = "FLEX"  
           QUALIFIER_ATTRIBUTE26 = "PROJECTS"  
           QUALIFIER_ATTRIBUTE27 = "Attribute3"  
           QUALIFIER_ATTRIBUTE28 = "EXPTYPE"  
           LAST_UPDATE_DATE = "2004/05/24"  
      END HXC_LAYOUT_COMP_QUALIFIERS  
 END HXC_LAYOUT_COMPONENTS  


Feel free to point out if anything is missing/wrong in this blog.