Sunday, August 9, 2009

Mass Loading Time into Timesheet

Last week there was a question on ittoolbox on how we can mass upload time into Time and Labor. I had mentioned in an earlier post that one of the features I would love to have in T&L would be one to upload reported time through a spreadsheet, because it is quite a common requirement to have a feature to mass upload time (especially during conversion projects). Here are the options one can mull over if ever it's required to mass load time into time and labor:

1. If you want to quickly enter time from PIA for a group of employees, then use the 'Report Rapid Time' utility. This can be found under the navigation - Time and Labor --> Report Time --> Rapid Time. Ensure that you run the 'Submit All Rapid Time' process after the above step. The only disadvantage with the above process is that you still need to key in the time as it's done online/
2. If on the other hand you want to automate the process completely by using an AE, you could explore the following options:
(a) Write a CI on the Report Rapid Time component and load time directly into the rapid time table and then run the Submit Rapid Time process.
(b) Use a File Layout and insert data into the TL_ST_ELPTIME table if you are loading Elapsed Time or TL_ST_PCHTIME if you are loading Punch time and then run the TL_ST_LIB Application Engine. The TL_ST_LIB AE will insert the data into the reported time table.
(c) Or if you want to directly insert into the RPTD_TIME table, then use the CI 'TL_RPTD_TIME_CI'

2 comments:

Maverick_1979 said...

Hi Jiju, We are on HCM 9.0 with tools release 8.49.20. I am using Application Engine and CI to populate PS_TL_RPTD_TIME record through peoplecode using delivered Component Interface named TL_RPTD_TIME_CI. I have tested cI in Application Designer to insert rows into target table.

When I execute the application engine, I am getting below errors in the output file from Application Server.

01.05.04 ..(XX_BITFCE.PrcsTL.ReadFile) (PeopleCode)
Instance must exist to set property {TL_RPTD_TIME_CI.EMPLID} (91,14)
Instance must exist to set property {TL_RPTD_TIME_CI.EMPL_RCD} (91,14)
Instance must exist to set property {TL_RPTD_TIME_CI.DUR} (91,14)
Instance must exist to set property {TL_RPTD_TIME_CI.SEQ_NBR} (91,14)
This is an invalid property {TL_RPTD_TIME_CI.TRC} (91,11)
File: /vob/peopletools/src/psppr/ramupd.cppSQL error. Stmt #: 911 Error Position: 0 Return: 1400 - ORA-01400: cannot insert NULL into ("SYSADM"."PS_AUDIT_TLRPTTIME"."DUR")
Failed SQL stmt:INSERT INTO PS_AUDIT_TLRPTTIME(AUDIT_OPRID,AUDIT_STAMP,....:59,:60)
Error saving Component Interface. {TL_RPTD_TIME_CI} (91,37)



I have written peoplecode using FileLayouts and to narrow down where the issue could be, I have written the simplest PC given below and still getting the above errors in logs though the program is going to success with no rows inserted. I have research forums and a few mentioned that security could be a reason and I added CI to the permission list, given full access to all the methods with no success. Any help is highly appreciated.

Local ApiObject &MYSESSION;
Local ApiObject &MYCI;


&MYSESSION = %Session;
&MYCI = &MYSESSION.GetCompIntfc(CompIntfc.TL_RPTD_TIME_CI);
&MYCI.EMPLID = "00001244";
&MYCI.EMPL_RCD = 1;
&MYCI.DUR = "2010-05-20";
&MYCI.SEQ_NBR = 0;


&MYCI.Create();
&MYCI.TRC = "REG00";

If Not (&MYCI.Save()) Then
/* save didn’t complete */
&COLL = &MYSESSION.PSMessages;
For &I = 1 To &COLL.Count
&ERROR = &COLL.Item(&I);
&TEXT = &ERROR.Text;
/* do error processing */
End-For;
&COLL.DeleteAll();
End-If;

Maverick_1979 said...

Hi Jiju, Firstly I would like to thank you for the latest blogs and information on T&L modules. It hardly any resouces especially on the latest tools.

We are on HCM 9.0 with tools release 8.49.20. I am using Application Engine and CI to populate PS_TL_RPTD_TIME record through peoplecode using delivered Component Interface named TL_RPTD_TIME_CI. I have tested cI in Application Designer to insert rows into target table.

When I execute the application engine, I am getting below errors in the output file from Application Server.

01.05.04 ..(XX_BITFCE.PrcsTL.ReadFile) (PeopleCode)
Instance must exist to set property {TL_RPTD_TIME_CI.EMPLID} (91,14)
Instance must exist to set property {TL_RPTD_TIME_CI.EMPL_RCD} (91,14)
Instance must exist to set property {TL_RPTD_TIME_CI.DUR} (91,14)
Instance must exist to set property {TL_RPTD_TIME_CI.SEQ_NBR} (91,14)
This is an invalid property {TL_RPTD_TIME_CI.TRC} (91,11)
File: /vob/peopletools/src/psppr/ramupd.cppSQL error. Stmt #: 911 Error Position: 0 Return: 1400 - ORA-01400: cannot insert NULL into ("SYSADM"."PS_AUDIT_TLRPTTIME"."DUR")
Failed SQL stmt:INSERT INTO PS_AUDIT_TLRPTTIME(AUDIT_OPRID,AUDIT_STAMP,....:59,:60)
Error saving Component Interface. {TL_RPTD_TIME_CI} (91,37)



I have written peoplecode using FileLayouts and to narrow down where the issue could be, I have written the simplest PC given below and still getting the above errors in logs though the program is going to success with no rows inserted. I have research forums and a few mentioned that security could be a reason and I added CI to the permission list, given full access to all the methods with no success. Any help is highly appreciated.

Local ApiObject &MYSESSION;
Local ApiObject &MYCI;


&MYSESSION = %Session;
&MYCI = &MYSESSION.GetCompIntfc(CompIntfc.TL_RPTD_TIME_CI);
&MYCI.EMPLID = "00001244";
&MYCI.EMPL_RCD = 1;
&MYCI.DUR = "2010-05-20";
&MYCI.SEQ_NBR = 0;


&MYCI.Create();
&MYCI.TRC = "REG00";

If Not (&MYCI.Save()) Then
/* save didn’t complete */
&COLL = &MYSESSION.PSMessages;
For &I = 1 To &COLL.Count
&ERROR = &COLL.Item(&I);
&TEXT = &ERROR.Text;
/* do error processing */
End-For;
&COLL.DeleteAll();
End-If;