cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a schema that check IT0041 and give bonus

Former Member
0 Kudos

Hi experts,

I want to create a schema (or also PCR) that will check date type from IT0041 and check with the payroll period. if both month is the same, then the PCR will call a wage type that will give bonus for that month payroll. The problem that i'm facing is that i don't know how the schema or PCR will do the date type checking. Can you show me the step to do this? thanks for the time.

Accepted Solutions (1)

Accepted Solutions (1)

Sanky
Active Contributor
0 Kudos

Hi,

What are you maintain in the IT41 exactly for some wage type calling in the payroll with payroll period?

Share with your exact business scenario and would be helpful to understand your approach for solution design.

Regards,

Sankarsan

Former Member
0 Kudos

what i want to achieve is that every year, at the same month (which is the month that person hired) they will receive a bonus payment automatically. In this case, i store my hire date into wage type Z1 ( original hire date) at IT0041

so far what i have done is create a pcr which contains:

num=fz1m

amt=ycurpp

but when i see the value in the log, the num is playing in the NUM field while amt at AMT field.

and im also confused in how to compare them btw.

thanks for your time

venkateshorusu
Active Contributor
0 Kudos

It is repetitive process for every year we should write a PCR with the help of months even it is bit lengthy PCR and we have to check all the possible scenarios.

If it is one time in employment period we can go with normal PCR with the help of complete year but here we will have to go with option months( complete months).

Use below operation FXXC_A further we can write our own logic.

NUM=FXXC_A

NUM/12

NUM?1

        >

          Num?2

                 >

                 =

                    AMT=KZZZZZ(Constant else amount calculation logic)

                 <

        =    

          AMT=KZZZZZ(Constant else amount calculation logic).

        <

This way we should query for at least 60 years, It is bit lengthy mean while i will check and let you know any other operation available to make it small but it works.

Maintain date type in IT0041 and place it in PCR instead of XX.

Regards

Venkatesh

Sanky
Active Contributor
0 Kudos

Ok.

You can check the below link where similar thing has been addressed. Replace birthday concept with bonus payment.

http://scn.sap.com/thread/3448812

Regards, Sankarsan

jagan_gunja
Active Contributor
0 Kudos

NUM=FZ1M  gives Z! date type's month value in num field.

However AMT or NUM=YCURPP gives the current pay period nn with the format nnyyyy.  This does not help comparing with the month of date type.

You need PCR lines as below

    NUM=FZ1M

    TABLE 549Q

    NUM?Bxxxxx

You need to enhance the TABLE operation code - in the form READ_ATAB_MOD (in include RPCBURZ0) - to read T549Q and use the current pay period year/period to locate the record. 

Then the month needs to be used from this period's end date.  You'd need to enhance the form GET-TABLE-FIELD called by NUM (as well as RTE & AMT), so that it uses the new custom value in xxxxx from above pcr lines(for example CURPM for current for period month)

I can see there is some amt of ABAP code is required.  Other op'ns like CMPER, VARGB do not help for your needs.

Hope this helps.

venkateshorusu
Active Contributor
0 Kudos

You got the answer Kudo's to Sujith he made it smaller instead of querying all the years, He come up with a good logic.

Implement it it works.

Regards

Venkatesh

Answers (3)

Answers (3)

sikindar_a
Active Contributor
0 Kudos

please check the following thread , might be useful http://scn.sap.com/thread/3648853

Former Member
0 Kudos

Hi Benyamin,

Can you please elaborate your scenario with some more details.

What date you have maintained in IT0041? You want a PCR to compare months then what about years? Years will be always remain same or can be different?

Thanks

Former Member
0 Kudos

Hi,

There is a Payroll operation provided for the same

WPRP - (  Convert or Compare Date Type (from DATES) into Payroll Period )

=ALL4Period for Date Type         
?ALL2Date Type in Period?  DCOMPARE1

This could serve your requirement for period comparison using  " ? " with the required date type.

The date type period will be compared with Payroll period.

The output would be < , > , = 

The same can then be utilized for bu\building the logic.

However i do see it being enabled only ZA ( South Africa ).

You may have to take technical help to get it enabled for required country.

Thanks and Regards,

Guruprasad P