Hi Ruhail,
Not sure you can obtain the value thru standard operation. Two things:
- WPALL=LAST will read WPBP split not payroll split.
- For further reference; I believe you can use OUTWPMASSG to retrieve reason for action from your actual WPBP split, have a look at the optional parameter for payroll operation OUTWP in transaction code PE04.
Furthermore, WPBP splits separate pay change within the same payroll split and are caused by changes over the payroll period made in infotypes 0000, 0001, 0007, 0008 and 0027 (and eventually 0014 depending on your payroll scheme setup).
Payroll splits create separated payroll result within a payroll period and are caused by infotype 0000 changes [according to your configuration in Action Indicator 'Payroll Split' (V_530_E)] and payroll area changes in infotype 0001.
So you can have one or various WPBP splits within one payroll split and one or various payroll splits within one payroll period.
Typically re-hire will provoke a payroll split although it might depend on your country-specific practice. –meaning your last active period is within a different payroll result-
You should weight in your requirements and see which between a custom payroll operation and payroll function best fit your need. But in any case it means ABAP code to obtain “actual” payroll result (taking into account the payroll buffer) and backwardly evaluates what entry matches the last active period (if it does not correspond to your current period of course).
Can you specify a little further your requirements?
Regards,
Antoine