I'd partially agree with Balasubramanian and Ketul. However one of the ways I have used is as below:
Please note this requires as below"
a)for any attendance including normal attendance, a time w/t is to be generated.
b)Payroll sub-schema XAL0-PCR XPPF needs to use the normal attendance w/t to calculate pro-rating.
1)Create c/f w/t's:
1.1)In Proc cl 06 values, include a new value 'Z' to indicate bringing forward the w/t to current period.
Maintain V_T512D1 - select proc cl 06 and double click. This brings the proc cl 06 values in V_T512D2.
Create a new entry or copy an existing one as
Z - Bring forward last period's C/F w/t.
1.2)For whatever time w/t's being generated, copy these w/t's with a similar pattern to indicate as a carry forward w/t, but with a Y or Z in front. For example 1200 copied copied as Y200, 6200 copied as Z200. If necessary you can use other patterns like !200 for 2200, etc. Main rationale is that you can recognize the normal w/t.
For these w/t's set proc cl 06 to a value like Z so that in payroll sub-schema XLR0->pcr 006, the w/t is imported to current IT table.
2)Create a relationship indicator in V_T51P3 to indicate Carry forward (c/f) w/t - say ZC;
similarly ZB - Bring forward
3)Create relationships between the original w/t and the c/f w/t with indicator ZC and the other way with ZB: examples
ZC 1200 Y200
ZB Y200 1200
4)In time schema using a PCR called with OUTZL, for any time w/t generated, if the w/t is for a period after 20th of month till end of month, output the w/t with an IFTYP say C (which is not used for any other purpose).
Schema line after all w/t's are generated and before end of day (EDAY) and after QUOTA
PZL Z1C1 GEN
pcr Z1C1 Include IFTYP for w/t's after 20th of month
*/****
OUTZL RED
*
** ADDZL *
21 FILLWIC ADDZL * Fill IFTYP as C
22 FILLWIC ADDZL *
... copy line above for keys 23 to 30, 31
...
5)In payroll schema
5.1)In sub-schema XLR0 or a similar payroll subschema where last period's pay results are processed, there would be a PCR like X006, which uses proc cl 06 to bring the last period's w/t to current period IT table.
VWTCL 06
*
Z R51P1=ZBR ADDWTI *
5.2)In sub-schema XT00 ->function ZLIT: in the PCR called by this function, check with OUTZL?IFT the IFTYP. If IFTYP is C (or whichever created in the time schema PCR above), read the T51P1 using R51P1 and get the c/f w/t; output it as that w/t to RT. See lines below
OUTZL?IFT
* ADDWT *
C R51P1=ZCR ADDWTE *
Above should satisfy the requirements.