Skip to main content

Do you know how to fetch Oracle Cloud Time Card Status using SQL

In this session we are going to see how to fetch Oracle Cloud Time Card Status using SQL
 
select papf.person_number ,ppnf.full_name ,per_extract_utility.get_decoded_lookup('HWM_UI_STATUS',hts.status_value) status ,to_char(thdr.start_time_trunc,'fmmm/dd/yyyy') || ' - ' || to_char(thdr.stop_time_trunc,'fmmm/dd/yyyy') week ,(select sum(trec.measure) from hwm_tm_rec trec where 1 = 1 and trec.delete_flag is null and trec.latest_version = 'Y' and ((trec.orig_tm_rec_id is null) or (trec.orig_tm_rec_id = trec.tm_rec_id)) and ((trec.orig_tm_rec_version is null) or (trec.orig_tm_rec_version = trec.tm_rec_version)) and trec.resource_id = papf.person_id and trunc(trec.actual_date) between thdr.start_time_trunc and thdr.stop_time_trunc) quantity from per_all_people_f papf ,per_all_assignments_m paaf ,per_person_names_f ppnf ,hwm_ext_timecard_hdr_v thdr ,hwm_ext_timecard_status_v hts where 1 = 1 and paaf.person_id = papf.person_id and paaf.assignment_type in ('E') and paaf.assignment_status_type in ('ACTIVE') and paaf.effective_latest_change = 'Y' and paaf.primary_flag = 'Y' and ppnf.person_id = paaf.person_id and ppnf.name_type = 'GLOBAL' and thdr.resource_id = papf.person_id and thdr.delete_flag is null and thdr.latest_version = 'Y' and ((thdr.orig_tm_rec_grp_id is null) or (thdr.orig_tm_rec_grp_id = thdr.tm_rec_grp_id)) and ((thdr.orig_tm_rec_grp_version is null) or (thdr.orig_tm_rec_grp_version = thdr.tm_rec_grp_version)) and thdr.layer_code = 'TIME_RPTD' and (thdr.start_time_trunc between :p_from_dt and :p_to_dt or thdr.stop_time_trunc between :p_from_dt and :p_to_dt) and thdr.grp_type_name = 'Timecard' and hts.resource_id = thdr.resource_id and hts.tm_bldg_blk_id = thdr.tm_rec_grp_id and hts.tm_bldg_blk_version = thdr.tm_rec_grp_version and hts.definitioncode = 'D_TM_UI_STATUS' and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date and trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date and trunc(sysdate) between ppnf.effective_start_date and ppnf.effective_end_date

Comments

Popular posts from this blog

Do you know how to generate output using eText Template in Oracle Cloud BI Publisher?

In this blog, we are going to see how to generate output using eText Template in Fusion BI Publisher I am going to show this using sample data. This is my sample data Click "Export" button to download the XML file. This is my XML File Open a blank Word Document and save it as type "Rich Text Format" Add a format setup which is given below <TEMPLATE TYPE> FIXED_POSITION_BASED <OUTPUT CHARACTER SET> UTF-8 <NEW RECORD CHARACTER> Carriage Return Add a Header table which is given below. For headers, give the header name within quotes ex: 'Emplid'. For headers, use the level DATA_DS which is the top level and appears only once in the XML <LEVEL> DATA_DS <POSITION> <LENGTH> <FORMAT> <PAD> <DATA> <COMMENTS> <NEW RECORD> DATA_DS Alpha ‘Emplid’

Do you know how to cancel the Work Relationship using HDL in Oracle Cloud HCM?

In this blog, we are going to see how to cancel the Work Relationship using HDL (HCM Data Loader) Please make sure you have taken the back up of all the necessary data before cancelling the Work Relationship To cancel the Work Relationship, we use HDL Source Key method. Use the below sample template for reference SET PURGE_FUTURE_CHANGES N METADATA|WorkRelationship|SourceSystemOwner|SourceSystemId|PersonId(SourceSystemId)|LegalEmployerName|PersonNumber|DateStart|WorkerType|CancelWorkRelationshipFlag DELETE|WorkRelationship|FUSION|1234|WRK_1234|Legal_Employer|1234|2018/02/01|E|Y In the above template, we do not know the values of the source keys SourceSystemOwner SourceSystemId PersonId(SourceSystemId) Use below query to fetch the SourceSystemOwner Query: select source_system_owner from hrc_integration_key_map where surrogate_id = period_of_service_id   -- pass period_of_service_id corresponding to Work Relationship Use below query to fetch the SourceSystemId Q

Do you know how to generate output using Excel Template in Oracle Cloud BI Publisher?

In this blog, we are going to see how to generate output using Excel Templates in Fusion BI Publisher I am going to show this using sample data. This is my sample data Click "Export" button to download the XML file. This is my XML File Open a blank Excel file and save it as type "Excel 97-2003 Workbook" (.xls) I have created 3 tabs "Summary", "Detail" and "XDO_METADATA" XDO_METADATA tab is mandatory. Place the below text in XDO_METADATA tab Version ARU-dbdrv Extractor Version Template Code Template Type TYPE_EXCEL_TEMPLATE Preprocess XSLT File Last Modified Date Last Modified By Data Constraints: In the "Detail" tab create Header row as shown below Now add the XDO tags Select the blank &quo