Introduction


In my opinion, the starting point for implementation of a positive time solution with time events in SAP HR should be the time recording terminals and its capabilities. Some Time Recording Terminals can record only clock in and clock out data. However, there are some advanced ones where you can record your absences, attendances and offsite work too.


Time Recording Terminals can be SAP certified. What this means is that the vendor of time recording system can get certification for their software to communicate with SAP R/3. Hence, standard interfaces made available by SAP can be used for communication with time recording system. When you are implementing positive time solution with time events for any client, you should ask your client to check with the time recording system vendor if the time recording terminals are SAP certified or not.


Let us understand the different method of integration between SAP R/3 and time recording terminals.



Types of Integration


Quite often, the integration between time recording system and SAP R/3 requires a two way interface. Below is a schematic representation of the integration.


/wp-content/uploads/2014/03/1_411564.jpg

  

SAP R/3 sends HR mini-master data to the time recording system for validation purposes when the employee swipes at the time recording terminals. The time recording system sends time events to SAP R/3 for evaluation purposes.


Below are the possible standard ways of integrating SAP R/3 with time recording system:


  • HR PDC InterfaceThis method of integration between SAP R/3 and time recording terminals involves a BAPI based interface and the data transfer takes place through ALE using standard IDOCs (a standard file format with predefined fields). To use this method, we need SAP certified time recording terminals. A custom BAPI can also be created if the time recording terminals are not SAP certified.
  • Communication Channel 1 (CC 1)transceiver based transfer and is the old method to transfer data between SAP R/3 and time recording terminals. This also requires CC1 certified time recording terminals. This method is not advisable to be used anymore.
  • Sequential Files Method – This method is generally used when the time recording terminals are not SAP certified. The time events can be uploaded to R/3 using report RPTEUP10 from sequential files and the HR mini master records are downloaded to sequential files to update the time recording systems using report RPTEDO00.

Let us discuss HR PDC Interface and Sequential Files Methods.




HR PDC Interface Method


Below is the process flow for data exchange between SAP R/3 and Time Recording Terminals using HR PDC Interface.


Step 1: SAP R/3 downloads the HR mini master data to the time recording system using program RPTCC101. It will help to determine the employee id from the card id and check permissibility for time event types (clock in/clock out, start of break, end of break etc.) entered by the employee. The HR mini master will also be used for validation at the time recording terminals during clock in and clock out. It is recommended to run this program once in a day so that any new joiners or leavers get added to the list.


Step 2: The time event type groupings are downloaded using program RPTCC105 from SAP R/3 to time recording terminals so that employees can record clock ins and clock outs against the correct time event types (clock in/clock out, start of break, end of break etc.). It is recommended to run this program once during go live and after that on need basis whenever there is change in time event type groups.


Step 3: The upload of time events in SAP gets initiated by SAP using program RPTCC106 (HR PDC – Download Upload Request for Time Events). The program downloads the upload request for time events from SAP. On receiving the upload request, the time recording system uploads the time events data to SAP R/3. The frequency of this depends on client requirement – can vary from once a day to multiple times in a day. The personnel time events are uploaded in SAP and stored in interface table CC1TEV.


Step 4: Finally, the time events in interface table CC1TEV are posted to TEVEN and NT1 tables using program SAPCDT45. On successful posting, the time events are deleted from interface table CC1TEV. If the posting ends in error, the time events are again deleted from interface table CC1TEV. Sometimes, the time events don’t get posted because the personnel number may be locked and they remain in interface table to be picked up in the next run of the program. It is recommended to run this program once every hour.


Step 5: SAP provides program RPAFRV00 to post process time events that didn’t get posted to time management and ended in errors.


Below are the key data fields for HR PDC Interface:


HR Mini-Master IDOC

/wp-content/uploads/2014/03/2_411565.jpg

Time Event Types IDOC

  /wp-content/uploads/2014/03/3_411569.jpg


Upload Request for Time Events Download IDOC

/wp-content/uploads/2014/03/4_411570.jpg

Time Events Upload IDOC


/wp-content/uploads/2014/03/5_411571.jpg


Sequential Files Method


Below is the process flow for data exchange between SAP R/3 and Time Recording Terminals using sequential files.


Step 1: The report RPTEDO00 downloads the mini-master records of the selected employees to a sequential file. The structure of the mini-master records is stored in table DWN01. The system selects employees who are assigned to a subsystem grouping. The flat file is placed in SAP Application Server and it is moved to time recording server using FTP.


Step 2: The time recording server can deposit the flat file into SAP Application Server using FTP.  The program RPTEUP10 picks up the flat file and uploads the data to IT2011.


Below are the file formats for download and upload programs:

Table DWN01

/wp-content/uploads/2014/03/6_411572.jpg

RPTEUP10 File Format

/wp-content/uploads/2014/03/7_411573.jpg

Our Solution for Client


The time recording terminals selected by our client were not SAP certified. Also, the time recording terminals could only record clock in (P10) and clock out (P20) data. We decided to use the sequential files method using outbound and inbound interfaces (SAP PI).


HR Mini-Master Download Program: We didn’t go for the standard download program as we just needed to send data related to time recording id, employee number and subsystem grouping. Hence, we developed a custom ABAP program for this purpose. The custom download program will extract the HR mini-master data from infotype IT0050 into a .txt file. The .txt file will be placed in a folder in SAP Application Server. This data will be used for validation purposes when employee clocks in/clocks out at the time recording terminals.


/wp-content/uploads/2014/03/8_411574.jpg

The first run will contain data for all employees. Subsequent runs will be only incremental data – changed or additional data for employees. If there hasn’t been any change or new data for an employee in IT0050, it doesn’t get sent in the daily run.


There may be a need to run the program for full load later on. Hence, we provided a checkbox for Full Load. If the checkbox for Full Load is checked, the download program will extract full data for active employees on that day. Otherwise, it will just extract incremental data.


Also, the input screen for the program had two options in the form of radio buttons for specifying the file download path:


  • Download to local file
  • Download to SAP Application Server



User would have to select one of the radio buttons to run the program.


The input screen also had a mandatory field to enter the company code. Based on the company code entered, the program will download data from IT0050.


A background job program will be scheduled to run the download program once every night to extract the HR mini-master data from IT0050 into a .txt file. The .txt file will be placed in a folder in SAP Application Server. The .txt file will be picked up by outbound interface program (SAP PI) and sent to time recording system application server. Once the .txt file is successfully sent to time recording system application server, the file in SAP Application Server is moved to archive folder.

HR Time Events Upload Program: SAP R/3 will receive time events .txt file from the time recording system through an inbound interface. SAP PI will place this file in a specified folder in SAP Application Server. If the time recording system agrees to provide the content in SAP format, no conversions will be required to be done by SAP PI. Or else, conversion logic will need to be put in place.

SAP provides a standard upload program RPTEUP10 to upload time events into interface table CC1TEV. However, we were not able to use the standard upload program because of the following reasons:


  • It cannot delete a file after uploading its contents or move the file from one folder in SAP Application Server to another folder for archiving. This functionality is needed so that once the file content is uploaded into interface table CC1TEV; it is not picked up again in the next run.
  • Also, the standard program works in local file mode and not in sequential file mode. If we try to upload the file from SAP Application Server using sequential file mode, it is not getting picked up. This is due to an issue in the open dataset statement. Please refer link http://scn.sap.com/thread/1262043
  • The standard program can’t append the date of entry, time of entry (system date and time) and user id in the contents being uploaded into CC1TEV table.


For the above reasons, we had to clone the standard program into a custom Z program and perform modifications as there was no enhancement point available to check whether the standard function module was executed properly or not. The structure of file format for program RPTEUP10 was retained without any changes.


A background job for this custom program will get initiated by a proxy program in SAP PI the moment file gets placed in the specified folder in SAP Application Server. The background job will upload the contents of the .txt file (received from time recording system and available at a specified folder in SAP Application server) into interface table CC1TEV.


The front end of the custom Z program was kept same as the standard program RPTEUP10 and is shown below:

 

/wp-content/uploads/2014/03/9_411575.jpg


The output of the custom Z program was kept same as the standard program RPTEUP10 and is shown below:


/wp-content/uploads/2014/03/10_411576.jpg

 

HR Time Events Posting Program: After the file contents are uploaded into interface table CC1TEV, the next step is to post the time events from the interface table CC1TEV into TEVEN table. SAP provides a standard program SAPCDT45 to post time events from interface table CC1TEV into TEVEN table. However, we were unable to use the standard program because of the need to send email notification to the IT contact person in case of errors encountered in posting the time events.


For the above reason, we had to clone the standard program into a custom Z program and perform modifications into it so that it could send email notification to IT contact person if the posting of time events resulted in errors. The email id of the IT contact person would be maintained in a view maintainable custom Z table.


A background job program will be scheduled to run this custom posting program once every hour to post the time events from CC1TEV interface table to TEVEN table.


All functionalities in the standard program were retained in the Z program too.


The front end of the custom Z program for posting time events was same as standard program SAPCDT45 and is shown below:


/wp-content/uploads/2014/03/11_411577.jpg 

The output of the custom Z program after posting run was same as that of standard program SAPCDT45 and is shown below:


/wp-content/uploads/2014/03/12_411578.jpg 

While exploring the possibilities of building the integration solution between SAP R/3 and time recording system, I read at few places about building a custom ABAP program from scratch. I would not recommend this approach and would advise to customize the standard program RPTEUP10 so that we can leverage the file content structure put in place by SAP. Also, the posting program of SAP has a lot of inbuilt validations which we can leverage using this method.


Here, I come to the end of this knowledge artifact. Thanks for your patience to go through this document. I hope this has been useful for you.


Warm regards,

Vivek Barnwal.


**************************************************************************************************


You can also refer to other knowledge artifacts created by me at the below link:


One Stop Shop of my Knowledge Artifacts in SAP HCM

To report this post you need to login first.

34 Comments

You must be Logged on to comment or reply to a post.

  1. Aman Nasar

    Hi Vivek,

    thank you for your detailed and useful information.

    As we need to do exactly the same

    interface, Is it possible to share the added/modified code for the missing functionalities in standard pgm RPTEUP10?

    Thanks in advance.

    Nasar.

    (0) 
  2. Friedrich Sillmann

    Hello Vivek,

    this is a very excellent work. I was looking for a solution for a similar problem case (transfering time event information from another ERP system into SAP HCM) and had already evaluated the creation of PDC IDocs while having a flat file structure in the source system when I found your blog.

    Thank you for sharing.

    Regards,

    Friedrich

    (0) 
  3. Nisha S

    Hi Vivek,

    Thanks for sharing the detailed document.

    I have a question….how does the time machine understand whether its a login or log out of employee

    (0) 
    1. Vivek Barnwal Post author

      In our case, there were different terminals for Clock In and Clock Out. Let us say that terminal A was meant for clock in and terminal B was for clock out. Hence, any time stamp at terminal A was assigned P10 and any time stamp at terminal B was assigned P20.

      Thanks and regards,

      Vivek Barnwal

      (0) 
  4. Namsheed K S

    Hi Vivek,

    Its very useful document. Thanks for sharing.

    I have 1 doubt. Our client is using external vendor machine and uploading the CI/CO date to SAP through BDC.

    We are also using ESS/MSS. Once we upload the data, through ESS , it is visible to employee and even though there is a edit option, it is not allowing to edit, it shows only in display.

    Instead of uploading, if the employee created the CI/CO through ESS and he tries to edit it, it is possible to edit it.

    Do you have any solution to solve this problem. Pls suggest

    Thanks & Regards,

    Namsheed.

    (0) 
    1. Vivek Barnwal Post author

      Hi Namsheed,

      Any data which comes from time recording system shouldn’t be editable. The reason for this is retain the sanctity of this data. It also depends on your configuration done for this.

      From ESS, whatever data you create manually, you can edit it because you have created this data and it hasn’t come from time recording system.

      Thanks and regards,

      Vivek Barnwal

      (0) 
      1. Namsheed K S

        What’s the solution for this..?

        In case, the P10 is already there in R/3 which is uploaded through BDC and employee created another P10 through ESS on the same day and manager approves it.

        Then , 2 P10 will be reflected to him on the same day.

        Now, which one system will pick..How to solve this issue. ?

        Regards,

        Namsheed.

        (0) 
        1. Vivek Barnwal Post author

          The solution for this is user education 🙂

          We can’t build solution for things which user do incorrectly.

          In this case, when the time evaluation will run, it will error out since clock out will be missing.

          Thanks and regards,
          Vivek Barnwal

          (0) 
  5. sap hr09

    Excellent Piece of Work Vivek,

    We also have time integration scenario but the machine is non-SAP certified.

    Your doc is a great help.

    Thanks for sharing. 

    (0) 
  6. Muhammed Azim

    Dear Vivek Barnwal

    thank you so much for such a helpful documentation

    kindly help me in my case .. I want to know how to upload the time attendance data using report RPTEUP10 I mean the file format (Text, excel , … ) and template also ( table of data ,, what is the sequence of columns) how to arrange the file to upload and the clock in and out time how cane I type them in the file ( in which format)

    I need to upload the file manually then i’ll ask the abap to extract the file from the machine in the agreed format to transfer it / uploaded it to SAP  


    appreciated if you can give me a screenshots for the file template and also for the RPTEUP10  running


    thanks in advance ,

    Azim

    (0) 
    1. Vivek Barnwal Post author

      Hi Azim,

      I believe the document is clear enough on the approach to take.

      Request you to do some basic research and go through the documentation of the program.

      No can provide you step by step details of everything which you are looking for.

      Thanks and regards,

      Vivek Barnwal

      (0) 
  7. Charles C

    Hi All,

    It’s possible to configure/change the output values of each field on the HRPDC idoc structure?

    Best Regards,

    Charles

    (0) 

Leave a Reply