cancel
Showing results for 
Search instead for 
Did you mean: 

How to make Payslip available only from day 20 onwards in Portal

Former Member
0 Kudos

Hello, I have to make the payslip available only from day 20 onwards, right now it's already available (June) and that cannot happen.

How can I make this?

Best regards,

Mario

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Implement badi XSS_REM_INTERFACE and in the method PROVIDE_FILTERED_RGDIR write a piece of code like:

data wa_rgdir type pc261.

data: l_date type datum.

loop at IM_IN_RGDIR into wa_rgdir.

l_date = wa_rgdir-fpend - sy-datum.

*payslip visible 10 days prior

if l_date < 10.

append wa_rgdir to EX_FILTERED_RGDIR.

endif.

endloop.

The above code is for the payslip to be available 10 days prior to payroll run.

Regards,

Sumeet

Former Member
0 Kudos

Is there a way to make it for day 20 of each month?

Thank you very much!

Mario

Former Member
0 Kudos

Yes, if you know the payroll run date, subtract the number of days from that date which takes you to 20.

Former Member
0 Kudos

I think I had implemented the method well but I just tested and it's still showing...

I have no experience in BADI's, could you please give me the basics steps to do this requirement? Please.

Thank you very much,

Mario

Answers (1)

Answers (1)

pramod_gopisetty1
Active Contributor
0 Kudos

Hello,

If my understanding is right you want to show the link in ESS only after 20th of every month?

Are you using Homepage Framework?

If so you can do enhancement to the FM HRXSS_SER_GETMENUDATA which renders the links to show in Portal.

Alternative to find which FM is been called is to do ST05 Trace.

Once you have the FM do an enhancement with the custom code to check the date and display the link.

Or

use Proxy class in service for payslip and you can have your custom logic to show the link or not.

Hope this helps.

Cheers-

Pramod

Former Member
0 Kudos

I solved the problem by doing this code on the IF_EX_XSS_REM_INTERFACE~PROVIDE_FILTERED_RGDIR

METHOD if_ex_xss_rem_interface~provide_filtered_rgdir.

DATA: l_pdate TYPE t549s-pdate,

lw_rgdir TYPE LINE OF h99_clst_t_rgdir.

SELECT SINGLE pdate FROM t549s

INTO l_pdate

WHERE molga = im_molga

AND datmo = '00'

AND permo = '01'

AND pabrj = sy-datum(4)

AND pabrp = sy-datum+4(2).

LOOP AT im_in_rgdir INTO lw_rgdir.

IF ( lw_rgdir-fpper < sy-datum(6)

OR ( lw_rgdir-fpper = sy-datum(6) AND sy-datum >= l_pdate ) )

AND lw_rgdir-fpper >= '201009'.

APPEND lw_rgdir TO ex_filtered_rgdir.

CLEAR lw_rgdir.

ENDIF.

ENDLOOP.

ENDMETHOD.

Than I only had to change the dates in t549s for the period I want for day 20 of each month.

Thanks

Former Member
0 Kudos

good stuff, for some reason i forgot to follow the thread. Sorry, I could have helped you earlier, on a positive note, you now know how to impliment a BADI

Mr_Anand_Sagar
Explorer
0 Kudos

Hi Gurus,

I have a same kind of requirement, but the Payslip visible date should be after Pay day.

I have written a code at IF_EX_XSS_REM_INTERFACE~PROVIDE_FILTERED_RGDIR

DATA : wa_rgdir TYPE pc261,

newest_date TYPE datum.

newest_date = sy-datum .

LOOP AT IM_IN_RGDIR INTO wa_rgdir .

IF newest_date GE wa_rgdir-paydt .

APPEND wa_rgdir TO ex_filtered_rgdir.

ENDIF.

ENDLOOP.

Now the functionality is working absolutely fine in ESS.

Later, If I click on show Overview, then it is going to 500 inrternal server error.

If I deactive the BADI, it will work fine.

seems I need to put a logic in below any one of the methods.

DEFINE_PRINTBUTTON_STATUS ABAP ABAP Code Determine Whether Send Output Request Is Supported

PROVIDE_DROPDOWN_ENTRIES ABAP ABAP Code Define Selection List and Additional Info

PROVIDE_OVERVIEWTAB_FIELDCAT ABAP ABAP Code Field Catalg for Overview Table

PROVIDE_SRVDESCRIPTION ABAP ABAP Code Description: Salary Statement Service on Area Page

PROVIDE_OVERVIEWTAB_LINE ABAP ABAP Code Formatting of Cell Content for a RGDIR Row

Kindly let me know how can I proceed to see overview details by activating this BADI.

Thank You.

Sagar