Skip to Content
avatar image
Former Member

Time Schema Requirement

Hi,

The time schemas for the company I work for were implemented back in April 2010 and have become extremely convoluted and are basically unmanageable. We have around 14'000 employees running through time evaluation each night in scheduled batch jobs with an overall processing time of anything up to 125 hours.

One of the main problems is that in some circumstances we allow time evaluation to retro back all the way to our go live date of 01.04.2010. This is rare and most employees are only going back a few months, however due to the very nature of the organisation, we have to have the ability to run time evaluation back to any given date between 01.04.2010 and present day.

I am going to create a new schema which will owe to much more SAP standard and efficient processing, the schema will literally be a quarter of the size!! However, the problem I have is I need to find a way of going through the old schema should the day needing to be evaluated be prior to 01.12.2017. The reason for this is the new schema will be built to an updated version of our pay terms and conditions meaning any work undertaken prior to 01.12.2017 date will need to conform to old behaviour.

Is this easy to achieve? How do I run through the old schema should the evaluated day be prior to 01.12.2017? I obviously don't want to build in old terms and conditions into the new schema.

Thank you

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    May 25, 2017 at 05:02 PM

    I've never done such a delimitation, but here is my suggestion.

    You could create 2 new Time Evaluation Schemas, one of them being the new processing starting with Function BDAY and ending with Function EDAY.

    The other TE Schema would be the one entered in the Selection Screen to program RPTIME00 (t-code = pt60), and it would start with the initialization (Functions BINI to EINI) then a pcr to query the current value of a Constant in V_T511K (which Constant has the value of 0 before dd.mm.yyyy and the value of 1 thereafter). If the return value is 0, then Function COPY is used to call the "old" schema, and if the return value is 1, then Function COPY is used to call the "new" Schema. This Executable Schema is then completed with the final processing (Functions BEND to EEND).

    Note that both the "old" and "new" schemas would be modified so that they could not be executed on their own, and the initialization section (Functions BINI to EINI) and final processing section (Functions BEND to EEND).

    P.S.: Brendan Gibbons mentioned the appropriate Functions to use to call the pcr and the schemas.

    Add comment
    10|10000 characters needed characters exceeded

  • May 25, 2017 at 09:38 AM

    Hi,

    As an approach, should just need a new PCR called in a new schema with the IF function.

    This would be called in the day processing part of the schema.

    IF new PCR (return true if date being processed > 01.12.2017

    COPY new schema (day processing portion)

    ELSE

    COPY old schema ( day processing portion only, not the entir old schema)

    ENDIF

    bg

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you Brendan, this is really useful and can see that I could achieve what I want to do using this method.

  • avatar image
    Former Member
    May 23, 2017 at 01:36 PM

    Hi Richard,

    It is my guess and never went to this situation. But yes we can do by using a custom function to call the old schema for the processing if it meets the date condition.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I assumed I would need to use a custom function that has similar functionality to the existing CHECK function. I was hoping there was another way as my colleagues in the ABAP team have a backlog of work and I don't think this will be achievable.