Monday, August 20, 2012

:-Hi, Kora - I believe the data needed would be in table CATSDB. Your programmer can do this in one step. It's just a "flag" that you will set on your selection screen to be "true" (1).

First, set a parameter in the query for the number of days you want to go back. I'll call that P_DAYS. It's numeric, no decimals making it integer. This will give you the flexibility to use any number of days, not just the 6 months you need today.

Second, have your ABAPer set up the code in this manner for a new field called FLAG as an integer:

Calculate the date the SELECT will use to determine whether the employee passes or not. That's a new field, with a date format. The programmer can use a LIKE statement. SY-DATUM isinternal system date for today:

DATA: SEL_DATE LIKE SY-DATUM.

From there, calculate the date needed:

SEL_DATE = SY-DATUM - P_DAYS.

That will give a date in the past to use in the select. I'm a little rusty on the select statement itself, but in words, the programmer will select up to 1 row out of the table CATSDB where the personnel number in CATSDB (PERNR) is equal to the current value in your population and where the date of the entry (WORKDATE) is greater than or equal to your new SEL_DATE.

I'm rusty, but it's going to look something like this (please apologize to your ABAPer in advance for me!):

SELECT * FROM CATSDB UP TO 1 ROWS
WHERE PERNR = "your personnel number"
AND WORKDATE >= SEL_DATE.

If the return of that select finds something, then you want the FLAG to be set to true:

IF SY-SUBRC = 0.
FLAG = 1.
ELSE.
FLAG = 0.
ENDIF.

I believe this should give you all temps that have had time entered in the last x number of days.

If that specific select doesn't work, tell the ABAPer they can always do the select for that PERNR with an ORDER BY on the WORKDATE field DESCENDING instead of the AND WORKDATE statement. Then, the IF statement would change to seeing whether or not that date value was greater than the SEL_DATE value.

If I've confused you, let me know and I'll reiterate differently.

- Lou



:-Try using the Time Leveling report, tcode CATC. It allows reporting on teammates with no time recorded
.

:-My understanding of that report is that there has to be a time sheet out there already, just no time on it (or something else missing). But it has to exist. I'm not sure that was the question.

Kora - if you already have time sheets out there but not filled in, that's your answer.

Thanks!

- Lou





:-No, CATC does not require to have data in the timesheets. Run the report with the Time Sheet Selection set to "Select time sheets with no times recorded" will show you those employees with no time.




:-Hi Lou and Mr. Meyers,

CATC is not working in the sense that the output will provide missing weeks between the dates set in in the period. For example, if I am asking for last week ( or day) entered between today and 6 months ago, I will get results including weeks where the temps have only partially entered time. If teh temp has entered time on /2012/May/18 only, I still get in the report the week 2012/05/14 - 2012/05/20. And I believe that this is exactly what CATC is meant to do, unless some other companies are using it differently.

What I am only looking for is at identifying the very last date the time is transferred to PA and compare if the date is more than 6 months from today.

I will also look into ABAP program for this. Thank you Lou for those details. I am sure my ABAP-er will understand better than I do.

Thank you all

Kora




:-    

No comments:

Post a Comment