Hi Gurus,
I am getting the pairs of cancelled and approved hours at Bex output as below, but i want to show the data as per below requirement based on Custome Exit Variable selection.
- Pull all the CATSDB Process Status = 60 (Employee Cancelled Time) with approval date (APDAT) before the As Of Date specified in the run control and REFCOUNTER field = blank. This is all the original approved time which has been cancelled.
- For each original row identified in step 1, pull the timesheet row in CATSDB that has REFCOUNTER value = Timesheet ID of rows in Step 1 above. This is the adjusted time which is associated with cancelled time in step 1. If this timesheet row is also CATSDB Status = 60 , then repeat this step in a loop until you get to the final adjusted row (which should have a CATSDB Status =30 ).
- If the final adjusted row identified in Step 2 is approved (CATSDB Status = 30 ) and the creation date (ERSDA) of the final adjusted row is on/after the As Of Date specified in the run control, display all the related timesheet pairs in the Time Adjustment report (Original Time first with Hours multiplied by -1, Adjusted Time second) and net the difference in the Result row.
ECC:
MANDT | COUNTER | PERNR | WORKDATE | AWART | KOKRS | UNIT | ERSDA | ERSTM | ERNAM | LAEDA | LAETM | AENAM | APNAM | APDAT | LOGSYS | STATUS | REFCOUNTER |
100 | 184337 | 31103 | 5/23/2013 | 40 | 1000 | H | 5/23/2013 | 10:21:25 | AKINZLMAIER | 5/24/2013 | 15:14:05 | AKINZLMAIER | AKINZLMAIER | 5/24/2013 | LEQCLNT100 | 60 | |
100 | 184576 | 31103 | 5/23/2013 | 40 | 1000 | H | 6/18/2013 | 18:12:45 | AKINZLMAIER | 6/18/2013 | 18:15:22 | AKINZLMAIER | AKINZLMAIER | 6/18/2013 | LEQCLNT100 | 30 | 184337 |
100 | 184338 | 31103 | 5/24/2013 | 40 | 1000 | H | 5/23/2013 | 10:21:49 | AKINZLMAIER | 5/24/2013 | 15:14:01 | AKINZLMAIER | AKINZLMAIER | 5/24/2013 | LEQCLNT100 | 60 | |
100 | 184575 | 31103 | 5/24/2013 | 40 | 1000 | H | 6/18/2013 | 18:05:19 | AKINZLMAIER | 6/18/2013 | 18:11:11 | AKINZLMAIER | AKINZLMAIER | 6/18/2013 | LEQCLNT100 | 30 | 184338 |
You can see from the data that on 6/18/13, hours which were originally booked on 5/23/13 and approved on 5/24/13 were cancelled and the adjusted rows were approved on 6/18. Based on this, anyone running the Time Adjustment report with any As of Date between 5/25 and 6/18 should see both pairs in the report. When running the report with As of Date < 5/25 or As of Date > 6/18, the report should return an empty result set (or at least not show these results, may show other results if there is other test data meeting the requirements per the As of Date).
Thanks In Advance...
Raghav.B