Creating timecard

1. A timecard is a combination of DAYS. Each DAY will be one Row in a table. For Every day that you need to enter time (e.g. Saturday Sunday will not need a time entry being a holiday) you need a DETAIL type row also. And, for each DETAIL record that has to go into an element or project for costing or payroll purpose, we need an ATTRIBUTE also.
2. TYPE: MEASURE ( Number of hours to be put in that particular day) or RANGE (For period like week or day). SCOPE: TIMECARD, DAY, DETAIL or APPLICATION_PERIOD

3.

Now, if you see a typical timecard, this is how it looks (Use the hierarchical Query below):

4.

TIMECARD (12/1/2008 - 12/7/2008) TYPE: RANGE |_ DAY (12/1/2008 – 12/1/2008) TYPE: RANGE |_ DETAIL (12/1/2008): 8 HRS (may have attributes)

TYPE:MEASURE |_ DAY (12/2/2008 – 12/2/2008) |_ DETAIL (12/2/2008): 8 HRS |_ DAY (12/3/2008 – 12/3/2008) |_ DETAIL (12/3/2008): 8 HRS |_ DAY (12/4/2008 – 12/4/2008) |_ DETAIL (12/4/2008): 8 HRS |_ DAY (12/5/2008 – 12/5/2008) |_ DETAIL (12/5/2008): 8 HRS |_ DAY (12/6/2008 – 12/6/2008) |_ DAY (12/7/2008 – 12/7/2008)

5. SELECT htbb.time_building_block_id, htbb.TYPE, htbb.measure, htbb.unit_of_measure,
htbb.start_time, htbb.stop_time,htbb.parent_building_block_id, ‘N’ parent_is_new, htbb.SCOPE,htbb.object_version_number, htbb.approval_status,htbb.resource_id, htbb.resource_type, htbb.approval_style_id,htbb.date_from, htbb.date_to, htbb.comment_text,htbb.parent_building_block_ovn, ‘N’ NEW, ‘N’ changed,htbb.application_set_id, htbb.translation_display_key FROM apps.hxc_time_building_blocks htbb START WITH ( htbb.time_building_block_id in (6848088) AND htbb.object_version_number in (1 ) )CONNECT BY PRIOR htbb.time_building_block_id = htbb. parent_building_block_id AND PRIOR htbb.object_version_number = htbb.parent_building_block_ovn ORDER BY htbb.time_building_block_id ASC
6. hxc_timestore_deposit.create_timecard_bb – Create a Timecard building block (only timecard, no days, or details) – Here are the parameters it takes ( p_start_time => to_date(’01-DEC-2008 00:00:00′,’DD-MON-YYYY HH24:MI:SS’) , p_stop_time => to_date(’07-DEC-2008 23:59:59′,’DD-MON-YYYY HH24:MI:SS’), p_resource_id => emp.person_id , p_comment_text => ‘Automated TimeCard: DEC08′, p_approval_style_id => 41, –This is your workflow approval style, default to AUTO APPROVE p_app_blocks => l_tbl_timecard_info, p_time_building_block_id => l_tc_bb_id –returns the id of TC Building block );

7.

hxc_timestore_deposit.create_day_bb – Creates a DAY building block (only DAY no details) – Here are the parameters it takes ( p_day => l_start_date,

p_mode => ‘SUBMIT’. 8. p_comment_text => ‘Automated TimeCard: DEC08′. p_app_attributes => l_tbl_attributes_info. p_app_attributes => l_tbl_attributes_info. p_app_attributes=> l_tbl_attributes_info). ( p_validate => FALSE. p_time_building_block_id => l_day_bb_id ). p_app_blocks => l_tbl_timecard_info. p_attribute_name=> ‘Dummy Element Context’. hxc_timestore_deposit. 9. days and details with attributes. in next step we have to attach the attribute to this DETAIL – Here are the parameters it takes ( p_type => ‘MEASURE’.p_parent_building_block_id => l_tc_bb_id. p_messages => l_tbl_messages. p_retrieval_process => ‘BEE Retrieval Process’. p_attribute_value=> ‘ELEMENT – 60110′. p_timecard_id => l_new_timecard_id. p_comment_text => ‘Automated TimeCard: DEC08′. p_app_blocks => l_tbl_timecard_info.EXECUTE_DEPOSIT_PROCESS –This is the Submission Call. p_app_blocks => l_tbl_timecard_info. p_measure => 8. –This is the Accrual PTO Element we want to update through this API. p_time_building_block_id => l_detail_bb_st_id ). Timecard will stay in SUBMITTED State until approved via Manual or AUTO Approve process. This process will submit the timecard. p_timecard_ovn => l_new_timecard_ovn ). HXC_TIMESTORE_DEPOSIT. hxc_timestore_deposit. p_deposit_process => ‘OTL Deposit Process’.create_attribute ( p_building_block_id=> l_detail_bb_st_id. . –Number of Hours p_parent_building_block_id => l_day_bb_id.create_detail_bb – Creates a DETAIL building block.

  .

.

  %!# * .

.

  .

.

  %!# *% .

.

997-:908  %!$&# * ..  #$ 2..0.

.

  .

.

   *% .

.

  #$ * .

.

  .

.

   *% .

.

  #$ * .

.

  .

.

   *% .

.

  #$ * .

.

  .

.

   *% .

.

  #$ * .

.

  .

.

   * .

.

  .

.

..90*/.:994&% !!# ' 5*.9:8 9-- 7084:7.20907899.%20. 43920.*4.943*/85.908.7039*-:/3*-4.     $%9-- 920*-:/3*-4..70.*92089470*/05489 .8  070.*890*/ 9-- /.8 47/09.7039*-:/3*-4.38.7.*890*/  %884:74714.3 ## 9-- 920*-:/3*-4.79*92094*/.79*/.    .5574.7039*-:/3*-4.70.90  .*/!# # 9-- 4-0.70905.90          $$   5*8945*92094*/.8*9-*920.943*809*/ 9-- 97.8:70 9-- :39*41*20.7.20907899..08  5*89.90*1742 9-- /.*920*-:/3*-4.7/*314  5*920*-:/3*-4.07843*3:2-079-- 5..*/$   .8:70  9-- 89.*-- 70..5574.*4.8  070.5574.7039*-:/3*-4.90*94  9-- .*92089470*/05489 .90*920.90        $$  5*7084:7.7/ 34/.422039*909 :942.*/*9.55.07843*3:2-07 9-- ..0*950 9-- .08  5*/.55*-4.*0 # .9*.558 . 4334/09.5574.*89.*/9-- 5.07843*3:2-073    %!# # 9-- 920*-:/3*-4.70905.*89.90.*/   5.890 /01.9*.7039*8*30  9-- $ ! 9-- 4-0.79*920 9-- 8945*920 9-- 5.0*/025 507843*/  5*.*--*/ 709:73890/41%:/3-4..7/   5*.422039*909 9-- 5.89--$%#%% 9-- 920*-:/3*-4.3       .*/ 9-- %! 9-- 20.0*/  9-- 7084:7.90/%20..9*.*/3   9-- 4-0..30/ 9-- .7/*-- 70.-:/3-4.7/-:/3-4.

7/*314  5*..088 #0970.908.*/*9.997-:908 %20.997-:908*314    *%$% #*! $% &%*! $%*!# $$ %8890$:-28843..997-:909498% 070./.55*-4.08*9-*2088.8*9-*920.%-:/3-4.*--*89*/  .*/*/.20 :220203943909  5*. %8574.7/*314  5*920*-:/3*-4...8.:0 %    %8890.*/*/.*-- 70.!74.*92089470*/05489 .7039*-:/3*-4.08  5*24/0 $&%  5*/05489*574.088  5*920.422039*909 :942.90974:98!  5*.0/.*--*/  5*.90/%20.55*-4.088   5*..55*..90:39.7/*/*30*920.08  5*950 $&#  5*20.*--*89*/  5*.55*-4.094.20907899..47&% 5574...088 %05489!74.*/*/09.55*.8*9-*920..90/%20.3*30*920.99.997-:90  5*-:/3*-4.70.89.7.7/ /.997-:908*9-*..70905.*/*/09.5*5.0888:-2990920.7/*4..422039*909 :942.*--*/    .8:70  :2-07414:78 5*5.997-:908*9-*..997-:908*314  5*920*-:/3*-4.3   ..90*.7039*-:/3*-4.*92089470*/05489 ..0574.7/*/  5*920.5574.7:.3$&%% $9.3//09.3994:5/.*--*/  5*.3:.7/89.70..7/*4.8*9-*920.997-:908*9-*.997-:90*.7/   5*.90.997-:90*3.!% 020390.997-:908*314  5*2088.088  5*70970.90$  5*.. 330989050.7/   5*.90*/09.*574.55*..7/*314  5*.

Sign up to vote on this title
UsefulNot useful