Hello HR ABAPer,
Please take your Flat file / Excel File data into 2 Internal Tables.
Use
1st Internal Table for Clock-In
2nd Internal Table for Clock-Out.
For 1st Internal Table sort data by ascending By Employee ID,Shift, Date and Time.
Then Delete Adjacent Duplicates Comparing Employee ID,Shift, Date. ( Exclude Time ).
For 2nd Internal Table sort data by Descending By Employee ID,Shift, Date and Time.
Then Delete Adjacent Duplicates Comparing Employee ID,Shift, Date. ( Exclude Time ).
Now you get Clock-In First Internal Table and Clock-Out in 2nd Internal Table.
Put the Loop on 1st Internal table and read 2nd Internal Table Based on Employee ID , Shift and Date.
Pass the Clock-In & Clock-Out Entries into Final Internal Table.
Insert / Update / Modify Table : TEVEN. ( infotype : 2011 ).
Regards ,
Atul Konde.
Nagaraju Adhikari.