cancel
Showing results for 
Search instead for 
Did you mean: 

Customized Warning Message in Payroll Log

Former Member
0 Kudos

Hello Experts,

I have a specific requirement.

If an employee has data saved in particular infotype for example 0014 and for the same employee if another Infotype exists for example 0015.

In this case while running the payroll , in the payroll log a customized Warning message needs to be generated.

I have got some leads like using operation MESSG or operation XMES.

I have not got a clear idea on it.

Have anybody worked on it.

If anybody can help me out with the steps it would be of great help.

Thanks

Srijit M

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

You can create a custom payroll function to check (e.g. same wage type exists in both IT0014 and IT0015), and produce a message in the payroll log. Note that the message will be the pernr plus only 5 char message, and therefore may not be very descriptive.

Below is pseudo-code for your scenario :

FORM FUZxxxx .

...

"logic to check if same wt exists on both IT0014 and IT0015

...

if condition is true.

op+5(5) = '14-15' . "warning same wt exists in both IT. As mentioned, not very decriptive as you only have 5 char to play with

perform opmessg. "SAP routine tol dipslay message in the payroll log, same as using MESSGxxxxx if use in schema

endif.

ENDFORM.

Former Member
0 Kudos

Hi Ted,

Thanks for your reply .

And Yes we can create a customized Function to check the logic and produce a message as output.

But I am trying to find out some more easy solution...Like any PCR that can be written where in It can be checked If both the Infotypes exist during a particular period...If yes then using operation XMES output a customised message...

Can anybody direct me how to write a PCR.....where in I can give condition to check the existence of both the Infotypes.

Thanks & Regards

Srijit R M

sikindar_a
Active Contributor
0 Kudos

Yes . We can write the PCR for the above one we have the same Scenario where to display message if there is Two wage types Exits. Will update you later today

Former Member
0 Kudos

Hi Sikandar ,

Thanks a lot

Will wait for your update.

Thanks & Regards

Srijit R Menon

Former Member
0 Kudos

Hi Sikandar bhai,

Would be great if you can help out today .

Thanks in advance

Srijit R M

sikindar_a
Active Contributor
0 Kudos

this is the PCR which we have written

Co Existence of Conveyance and Fuel

Conveyance Wage type

*

****

AMT=S 1025 (conveyance)

AMT?0

*

SCOND=F IF

>

SCOND=T IF this is one rule the next rule

*

9210

AMT?0

*

ADDWT

>

ERROR

Might Help you

Former Member
0 Kudos

Hi Sikandar,

Thanks for the help...Will try to use this..

But can we use it in Infotype Level...I mean here in this pcr we are checking in Wage type..

Is it possible to check using Infotype Level

Best Regards

Srijit R Menon

sikindar_a
Active Contributor
0 Kudos

If iam not wrong if you are asking at infotype level why cant we restrict the same at the infotype level where the users make entries (User Exits)

If you are looking at Schema Level i think the best would be going for Custom Function

Former Member
0 Kudos

Hi Sikandar ,

Thanks for your reply,

Infotype level there is already an exit, which comes with the delete option for the other infotype , when we go for creating the first infotype.

But still some records are getting managed to retained, as the entry is completely using portal.

I tried a lot for the said issue ....to be solved using PCR...coz I knw we can generate the message in PCR...

But checking of Infotypes is the issue...

I think I have to go using the Custom Payroll function only

Thanks & Kind Regards

Srijit R M

Former Member
0 Kudos

Hi Sikandar ,

Before going for any custom payroll function.

I want to try using some wage types comparison..If I can get this work.

I am referring to your PCR above..

Here after this condition "SCOND=T IF this is one rule the next rule"

Is the * sub to this...also for 9210...is it not setting an amount there....

Best would be If you could send me the screenshot of this PCR to my id mentioned in my contact

Thanks a lot

Srijit R Menon

Answers (1)

Answers (1)

sikindar_a
Active Contributor
0 Kudos

seems there is problem in your contact i tried but was not able to send you please check mine

Former Member
0 Kudos

Hi Sikandar ,

No problem.

I got the PCR right .

Instead of Infotypes , Wrote the pcr to compare the wage types and generate the warning message if both exists

This seems to be the simple solution , instead of going for cutom function.

Thanks a lot for your help.

Will close the thread once the testing is complete

Best Regards

Srijit R M