cancel
Showing results for 
Search instead for 
Did you mean: 

help : how to configure attendance in schema (PE02)

Former Member
0 Kudos

dear SAP masters,

can u help me find what's wrong with my schema? it can't work properly


VARSTP2002 :
- N
- Y : 
      HRS?4.00 :
      - <
      - = :
            - HRS=1
            - ADDZLS2816
      - > :
            - HRS=1
            - ADDZLS2816

(condition : if there is some data in Infotype 2002, then check if attendance hours / STDAZ is more or equal to 4 hours, then add some value to wage type 2816)

thanks & regards,

Edison

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hai..

pls modify ur PCR ( Not Schema) in the following way

outtpprtyp

n

y

hrs=d1234( create a time type )

HRS?4.00 :

- <

- = :

- HRS=1

- ADDZLS2816

- > :

- HRS=1

- ADDZLS2816

Former Member
0 Kudos

hai ram, tks for the reply.

i've already wrote PCR as your suggestion.

but, it can't work neither.

Former Member
0 Kudos

hai..

pls come up with ur exact requirement and scenario.. i wil give u the rule..

Former Member
0 Kudos

this is my scenario :

i want to create PCR so if employee who has level 8 or above (TRFST) overtime in public holiday at least 4 hours, get a transport allowance (wage type 2816)

pls help me. thx.

Former Member
0 Kudos

hai..

im sorry i couldnt get ur terminology.. can u pls explain little bit detail..

Former Member
0 Kudos

that is the detail. i'm sorry, i dont know how to explain it more detail :"(

this is my complete PCR. maybe you could understand the problem if u see that.


VARSTHOLCL  //public holiday
0
1
  OUTWPTRFST  //level
  07
  08
    VARSTP2002 
    N
    Y
       HRS?3.99
       <
       >
         HRS=1
         ADDZLS2816

when i run PT60, although if there is a data in IT2002 that have attendance hours=7, it was read HRS<3.99 when enterred the PCR.

i think my PCR didn't read attendance hours, but i don't know how to fix it..

pls hlp me ram.

thx & rgds

Edison

former_member207885
Contributor
0 Kudos

Hi Edison,

Before checking HRS?3.99,

you should use HRS=PNUM

then it collects the hours.

Hope this helps.

Good luck

former_member207885
Contributor
0 Kudos

Can I suggest you some thing?

VARSTHOLCL //public holiday

  • COLOP*

1

OUTWPTRFST //level

    • COLOP* //for any other level

08

VARSTP2002

N COLOP*

Y

HRS=PNUM

HRS?4

< COLOP* // for any hrs<4

  • // >= 4

HRS=1

ADDZLS2816

COLOP*

and please call this rule with the function PTIP.

Former Member
0 Kudos

hai..

i think u can try what venkat has suggested

Former Member
0 Kudos

still cannot work

Former Member
0 Kudos

hai..

pls explain ur business process in detail of this scenario....

former_member207885
Contributor
0 Kudos

Hi Edison,

It should work I dont know why you are not getting the result.In the schema,did you call the rule like this?

PTIP ZXXX GEN

here ZXXX is your rule.

Next time when you run the TE check the log and see how the rule has got processed,like you can see till which line it worked.

instead of p2002,you can use

VARSTHOLCL //public holiday

  • COLOP*

1

OUTWPTRFST //level

    • COLOP* //for any other level

08

VARSTPRSNT //EMPLOYEE AT WORK?

N COLOP*

Y

HRS=PNUM

HRS?4

< COLOP* // for any hrs<4

  • // >= 4

HRS=1

ADDZLS2816

COLOP*

Former Member
0 Kudos

Hi,

The PCR suggested by Mr. venkat should work. You may also need to use the function CHECK with parameter BP in your custom schema, so that the TRFST is properly read by the system.

Hope this helps,

Reward points if helpful,

Thank You,

Former Member
0 Kudos

yes..yes.. it is works.

thank you especially to mr venkat and all of you that help me solved this scenario.

Former Member
0 Kudos

Hi, venkat srinivas here

i do have condition how to write a PCR for that

Condition : for every 20 physical working days 1 leave should be generated

this is according to factories act, can we configure in absences or else we to write a PCR?

can u please suggest me regarding this

regards & thanks

Former Member
0 Kudos

Hai Edison..

OUTTPPTYPE

3

OUTTPVTYPE

M

HRS=D1234

HRS?4

<

COLOP *

*

ADDZLS2816

COLOP *

*

COLOP *

*

COLOP *

Former Member
0 Kudos

hAI..

i forgot to add ur attendance type...

OUTTPPTYPE

3

outtprtyp

1234

OUTTPVTYPE

M

HRS=D1234

HRS?4

<

COLOP *

*

ADDZLS2816

COLOP *

*

COLOP *

*

COLOP *

Syntax coulnd beexactly specified here.. for all else conditions pls give COLOP *

former_member207885
Contributor
0 Kudos

Hi Srinivas,

I have a question on this.Will they get one leave added to quota after 20 days of physical attendance?so that they can use that later?

In that case,you can write a PCR.

you have to use a counter time type to count the number of attendance.

Please follow these steps.

1.Create a timetype for example say Z123 .name it as Day counter.and create anotehr time type to store leave accruals.

2.then create some absence quota and for leave accrual and in set base entitle ments for that quota specify this time type Z234 in the day balace column.(I will paste the link which explains,how to create a abs quota which is to be generated by TE).

3.write a rule like this

<b>VARSTPRSNT</b> //EMPLOEE PRESENT?

<b> N</b> <b>

<b>Y</b> HRS=DZ123

HRS?20

< HRS=1

ADDDBZ123

  • HRS=1

ADDDBZ234

HRS=0

ADDDBZ123Z</b>

call this rule with ACTIO

here is the link,which explains how to create an abs quota

former_member207885
Contributor
0 Kudos

Hi I am here pasting the info from that link.Plz follow these steps to create a quota for leave accrulas.

I will try to give all the steps here.Please let me know if you need any more info.

I hope you know how to crate a quotatype with the quota grouping of your organization.

1.Create a timetype say for example 9120.(let us say 20 is your sickleave quota type).

2.then go to Timemanagement>timedata recording and adm>Managing time accounts with abs/att quotas>Calculating abs entitlements>set base entitlements.

in that create new entry for your quota type .ANd enter ESG ,PSG,Rule and sequence number .Under the Base entitlement tab,leave seniority,age and all if not needed in ur company and under the entitlement tab and under Day Balnce enter the time type you created here 9120.and select accrual period radio button.save it.

3.Timemanagement>timedata recording and adm>Managing time accounts with abs/att quotas>Calculating abs entitlements>Determine validity /deduction interval.

create a newentry with your quota type and select accrual period radio buttons.

4.Goto V_T559L table and find your quotatype or create new entry and on left hand side under dialog structure select the 2 nd folder quotatypes and find your quota type and select increase radio button and save the changes.

5.And the rest is same as the general quota configuration.

Former Member
0 Kudos

sorry for waiting..

SCENARIO:

i have an employee that work at 24:00 until 08:00, call it Q3A for DWS.

but, in SAP if u wrote 24:00 in planned working hours (PWH) it is automatically changed to 00:00.

so, to trick this i wrote 23:59 in PWH and i add 23:59 - 24:00 for the tolerance.

CASE:

the employee (with DWS=Q3A) was overtime at 08:00 - 10:00.

when i run PT60, the PCR is generated twice.

can u show me why it generated twice?

or maybe my config for Q3A is also wrong?

thx for your help

former_member207885
Contributor
0 Kudos

Hi Edison,

I really dont understand the issue.you were asking about holiday pay.I assume that public holiday is on only 1 day.This rule works on only holidays.How can it work for twice?

Are you getting the double the number of hours in the wagetype??

Can you check some thing ?Run the time evaluation and open the log on that particular day,go to the rule check the input and output.

I think in the input(TIP) there are two entries with different processing type and time types.

If you use PTIP to call the rule,the rule will be called for each TIP entry and it willbe processed for twice.So each time it checks wheter the number of hours is more than 4 hours and each time it generates that wage type.

So plz check the TIP entries.I am sure that there will two TIP entries on that day.If so plz let me know what are those processing types and I may help you to fix this issue.

former_member207885
Contributor
0 Kudos

Hi Edison,

if possible,please let me know the TIP entries.Just type whatever you see in the TIP.

with time,pairtype,processing type,time type,origin type.

Then we can think how we can fix it.

Former Member
0 Kudos

employee's TEVEN is 23:58 - 10:05, overtime from 08.00 - 10.00, and the DWS is Q3A (23:59 - 08:00), then table TIP is shown just like below

From To Number

23.9667 34.0833 10,1166

32.0000 34.0000 2,0000

maybe because TIP is generated in 2 field, so the PCR is generated twice.

how should i handled that case?

former_member207885
Contributor
0 Kudos

Ok,You forgot to mention the processing types of each pair.But anyways,You said that the second pair is overtime so I guess,the processing type is M and please checkthe processing ype of the first pair.

I guess it is S.If it is S,then please make changes to rule like this.

VARSTHOLCL //public holiday

  • COLOP*

1

OUTWPTRFST //level

    • COLOP* //for any other level

08

VARSTPRSNT //EMPLOYEE AT WORK?

N COLOP*

Y

GCY ZXXX

COLOP*

Here ZXXX is the name of the other rule.and now create another rule with the name ZXXX like this.

OUTTPVTYPE //processing type?

  • //it it is anything other than S

COLOP*

S //if it is S

HRS=PNUM

HRS?4

< COLOP* // for any hrs<4

  • // >= 4

HRS=1

ADDZLS2816

COLOP*

Former Member
0 Kudos

tq venkat. i did a mistake.

i put that code before GWT, so it cannot capture the processing type (OUTTPVTYPE). when i put the PCR after GWT, it works properly.

thx.

Answers (2)

Answers (2)

Former Member
0 Kudos

i found a wrong calculation in some case..

so i mark this thread as unanswered.

pls help again..

Former Member
0 Kudos

Hai..

If u Dont mind can u give ur exact requirement,... frankly i didn tunderstand ur requirement...

former_member207885
Contributor
0 Kudos

Hi Edison,

Please let me know example of cases in which you got the wrong calculations.

Please use the function PTIP to call the rule.\

are you saying that this rule doesnt work for some holidays and its working for only some?

if thats the case check the holiday classes of those holidays.This rule works well for the holidays of holiday class1.

Former Member
0 Kudos

i found a wrong calculation in some case..

so i mark this thread as unanswered.

pls help again..