cancel
Showing results for 
Search instead for 
Did you mean: 

help with a decision rule in payroll scheme

Former Member
0 Kudos

Hi!

I need your help!!

need to validate that a rule to run from a date determined in payroll scheme

I tried with an IF and a decision rule, within within the command HRS = CZXXXHRS?!

ZXXX being a constant declared in the table t511k but it doesnu2019t work

can someone give me an idea

payroll scheme

IF ZFAD Solo es valido a partir del 15-1

COPY ZFCC Aplicacion del 20%

ENDIF

ZFAD

D HRS=CZFADDHRS?1

  • SCOND=F IF

= SCOND=T IF

sorry for my bat english,

and thanks,

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member193210
Active Contributor
0 Kudos

Hello Maria,

As mentioned by Marc, the operation CMPER is often used to delimit a PCR, but I understand that you want to use function IF as a condition to execute a sub-schema (called by function COPY).

What I am not clear is whether you want to use that in your Time Evaluation Schema or in your Payroll Calculation Schema, since you mention "payroll schema" but the details of PCR ZFAD use operation HRS, which is a Time Operation.

If you are working in the Payroll Schema, modify PCR ZFAD to use operation RTE, NUM or AMT instead of HRS, as in:

D NUM=KZFADDHRS?1

  • SCOND=F IF

= SCOND=T IF

Note that in a Time PCRs, the constants from V_T511K are called with operand C,

while in Payroll PCRs, the constants from V_T511K are called with operand K.

Former Member
0 Kudos

Hi marc!

I tried with CMPER, but what i really need is validate with a date a date format DD MM YY, thas why i make a contans in t511k.

I did kind of rules and validates before, but in times shemes!!

but now i need do it in payroll scheme

Former Member
0 Kudos

Hola Maria,

En general la regla está correcta (sin validar los espacios, que pueden ser problema del copy&paste), lo que me hace pensar en que tal vez esté mal definida la constante en la T511K. Asegurate que tenga el valor 0 desde 1990 hasta la fecha antes de la validación, y el valor 1 desde la fecha que deseas hasta el 9999. Adicionalmente, opino igual que Marc: en payroll no debería importar la fecha exacta, ya que te manejas con periodos de nomina (que pueden ser semanales, quincenales, mensuales, etc). Entonces, la pregunta sería: "La fecha de inicio del periodo de nomina actual es igual a la fecha que quiero validar??".

The rule seems correct (despite the number of spaces which can be a result of the copy&paste), so I would think that maybe there is an error in the constant declaration in T511K. Be sure that ZFADD has the value "0" from 1990 until one day before the validation date, and the value "1" from the validation date until 9999. Besides, I think Marc is right: generally, you don't ask for an exact date in payroll, because you work with payroll periods (which can be weekly, bi-weekly, monthly, etc). So the question would be: "Is the payroll-period-begin-date the same as the validation date??".

Saludos,

Former Member
0 Kudos

Hola wtech, gracias por tu respuesta,

Pues efectivamente la fecha no es exactamente del periodo de nomina, esta justo en el medio, talto para la mensual como para la diaria,

Ahora mi duda es: existe de alguna manera de que desde el esquema de tiempo pueda yo activar un calculo de nomina?

es decir, luego que se me cumpla la condicion sumarle un 20% a in cc-nomina?

Hello wtech,thanks for your answer

Well actually not exactly date for nominations, is right in the middle, both for the monthly payroll to the daily

Now my question is: there is some way that from the time frame can I activate a payroll?,

after adding the condition in 20% wage?

Former Member
0 Kudos

No entendí muy bien eso de "activar un calculo de nomina". Supongo que te refieres a afectar el valor de una cc-nomina en payroll. Si es así, lo que se acostumbra es que en el esquema de tiempos se habilita una cc-nomina de tiempos cuando se cumple la condicion, y en el esquema de nómina, se lee esa cc-nomina de tiempos y se afecta la respectiva cc-nomina de payroll.

I'm not clear about "activating a payroll run from a Time schema", I think you're talking about changing a payroll wage type's value: If so, normally you should trigger a time WT when the condition is met, and then in the payroll schema, you should read the time WT and modify the payroll WT as needed.

Former Member
0 Kudos

Gracias, intentare lo que dices, muchas gracias por tu ayuda!

Thanks, I will try what you say, thank you very much for your help! and let you know what happend!!

marc_augustin2
Active Participant
0 Kudos

Hi Maria,

you could try CMPER inside your rule. Maybe the documentation may help you here.

In general it's the following:

CMPER compares in- and for-periods with the given parameter. This parameter may be in one of the following forms:

JJnn -> here, the year nn is checked

MMnn -> here the for period nn is checked

nnnn -> year and month of the for period are checked. The first two digits represent the year, the last two the period

So for beginning with febuary 2011, you'd use

CMPER 1102.

The argument returnd is either <, > or =, so you can check these in your later needs.

If you have to validate something on a daily base, I'm not sure that this is possible in aq payroll run as this normaly is monthly based. For daily purposes I only know time runs (RPTIME00) as solution.

I hope this helps.

Marc