cancel
Showing results for 
Search instead for 
Did you mean: 

ESS salary statement to be shown after payment has done

Former Member
0 Kudos

Hi all gurus,

We are in EHP7 ECC 6.0 and using NWBC as a ESS Portal.

Now once the payroll has run, employees can view their payslip through ESS which the customer don't entertain. Employees must able to view payslip only after the payment has done.

We haven't done any enhancement or Badi implementation for it. Please let me know what i need to do to solve it.

Regards,

Namsheed.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Namsheed,

We too had a similar requirement at my company as well as some changes to the dropdown options so we made a copy of the class CL_DEF_IM_XSS_REM_INTERFACE and for our instance we only wanted to show the payslip on the date of pay as well so I modified the method IF_EX_XSS_REM_INTERFACE~PROVIDE_FILTERED_RGDIR and changed the newest_date to =sy-datum. rather than the default of sy-datum + 3.

Let me know if this works for you.

Thanks,

Martha

Former Member
0 Kudos

Hi Martha,

Thanks for the helpful reply.

I am trying for same change. i will make newest_date to =sy-datum instead of sy-datum + 3.

But I have a doubt.

If it is sy-datum + 3, what will happen..??


1. Payslip must show after 3 days of payroll run or

2. Payslip must show after 3 days of payment..?

I am not a technical person. Please clarify. I will do the changes which you have told and will let you know the result.

Regards,

Namsheed.


former_member182426
Active Contributor
0 Kudos

No need to do any enhancement for your requirement.

In standard itself it will check the paydt is more than that newest_date it will not display in ESS. check the standard code once.

For example:

You have the payslips for months Jun, Jul, Aug. And you are processing payroll for Sep month. If you process the payrol for Sep month then employee should not see this payslip.

In Application, it will get the paydates like this for these months.

20150930 - Sep

20150831 - Aug

20150731 - Jul

20150630 - Jun

As per your requirement employee should see only for Jun, Jul and Aug months payslips in ESS.

For Sep month it should be visible since it's yet be pay to the employee.

In standard code itself it will check and delete that record from display.

newest_date = sy-datum + 3.  - here it will take todays date and add 3 days and store in this field.


And it will check the list of payslips available for employee and delete the records which are greater than this newest_date by comparing with paydt.


so here, for Sep month it will be like newest_date = 16092015 + 3  = 19092015


delete ct_filtered_rgdir where paydt ge newest_date.


Here it will delete automatically that Sep month payrlip. Since Paydt is 30082015 > 19092015

and other records are < this newstdate so it will display in ess.



Former Member
0 Kudos

Dear Shankar,

Thanks for the detailed explanation.

My requirement is this :

Here the payroll will run on 24th and payment will be doing on 30th. And payslip is visible to employee on 24 itself which is not want to happen.

Only after 30th, the payslip should be available to employee.

Hope you understand my requirement.

Regards,

Namsheed.

former_member182426
Active Contributor
0 Kudos

Every month end payment will happen on 30 / 31.

As per my previous explanation in standard it self it will check that paydt in payroll result field and delete from display in ESS if the payslip paydt is for future date.

Which version your using ? can you place that code screen shot here ?

Former Member
0 Kudos

Hi Namsheed,

If it is sy-dayum + 3 it will look for payslips with a paydate of today + 3 days. So for instance in our situation we run bi-weekly payroll and the processing is all done by Tuesday for a Friday Payday and if we did not modify from the sy-datum + 3 the employee could see their payslip typically 3 days before they would be paid. Our payroll team did not want the payslip showing until the actual day of pay so that is why we changed it to sy-datum only.

So sy-datum + 3 is todays date and 3 days in the future.

Hope that makes more sense.

Thanks,

Martha.

Former Member
0 Kudos

Dear Martha,

Sorry for the delay in reply.

I tried giving break point in the the method IF_EX_XSS_REM_INTERFACE~PROVIDE_FILTERED_RGDIR.

But it is not triggering when I open the Payslip application.

For our customer, its monthly payroll.

So they will process the payroll on 18-22 of any month and they will do the payment on 27-31 of that month.

No changes has made as of now. Still on 18-22 when they process, payslip is visible to employees.

It should be visible only on or after the payment has done. (after day of payment date)

Pls guide me what changes I have to do for this.

Regards,

Namsheed.

Former Member
0 Kudos

Hi Namsheed,

Did you implement the Badi XSS_REM_INTERFACE? you need to do that to use the method PROVIDE_FILTERED_RGDIR.

There is a Note 901850 with instructions on how to implement the Badi.

http://service.sap.com/sap/support/notes/901850

Thanks,

Martha.

Former Member
0 Kudos

Dear Martha,

We have implemented the Badi.

Made the following change :

IF_EX_XSS_REM_INTERFACE~PROVIDE_FILTERED_RGDIR and changed the newest_date to =sy-datum. rather than the default of sy-datum + 3.

But still there is no change in the scenario. 3 days before, employee is able to view the payslip. When we give the breakpoint in the method, it is not triggering when we opening the payslip.

Pls suggest what more needs to be done.

Thanks,

Namsheed.

former_member182426
Active Contributor
0 Kudos

You just write below code after that line of code newest_date = sy-datum.

move '01' to newest_date+6(2).

And rest of the code lines remains same. Your final code will be like below in that method.


method IF_EX_XSS_REM_INTERFACE~PROVIDE_FILTERED_RGDIR .

   DATA: newest_date LIKE sy-datum.

   ex_filtered_rgdir[] = im_in_rgdir[].

   CLEAR ex_message.

* remove all in-periods where not:

*  a) paydt is at the past

*  b) paydt is in the near future (3 days)

* newest_date = sy-datum + 3.

   newest_date = sy-datum.

   MOVE '01' TO newest_date+6(2).

   DELETE ex_filtered_rgdir WHERE paydt GE newest_date.

endmethod.

With this it will not show the current month payslip until it moves to the next month 1st day. Employee will see his current payroll processing payslip on next month 1st.

siddharthrajora
Product and Topic Expert
Former Member
0 Kudos

Thanks everyone,

The issue is solved. Actually the Badi is different. Its not XSS_REM_INTERFACE but HRESS_PAYSLIP_BADI_IMPL.

But the code and all are same.

Now the breakpoint is triggering & the requirement has been achieved.

Thanks all once again,

Warm regards,

Namsheed.

Answers (0)