The seeded Exception and Payroll timecard layouts include a Cost Center component. The component references a specific FND value set (US#Cost Center) and saves the cost center entries to SEGMENT1 of the Cost Allocation Key Flex Field. Within the delivered OTL timecard LDT file, the cost center is referenced in the section marked ## Cost Center ##, as follows:
############################################################################ # Cost center choice list on the timecard matrix
############################################################################ BEGIN HXC LAYOUT COMPONENTS "Exception Timecard Layout - Cost Center"
OWNER = "CUSTOM"
COMPONENT VALUE = "COSTCENTER" SEQUENCE = "120"
COMPONENT DEFINITION = "CHOICE LIST" RENDER TYPE = "WEB"
PARENT COMPONENT =
"Exception Timecard Layout - Day Scope Building blocks for worker timecard matrix" REGION CODE = "HXC CUI TIMECARD"
REGION CODE APP SHORT NAME = "HXC"
ATTRIBUTE CODE = "HXC TIMECARD COST CENTER" ATTRIBUTE CODE APP SHORT NAME = "HXC"
BEGIN HXC LAYOUT COMP QUALIFIERS "Exception Timecard Layout - Cost Center" OWNER = "CUSTOM"
QUALIFIER ATTRIBUTE CATEGORY = "CHOICE LIST" QUALIFIER ATTRIBUTE1 = "CostCenterVO"
QUALIFIER ATTRIBUTE4 = "N"
QUALIFIER ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.CostCenterVO" QUALIFIER ATTRIBUTE20 = "N"
QUALIFIER ATTRIBUTE21 = "Y" QUALIFIER ATTRIBUTE22 = "L" QUALIFIER ATTRIBUTE25 = "FLEX"
QUALIFIER ATTRIBUTE26 = "Dummy Cost Context" QUALIFIER ATTRIBUTE27 = "Attribute1"
END HXC LAYOUT COMP QUALIFIERS END HXC LAYOUT COMPONENTS
Example: Suppose you want to reference a different independent value set for the Cost Center component and save to Segment 4 of the Cost Allocation Key. Perform these steps:
• Create the Independent Value Set, such as OTL ACCOUNT. • Set up values for OTL ACCOUNT.
• Create a View referencing the Independent Value set, and using an OTL Custom Component. (In this example Custom Component 9.)
CREATE OR REPLACE FORCE VIEW HXC CUI CUSTOM9 V ( display value ,value )
AS
select flex value display value, flex value id value from fnd flex values vl fv, fnd flex value sets fvs where fv.flex value set id = fvs.flex value set id and fvs.flex value set name = ’OTL ACCOUNT’
(Change the flex value set name (OTL ACCOUNT) to the name of the Independent Value Set you are using.). If you would like to display the Cost Segment value and the Description, use the following sql to create the view (changing the Independent Value set name and View number from 1-10)
CREATE OR REPLACE FORCE VIEW HXC CUI CUSTOM9 V ( display value
,value ) AS
select fv.flex value||’-’||fv.DESCRIPTION display value, to char(flex value id) value from fnd flex values vl fv, fnd flex value sets fvs
where fv.flex value set id = fvs.flex value set id and fvs.flex value set name = ’OTL ACCOUNT’
Modify the Cost Center section of the Layout, Review and Confirmation Pages with the following example component. ############################################################################
# Cost center choice list on the timecard matrix
############################################################################ BEGIN HXC LAYOUT COMPONENTS "Exception Timecard Layout - Cost Center"
OWNER = "CUSTOM"
SEQUENCE = "120"
COMPONENT DEFINITION = "CHOICE LIST" RENDER TYPE = "WEB"
PARENT COMPONENT =
"Exception Timecard Layout - Day Scope Building blocks for worker timecard matrix" REGION CODE = "HXC CUI TIMECARD"
REGION CODE APP SHORT NAME = "HXC"
ATTRIBUTE CODE = "HXC TIMECARD COST CENTER" ATTRIBUTE CODE APP SHORT NAME = "HXC"
BEGIN HXC LAYOUT COMP QUALIFIERS "Exception Timecard Layout - Cost Center" OWNER = "CUSTOM"
QUALIFIER ATTRIBUTE CATEGORY = "CHOICE LIST" QUALIFIER ATTRIBUTE1 = "Custom9VO"
QUALIFIER ATTRIBUTE4 = "N" QUALIFIER ATTRIBUTE10 =
"oracle.apps.hxc.selfservice.timecard.server.Custom9VO" QUALIFIER ATTRIBUTE20 = "N"
QUALIFIER ATTRIBUTE21 = "Y" QUALIFIER ATTRIBUTE22 = "L" QUALIFIER ATTRIBUTE25 = "FLEX"
QUALIFIER ATTRIBUTE26 = "Dummy Cost Context" QUALIFIER ATTRIBUTE27 = "Attribute4"
END HXC LAYOUT COMP QUALIFIERS END HXC LAYOUT COMPONENTS Note:
• The Cost Segment Values will be deposited in Segment 4 (QUALIFIER ATTRIBUTE27 = ”Attribute4” )
• The Value Set will be using the JAVA component Custom9VO, which calls the view created in step 3 (HXC CUI CUSTOM9 V). • The view returns the independent value set.
If you need to place additional Cost Center Segments on the Self Service Layout, you must make the following additional changes to the .LDT:
1. Show the Cost Center Choice List on Timecard matrix X times in the ldt file (where X is the number of times a cost allocation key flex segment should be shown)
2. Change the entry for SEQUENCE = ’120’ (above) to a value higher than 120, to show after the 1st Cost Center segment 3. Use a unique name for the new cost center segments (i.e replace ”Exception Timecard Layout - Cost Center” with a unique
name).
4. Ensure the BEGIN HXC LAYOUT COMPONENTS has a unique name for each Cost Allocation Key Flex Segment and matches the BEGIN HXC LAYOUT COMP QUALIFIERS
5. Ensure the View and VO numbers select the correct Value Set items
6. Ensure QUALIFIER ATTRIBUTE27 reflects the correct Cost Allocation Key FlexField
7. Define AK Attributes and Regions Items for the new segments, to display a Label other than Cost Center-see AK Items for the Labels on the Timecard, below.
8. Associate the new AK Regions and Attributes to the following lines in the Cost Center section of the LDT file: • REGION CODE = ”HXC CUI TIMECARD”
• REGION CODE APP SHORT NAME = ”HXC”
• ATTRIBUTE CODE = ”HXC TIMECARD COST CENTER” • ATTRIBUTE CODE APP SHORT NAME = ”HXC”
The text in bold here must use the new AK Region and Attributes for the Cost Allocation Key Flex Labels. AK Items for the Labels on the Timecard:
• Define Attributes
Attribute ID VALUE (Used on Timecard LDT File as ATTRIBUTE CODE) Attribute Name Meaningful Name (Used in Region )
Application Oracle Time and Labor (or shown as Capture) ApplicationData Type VARCHAR2
Label Value to Show on Timecard
• Define Region
Region ID VALUE (Used on Timecard LDT File as REGION CODE) Region Name Meaningful Name
Application Oracle Time and Labor (or shown as Capture) Object Name ICX PROMPTS
Region Style Page Layout Number of Columns 1
• After you have defined the Region, select ¡Region Items¿ button to add the attributes to the Region.
Attribute Type Attribute
Application Oracle Time and Labor
Attribute Name Attribute Name (created above) Sequence #
Item Style Text