Human Capital Management Blogs by SAP
Get insider info on SAP SuccessFactors HCM suite for core HR and payroll, time and attendance, talent management, employee experience management, and more in this SAP blog.
cancel
Showing results for 
Search instead for 
Did you mean: 
ClaudiaMayer
Associate
Associate
5,609

Payroll Canada Year End 2024

Greetings from SAP HCM Canada Support team!

On this blog we will share news, important notes and changes related to Canada Year End 2024. If you have questions about 2024 Canada Year End, feel free to ask in the comment section of this blog!

 

Legal Changes for HCM Canada

To review the upcoming legal changes for Canada you can access the Regulatory Change Manager. 

Please check the KBA 3421995 - Using the regulatory change manager tool to find if a solution is planned for a legal chan...

 

ASUG Webcast

SAP HCM Canada Payroll and Tax Reporting Year-End Update 2024:

Date: October 30th, 2024

Time: 12:30 PM CDT

Speakers:

  • Viswanath Ramamurthy, Product Manager, HCM US & Canada, SAP Labs
  • Boris Cruz, Senior Developer, SAP

More information and registration in the following page:

SAP HCM Canada Payroll and Tax Reporting Year-End Update 2024

 

Main SAP Note and minimum mandatory HRSP for Year End 2024

3513929 - Main SAP Note for Canadian year-end 2024

The minimum mandatory HRSP for Canadian Year End in fiscal year 2024 is specified in the above Note, according to the software release.

The system must be updated to the minimum required HRSP to work correctly. If you face an issue that is caused by not having the minimum HRSP, we will suggest the HRSP upgrade.

You can find Support Packages and CLCs schedules in the following page:

SAP ERP Human Capital Management Support Package Schedules

Please constantly check the main note as it will be updated throughout the year-end to reflect the most up-to-date information on Year End 2024 processing, including new correction notes.

You can set a notification to know when a note/KBA is updated or released. You can check the KBA 2478289 - How to set up notifications for new or updated SAP Notes and/or KBAs with Expert Search fi...

 

Reporting a tax calculation issue

In case you identify issues with tax calculation, please report a case and provide your analysis as per the approach below:

3314325 - How to report tax calculation issues in SAP HCM Canada?

We do not accept comparison with PDOC, as this calculator cannot simulate all aspects of payroll of SAP HCM.

2658386 - Differences in tax calculation between SAP and CRA PDOC

 

Relevant KBAs

1974838 - T4 not displaying lower half of form in run viewer

3433906 - Why the year end report does not print the current form version?

3117398 - Change in employee's name not generating T4/T4A/T4A-NR amendment

 

Frequently Asked Questions

1. When is the PIER report going to be updated to be compliant with CPP2 (CPP second contribution)?

The PIER report was updated by the note 3512979 - YE24: PIER Report for second additional CPP/QPP contribution to be compliant with CPP2.

 

Questions and feedback

Your feedback and constructive criticism are appreciated.

As already mentioned, feel free to comment on this post if you have questions about 2024 Canada Year End.

 

Kind regards, 

Claudia, Carlos and Jonas.

52 Comments
VEH2
Explorer
0 Kudos

Dear ClaudiaMayer, 

Our SAP product verion is SAP ECC 6.0 with support pack N7 and are mid of unicode conversion.

Please let us know if we can apply Canada year end 2024 related notes without upgrading latest support pack.

Regards

Venkatesh

 

 

CarlosAccorsi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello @VEH2,

The mandatory minimum support package detailed on note 3513929 (Main SAP Note for Canadian year-end 2024) must be applied on your system.
This is a pre-requisite for the Year End and it will not be possible to just apply the notes if that's not accomplished beforehand.

Best Regards,
Carlos

VEH2
Explorer

Dear Carlos,

Thanks for your inputs

Regards

Venkatesh

VEH2
Explorer
0 Kudos

Provincial Tax and Federal Tax for 2025 

VEH2
Explorer
0 Kudos

Dear All,

Provincial Tax Total credits and Federal Tax Total credits tables were updated effective 01.01.2024.

We have Bi weekly payroll.  01st payroll of 2024 was started from 23.12.2023 with pay date 12.01.2024

So users updated IT0462 and IT0463 manually as correct values were not getting picked.

First payroll of 2025 is starting from 21.12.2024 with pay date 10.01.2025 with support pack O2.

User expecting system to pick correct Provincial Tax Total Credits and Federal Tax Total Credits amount effective 01Payroll of 2025(payroll start date 21.12.2024 with pay date 10.01.2025) once support pack O3 is upgraded

Please let me know if system will pick correct Provincial Tax Total Credits and Federal Tax Total Credits values without updating IT0462 and IT0463 tables manually

Regards

Venkatesh

jonasben
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Venkatesh @VEH2,

Unless explicitly configured differently in BPVAL configuration option, BPA is collected from the federal (463) and provincial (462) infotypes during payroll processing. This means that those infotypes need to be updated.

Many customers use Tax Update Utility (program RPUTXUK0) to mass-update the infotypes for all employees. You can evaluate and test that option in a controlled environment.

Regards,

Jonas

ChandraV
Participant

To add to what @jonasben has stated, payroll reads IT463 based on check date. You will have to keep that in mind when updating 463.

rory27
Explorer

Hello Claudia,

Could you pls let us know if a new box for 2024 RL-1 to be introduced for WT/317-QPP Second Contrib. EE in T596I? If yes, when it will be delivered?

Thanks,

Rory

VEH2
Explorer
0 Kudos

Dear Jonas, ChandraV,

Does it mean there is no system solution hence user is required to update IT462 and IT463 manually every year

Kindly confirm

Regards

Venkatesh

jonasben
Product and Topic Expert
Product and Topic Expert
0 Kudos

@VEH2 the standard solution involves updating the Infotypes.
There is the utility tool which I mentioned in last reply that you can use to mass update the infotypes.

Or you can use different BPA determination method . For more details on that, see Note 2982019

jonasben
Product and Topic Expert
Product and Topic Expert

@rory27 Rory, if I am not mistaken the 'Box B.B' in Relevé (for additional QPP contributions) will receive the amount from /317.
Necessary changes and forms will be deliver through Year End and Notes will be listed in the Main Note.

dilippatchamatla
Explorer
0 Kudos

hi,

When can we expect Canada taxation changes for 2025, T4/RL1 forms changes for 2024 ?

Thanks,

c64_fanboy
Explorer
0 Kudos

Hi,

For Canada T4/RL1, new footnotes are being introduced to replace existing footnotes, and the amounts need to be split during the taxation year.

I'm speaking of F91 and F92 for T4 (replacing F39 and F41 respectively), only effective on or after June 25, 2024, and L-12 and L-13 for RL1 (replacing L-9 and L-10 respectively), only effective on or after June 25, 2024.

Will SAP be releasing updates for these footnotes, will the proration formula (for the split amounts) be included with the updates, and when will they be delivered?

Thanks.

rory27
Explorer
0 Kudos

Hello,

We applied Note 3216046 - PY-CA - Enabling tax deduction based on employee's province of residence during our year-end HRSP. With a case for EE lives in New Brunswick but works in Manitoba ( IT0461, IT0462, IT0464 are all maintained as per the note), that the federal tax has not been reduced as described in the note. Could anyone shed some lights on it?

Thanks,

Rory

jonasben
Product and Topic Expert
Product and Topic Expert
0 Kudos

@rory27 Rory, I suggest raising a case so your scenario can be analyzed in detail.

jonasben
Product and Topic Expert
Product and Topic Expert
0 Kudos

Regarding new legal changes: necessary changes will be delivered in due time. 

Please check session Legal Changes for HCM Canada of this blog article.

MeghaTufchi
Explorer
0 Kudos

Hello,

We have currently implemented all the released notes so far, still box 16A is Blank on T4 ( even though EE has amount in WT /316. It does show in T4 Log, but blank on T4 PDF. Also, any update w.r.t T4A entry in V_T799BSFT for Year 2024? Could you kindly suggest.

Thanks,

Meghan

 

rory27
Explorer

Hello,

I don't see the BPA for Yukon has been released in T511K/TXPYT for 2025, but seems it should be increased from $15705 to $16129, will SAP release a follow up note soon?

Thanks,

Rory

ClaudiaMayer
Associate
Associate
0 Kudos

@c64_fanboy In this case we recommend you to check the Regulatory Change Manager. You can check more information on the session "Legal Changes for HCM Canada" on this blog.

 

rory27
Explorer
0 Kudos

Hello,

In note 3515500-YE24: Relevé forms and XML changes for Tax Year 2024, below footnotes are introduced:

  • Box L-11 Rate for the deduction entered in box L-12 or L-13
  • Box L-12 Security option deduction under section 725.2 of the Taxation Act: Benefit granted after June 24, 2024

For L-11, the rate after June 24 is 25% or 33.33% for us, could you please clarify what's the logic behind this box and how to use it?  should a wage type to be generated for that rate(s) on personnel number level? or any specific technical WT(s) should be mapped to it? or any other ways to show the rate(s) for all the eligible EEs?

Also could you please share the logic behind L-12 as well? should the amount of it be calculated via a specific WT at Employee's level? or there's other way to maintain it?

Thanks,

Rory

ClaudiaMayer
Associate
Associate
0 Kudos

@MeghaTufchi Could you kindly check if the form is updated for 2024? It should have a T4(24) on the bottom left corner. If it is not updated to the T4(24) I suggest you to check the KBA 3433906 and also if the version 2 of the note 3539103 is implemented and all the manual steps were performed.
If this is not the case I suggest raising a case so your scenario can be analyzed in detail.

Regarding the T4A entry in V_T799BSFT for Year 2024, I suggest you to check the Regulatory Change Manager. You can check more information on the session "Legal Changes for HCM Canada" on this blog. Also please check constantly the main YE 2024 note mentioned in this blog as well. 

 

 

EdLIao
Explorer
0 Kudos

For the 2024 RL-1, Box G is stopping at 68,500 and not including the amount that is applicable for QPP2.  I would expect it to be reporting 73,200 like Box 26 of the T4.  Will this be fixed in an upcoming version of note 3515500? 

shiva906
Explorer
0 Kudos

@ClaudiaMayer when we can expect changes on BOX 27A of the T4 ?BOX 27A.png

ngagne
Explorer
0 Kudos

Hello!

Does anybody know when the T4A pdf form will be delivered for year 2024 in SAP HANA?

Thanks,
Nathalie Ann  

dilippatchamatla
Explorer
0 Kudos

Yukon BPA amount is not changed for the year 2025. The effective date in T511K constant from 2024 is 15,969.00 and no change after that. Is SAP going to release a separate note for this ?

jonasben
Product and Topic Expert
Product and Topic Expert
0 Kudos

@dilippatchamatlaI believe this is currently being addressed. Keep an eye on the main note, as it will be updated with new details to cover any missing information.

@shiva906 keep an eye on main note, all necessary changes will be announced there. 

etardiff
Explorer

Hello,

I'm not a tax expert, so I'm hoping someone can help me out with this.

This is in our QAS system. 

We have some employees moving from Province of Employment QC to ON effective Jan. 1. Infotypes 0461, 0462 and 0463 have been updated effective Jan 1. 

etardiff_0-1734635088943.png

Pay period 01-2025 runs from 21.12.2024 to 03.01.2025 with pay date on 10.01.2025. When we run PP01, it is still calculating QC tax, QPP, QPIP etc. It also has an amount for CPP. If taxes etc. are calculated "when paid" shouldn't the QC stuff no longer be there? 

Am I missing anything?

Thanks in advance for your advice.

Elizabeth

 

Addendum:

I did some further testing and found when the new IT0461 Tax Assignment was created on the first day of PP01-2025 then the system did not calculate the QC taxes, QPP etc. To me this seems incorrect. If taxes are based on "when paid" then I think the rules should be looking at the tax assignment effective on the pay date. However since it works, this is what we will go with. Just wanted to let everyone know the solution.

Thanks!

VEH2
Explorer
0 Kudos

Dear All,

Unable to find T4 related xmlschm file for 2024

Please help me with the link or Note to get the zip file

Regards

Venkatesh

shiva906
Explorer
0 Kudos

@ClaudiaMayer @jonasben  Any idea when T4 2024 XML files will ready for testing ?

jalpanthakkar34
Explorer

@ClaudiaMayer 

 

The CRA says CPP2 amount should not be added to Box 16. They should only be reported to Box 16A.

The note https://me.sap.com/notes/3539103 correctly add WT 316 to Box 16A but does not remove it from Box 16.

Ref: https://www.canada.ca/en/revenue-agency/services/forms-publications/publications/rc4120/employers-gu...

Would SAP release correction note that takes care of this?

Thanks

 

grenod
Explorer
0 Kudos

When running program RPCAUDK0 (transaction PC00_M07_RCON) in the Flat display mode, the ALV report does not display boxes 16A and 27A. I have tried to modify the layout columns, but these boxes do not appear in the selection of boxes. This report is used by payroll services to reconcile the T4 boxes. Has anyone encountered this problem, or have been able to add these columns to the display.

jmentans
Explorer
0 Kudos

We have a question regarding the new Account Number fields on the XML files.  There is a field for BN9 and a field for BN15.  We currently create our T4 XML files for each BN9 which means one file will contain 2 RP#’s that belong to that BN9 number.  Can we still submit our files to CRA  where one XML file contains multiple RP#’s?  SAP will create the file successfully but we are concerned because we have received 2 different answers from CRA reps and the wording on their website is inconsistent.  If we can’t submit a file with multiple RP#s then we will need to change our Tax Reporting Units and we would prefer not to do that.   Has SAP been told by CRA that we have to submit each RP# separately in 2024 and beyond?

etardiff
Explorer
0 Kudos

Hi @ClaudiaMayer -

Regarding @jalpanthakkar34's question about reporting CPP2, is SAP planning on addressing this issue?

It is also a problem for reporting QPP2 on the RL1. Further, the RL1 only provides one cumulation wage type for reporting both QPP and QPP2 employer portion, however, the RL1 summary info indicates that the two amounts should be reported separately. It looks like a new cumulation wage type is required. 

etardiff_0-1736878975454.png

 

jonasben
Product and Topic Expert
Product and Topic Expert
0 Kudos

@VEH2 Schema file can be found in CRA website File information returns electronically (tax slips and summaries)

@shiva906 Check that you have all notes implemented (they are all listed in main note) and you can test the XML. 

@jalpanthakkar34 I don't see /316 mapped to box 16 in standard delivered solution.

@etardiff there is a Note being tested at the moment for the employer C2Q amount in Relevé. 
Please monitor the Main Note for updates.

etardiff
Explorer

Hello,

The new F90 entry did not work as expected. When I split the entry between F38 delimited 2024-06-24 and F90 effective from 2024-06-25,

etardiff_0-1737035067159.png

the wage type was not reported at all. However, when I put the wage type in both F38 and F90 for the entire year, it reported the full amount in both.

Can someone shed some light on how to get this to work correctly?

 

etardiff
Explorer

@jonasben 

I received a notification email that main YE note 3513929 has been updated. It now shows version 16 released on 17.01.2025, but there are no new notes listed or other changes to the note. Can you please advise what the update is? Hoping it's the new QPP2 ER box and an answer on how to achieve the split for boxes F38 and F90.

Thanks.

 

@jonasben -

You mentioned that "there is a Note being tested at the moment for the employer C2Q amount in Relevé. 
Please monitor the Main Note for updates."

To date, there is no update on the Main Note for reporting the QPP2 ER amount. Do you know when we can expect this?

 

 

c64_fanboy
Explorer
0 Kudos

@etardiff 

RE:

Hello,

The new F90 entry did not work as expected. When I split the entry between F38 delimited 2024-06-24 and F90 effective from 2024-06-25,

the wage type was not reported at all. However, when I put the wage type in both F38 and F90 for the entire year, it reported the full amount in both.

Can someone shed some light on how to get this to work correctly?

We used a BAdI to split them. 

Looking at the configuration changes introduced in the following SAP Note, I am concerned about the manual updates specified for Table V_T596I for subapplication T424 and T425.  It only adds wage type /416 [CPP Second Contrib. ER] to box 27A [Employer's CPP2 contributions], but does not remove the association to Box 27 [Employer's CPP contributions].  Anyone else with this concern?

December 16, 20243549128Correction of legal function

YE24: Missing total employee and employer C2 in T4 XML

altruismconsulting_0-1737410923788.png
This leaves the reporting in the CRA Mag Media, causing the value to be 4055.50 rather than 3867.50, the max CPP.
<tot_empr_cpp_amt>4055.50</tot_empr_cpp_amt><tot_empr_cppe_amt>188.00</tot_empr_cppe_amt>
ChandraV
Participant
0 Kudos

@altruismconsulting could you clarify where in the note 3550220 (or another note) that specifies manual update to T596I, subapplication T424, T425 requiring adding wage type /416 to box 27 or 27A? The manual activities in note 3550220 doesn't have any instructions to update T596i. We have applied this note and we do not have /416 added to box 27.

@ChandraV , My Appologies. I copied over the wrong SAP note description into my Original Comment.  It should have read:

December 16, 20243549128Correction of legal functionYE24: Missing total employee and employer C2 in T4 XML

 

ChandraV
Participant
0 Kudos

@altruismconsultingthanks for details. This note only adds /416 to Box 27A, not to Box 27. Note sure which note added them to Box 27. We have them implemented but ours has only /420 in box 27.

VEH2
Explorer

@ChandraV 

Check below mentioned Notes

0003539103 - YE24: T4 form changes for tax year 2024

0003550220 - YE24 - Form T4, T4A PDF layout and T4 XML update 2024

ChandraV
Participant
0 Kudos

Thanks @VEH2 . However, both those notes did not add /416 to box 27. Note 3539103 adds /316 and /317 to box 16A and box 17A. Note 3550220 do not have any updates to T596i. Just to clarify, we do not have the issue reported by @altruismconsulting . I'm just trying to figure if we missed any in our manual updates. Thus far our T4 appears to function OK and we do not have /416 mapped to box 27 in T596I. 

etardiff
Explorer
0 Kudos

@sally_janus , @Lisa_Chapman 

Regarding the wage type split between boxes F38/F90 and F39/F91, we raised a ticket with SAP. They will not be providing a standard solution to this issue.

They did suggest BAdI HRPAYCA_B_YE_BOX_ADJUSTMENT to change Box amounts.

@c64_fanboy - is this the BAdI that you used? Was it relatively quick to implement? 

 

VEH2
Explorer
0 Kudos

 

@ClaudiaMayer and Team,

In UAT we executed RPCYERK0 program and spool got generated along with Run id but in Production Spool is not getting generated along with Run id due to which user is unable to download T4 RL PDFs

Can somebody please help at the earliest

Regards

Venkatesh

sally_janus
Explorer
0 Kudos

@etardiff - thank you for the heads up.

@c64_fanboy   Can you provide the BADI details?  

 

Lisa_Chapman
Explorer

@etardiff @sally_janus We used the HRPAYCA_B_YE_BOX_ADJUSTMENT BAdi. It was fairly straight forward for our developer. We spent a couple hours determining the requirements, updating the BAdi and doing some basic testing.

c64_fanboy
Explorer
0 Kudos

@sally_janus , @Lisa_Chapman , @etardiff 

Sorry for the late reply. Yes, we used BAdI HRPAYCA_B_YE_BOX_ADJUSTMENT. As with any BAdI, you need to implement the BAdI (will create Z* implementation). Then use method CHANGE_BOX_TOTAL. This calls custom method SPLIT_FOOTNOTE_BY_DATE to do the splits.

METHOD if_hrpayca_b_ye_box_adjustment~change_box_total.

  DATA: gs_tcrt TYPE pc296.

  READ TABLE it_tcrt INTO gs_tcrt INDEX 1.

  CHECK gs_tcrt-cumyr EQ '2024'.

  IF is_form_control-slart EQ 'F38' OR is_form_control-slart EQ 'F39' OR is_form_control-slart EQ 'B20' OR
     is_form_control-slart EQ 'F90' OR is_form_control-slart EQ 'F91' OR is_form_control-slart EQ 'F94' OR
     is_form_control-slart EQ 'FL9' OR is_form_control-slart EQ 'FL11' OR is_form_control-slart EQ 'FL12'.

    DATA: gv_b20_betrg TYPE maxbt,
          gv_f38_betrg TYPE maxbt,
          gv_b20_betxx TYPE maxbt,
          gv_f39_betrg TYPE maxbt,
          gv_f90_betrg TYPE maxbt,
          gv_f91_betrg TYPE maxbt,
          gv_f94_betrg TYPE maxbt,
          gv_f94_betxx TYPE maxbt,
          gv_fl9_betrg TYPE maxbt,
          gv_fl12_betrg TYPE maxbt,
          gv_first_rec_si type boolean. "First record is status indian.

    DATA: gs_0464             TYPE pa0464,
          gv_fit              TYPE pca_taxau,
          gv_fit_ind          TYPE pca_exind.

    CASE is_form_control-slart.
      WHEN 'F38' OR 'F39' OR 'F90' OR 'F91'.
        CALL METHOD zcl_hr_badi_ye_adj=>split_footnote_by_date
          EXPORTING
            in_pernr  = is_main_dir-pernr
            in_date   = split_date_2024
            in_slart  = 'F38'
            in_regnr  = is_main_dir-regnr
            in_acnbf  = is_main_dir-acnbf
            in_wrkar  = is_main_dir-wrkar
          IMPORTING
            ex_betrg1 = gv_f38_betrg
            ex_betrg2 = gv_f90_betrg.
      WHEN 'FL9' OR 'FL12' OR 'FL11'.
        CALL METHOD zcl_hr_badi_ye_adj=>split_footnote_by_date
          EXPORTING
            in_pernr  = is_main_dir-pernr
            in_date   = split_date_2024
            in_slart  = 'FL9'
            in_regnr  = is_main_dir-regnr
            in_acnbf  = is_main_dir-acnbf
            in_wrkar  = is_main_dir-wrkar
          IMPORTING
            ex_betrg1 = gv_fl9_betrg
            ex_betrg2 = gv_fl12_betrg.
    ENDCASE.
    CASE is_form_control-slart.
      WHEN 'F38'.
        cv_box_total = gv_f38_betrg.
      WHEN 'F39'.
        cv_box_total = gv_f38_betrg / 2.
      WHEN 'F90'.
        cv_box_total = gv_f90_betrg.
      WHEN 'F91'.
        cv_box_total = gv_f90_betrg / 3.
      WHEN 'B20' OR 'F94'.
        SELECT * FROM pa0464 INTO gs_0464
          WHERE pernr EQ is_main_dir-pernr AND
                begda LE end_2024 AND
                endda GE beg_2024 AND
                wrkar EQ is_main_dir-wrkar
                ORDER BY begda ASCENDING.
          CLEAR: gv_fit, gv_fit_ind.
          DO  15 TIMES
            VARYING gv_fit      FROM gs_0464-tax01 NEXT gs_0464-tax02
            VARYING gv_fit_ind  FROM gs_0464-exi01 NEXT gs_0464-exi02.
            IF gv_fit EQ 'FIT' AND gv_fit_ind EQ 'N'. "Status Indian.
              IF ( gs_0464-begda LE beg_2024 ) AND ( gs_0464-endda GE end_2024 ).
                gv_f94_betrg = cv_box_total.
              ELSEIF gs_0464-endda LT end_2024. "Will happen at first record if begda < beg_2024
                gs_0464-endda = gs_0464-endda + 1.
                CALL METHOD zcl_hr_badi_ye_adj=>split_footnote_by_date
                  EXPORTING
                    in_pernr  = is_main_dir-pernr
                    in_date   = gs_0464-endda
                    in_slart  = 'B20'
                    in_regnr  = is_main_dir-regnr
                    in_acnbf  = is_main_dir-acnbf
                    in_wrkar  = is_main_dir-wrkar
                  IMPORTING
                    ex_betrg1 = gv_f94_betxx
                    ex_betrg2 = gv_b20_betxx.
                gs_0464-endda = gs_0464-endda - 1.
                gv_f94_betrg = gv_f94_betrg + gv_f94_betxx.
              ELSEIF gs_0464-begda GT beg_2024.
                CALL METHOD zcl_hr_badi_ye_adj=>split_footnote_by_date
                  EXPORTING
                    in_pernr  = is_main_dir-pernr
                    in_date   = gs_0464-begda
                    in_slart  = 'B20'
                    in_regnr  = is_main_dir-regnr
                    in_acnbf  = is_main_dir-acnbf
                    in_wrkar  = is_main_dir-wrkar
                  IMPORTING
                    ex_betrg1 = gv_b20_betxx
                    ex_betrg2 = gv_f94_betxx.
                gv_f94_betrg = gv_f94_betrg + gv_f94_betxx.
              ENDIF.
              EXIT.
            ELSEIF gv_fit EQ 'FIT' AND gv_fit_ind NE 'N'. "Not Status Indian.
              IF ( gs_0464-begda LE beg_2024 ) AND ( gs_0464-endda GE end_2024 ).
                gv_b20_betrg = cv_box_total.
              ELSEIF gs_0464-endda LT end_2024. "Will happen at first record if begda < beg_2024
                gs_0464-endda = gs_0464-endda + 1.
                CALL METHOD zcl_hr_badi_ye_adj=>split_footnote_by_date
                  EXPORTING
                    in_pernr  = is_main_dir-pernr
                    in_date   = gs_0464-endda
                    in_slart  = 'B20'
                    in_regnr  = is_main_dir-regnr
                    in_acnbf  = is_main_dir-acnbf
                    in_wrkar  = is_main_dir-wrkar
                  IMPORTING
                    ex_betrg1 = gv_b20_betxx
                    ex_betrg2 = gv_f94_betxx.
                gs_0464-endda = gs_0464-endda - 1.
                gv_b20_betrg = gv_b20_betrg + gv_b20_betxx.
              ELSEIF gs_0464-begda GT beg_2024.
                CALL METHOD zcl_hr_badi_ye_adj=>split_footnote_by_date
                  EXPORTING
                    in_pernr  = is_main_dir-pernr
                    in_date   = gs_0464-begda
                    in_slart  = 'B20'
                    in_regnr  = is_main_dir-regnr
                    in_acnbf  = is_main_dir-acnbf
                    in_wrkar  = is_main_dir-wrkar
                  IMPORTING
                    ex_betrg1 = gv_f94_betxx
                    ex_betrg2 = gv_b20_betxx.
                gv_b20_betrg = gv_b20_betrg + gv_b20_betxx.
              ENDIF.
              EXIT.
            ENDIF.
          ENDDO.
        ENDSELECT.
        IF is_form_control-slart EQ 'B20'.
          cv_box_total = gv_b20_betrg.
        ENDIF.
        IF is_form_control-slart EQ 'F94'.
          cv_box_total = gv_f94_betrg.
        ENDIF.
      WHEN 'FL9'.
        cv_box_total = gv_fl9_betrg.
      WHEN 'FL12'.
        cv_box_total = gv_fl12_betrg.
      WHEN 'FL11'.
        IF gv_fl12_betrg IS NOT INITIAL.
          cv_box_total = '0.25'.
        ELSE.
          CLEAR cv_box_total.
        ENDIF.
      WHEN OTHERS.
    ENDCASE.

    IF cv_box_total IS INITIAL.
      cv_box_total = '9999999.00-'.
    ENDIF.

  ENDIF.

*  IF is_form_control-slart EQ 'F90' OR is_form_control-slart EQ 'F91' OR is_form_control-slart EQ 'F92' OR
*     is_form_control-slart EQ 'F93' OR is_form_control-slart EQ 'F94' OR is_form_control-slart EQ 'F95' OR
*     is_form_control-slart EQ 'FL11' OR is_form_control-slart EQ 'FL12' OR is_form_control-slart EQ 'FL13'.
*    CLEAR cv_box_total.
*  ENDIF.

ENDMETHOD.
METHOD split_footnote_by_date.

*in_pernr
*in_date
*in_slart
*in_regnr
*in_acnbf
*in_wrkar
*
*ex_betrg1
*ex_betrg2

  DATA: gv_appl TYPE p_appl.

  CASE in_slart.
    WHEN 'B20' OR 'F38' OR 'F39' OR 'F90' OR 'F91' OR 'F94'.
      MOVE 'T424' TO gv_appl.
    WHEN 'FL9' OR 'FL11' OR 'FL12'.
      MOVE 'R124' TO gv_appl.
    WHEN OTHERS.
  ENDCASE.

  CONSTANTS: gc_begin_2024   TYPE datum VALUE '20240101',
             gc_end_2024     TYPE datum VALUE '20241231',
             gc_end_2024_bw  TYPE datum VALUE '20241209'.

  DATA: gt_rgdir            TYPE STANDARD TABLE OF pc261,
        gs_rgdir            TYPE pc261,
        gt_rt               TYPE STANDARD TABLE OF pc207,
        gs_rt               TYPE pc207,
        gt_tax1             TYPE STANDARD TABLE OF pc294,
        gs_tax1             TYPE pc294,
        gs_payresult        TYPE payca_result,
        gv_pernr            TYPE pc200-pernr,
        gv_date1            TYPE datum,
        gv_date2            TYPE datum,
        gv_betrg1           TYPE maxbt,
        gv_betrg2           TYPE maxbt,
        gt_t596i            TYPE STANDARD TABLE OF t596i,
        gs_t596i            TYPE t596i,
        gv_seqnr            TYPE pc261-seqnr,
        gs_t549q            TYPE t549q,
        gv_permo            TYPE permo,
        gv_days1            TYPE p,
        gv_days2            TYPE p,
        gv_totdays          TYPE p LENGTH 4,
        gv_prort1           TYPE p LENGTH 4 DECIMALS 4,
        gv_prort2           TYPE p LENGTH 4 DECIMALS 4,
        gv_split1           TYPE maxbt,
        gv_split2           TYPE maxbt,
        gv_table_index      TYPE sy-tabix,
        gv_save_fpend       TYPE fpend,
        gv_rt_betrg         TYPE maxbt.

  INCLUDE rpcccd09.

  CALL FUNCTION 'HR_PCLX_INIT_BUFFER'.

  gv_date1 = in_date - 1.
  gv_date2 = in_date.

* Read RGDIR
  gv_pernr = in_pernr.
  CALL FUNCTION 'CU_READ_RGDIR'
    EXPORTING
      persnr          = gv_pernr
    TABLES
      in_rgdir        = gt_rgdir
    EXCEPTIONS
      no_record_found = 1
      OTHERS          = 2.

  SORT gt_rgdir BY seqnr.

* Do split 1.

  LOOP AT gt_rgdir INTO gs_rgdir WHERE fpend GT beg_2024 AND
                                       fpend LE gv_date1 AND
                                       srtza EQ py_actual.

    MOVE sy-tabix TO gv_table_index.

    CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
      EXPORTING
        clusterid                    = 'RK'
        employeenumber               = gv_pernr
        sequencenumber               = gs_rgdir-seqnr
      CHANGING
        payroll_result               = gs_payresult
      EXCEPTIONS
        illegal_isocode_or_clusterid = 1
        error_generating_import      = 2
        import_mismatch_error        = 3
        subpool_dir_full             = 4
        no_read_authority            = 5
        no_record_found              = 6
        versions_do_not_match        = 7
        error_reading_archive        = 8
        error_reading_relid          = 9
        OTHERS                       = 10.

    gt_tax1[] = gs_payresult-nat-tax1[].
    READ TABLE gt_tax1 INTO gs_tax1 WITH KEY
      regnr = in_regnr
      acnbf = in_acnbf
      wrkar = in_wrkar.
    IF sy-subrc NE 0.
      CONTINUE.
    ENDIF.

    gt_rt[] = gs_payresult-inter-rt[].
    SORT gt_rt BY lgart.

    SELECT * FROM t596i INTO gs_t596i
      WHERE appl  EQ gv_appl AND
            sumlg EQ in_slart.
      LOOP AT gt_rt INTO gs_rt WHERE lgart = gs_t596i-lgart.
        IF gs_rt-cntr1 EQ gs_tax1-cntr1. "Do only for the business number passed to the method
          IF gs_t596i-rechz EQ '-'.
            gv_betrg1 = gv_betrg1 + ( gs_rt-betrg * -1 ).
          ELSE.
            gv_betrg1 = gv_betrg1 + gs_rt-betrg.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDSELECT.
  ENDLOOP.

* Do split 2

  ADD 1 TO gv_table_index.
  LOOP AT gt_rgdir FROM gv_table_index INTO gs_rgdir WHERE fpend GE gv_date2 AND
                                       fpend LE end_2024 AND
                                       srtza EQ py_actual.

    IF gs_rgdir-fpend GE gv_date2 AND "Prorate if gv_date2 splits the period.
       gs_rgdir-fpbeg LE gv_date2.

      IF gv_save_fpend IS INITIAL. "Only need to do this once.
*        CASE gs_rgdir-abkrs.
*          WHEN 'KM'.
*            MOVE '01' TO gv_permo.
*          WHEN 'KS'.
*            MOVE '02' TO gv_permo.
*          WHEN 'BW'.
*            MOVE '04' TO gv_permo.
*          WHEN OTHERS.
*        ENDCASE.
*        SELECT * FROM t549q INTO gs_t549q
*          WHERE permo EQ gv_permo AND
*                pabrp EQ gs_rgdir-inper+4(2) AND
*                pabrj EQ gs_rgdir-inper(4).

        gv_days1 = gv_date1 - gs_rgdir-fpbeg + 1.
        gv_days2 = gs_rgdir-fpend - gv_date2 + 1.
        gv_totdays = gv_days1 + gv_days2.
        gv_prort1 = gv_days1 / gv_totdays.
        gv_prort2 = gv_days2 / gv_totdays.
*      ENDSELECT.
      ENDIF.

    ENDIF.


    CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
      EXPORTING
        clusterid                    = 'RK'
        employeenumber               = gv_pernr
        sequencenumber               = gs_rgdir-seqnr
      CHANGING
        payroll_result               = gs_payresult
      EXCEPTIONS
        illegal_isocode_or_clusterid = 1
        error_generating_import      = 2
        import_mismatch_error        = 3
        subpool_dir_full             = 4
        no_read_authority            = 5
        no_record_found              = 6
        versions_do_not_match        = 7
        error_reading_archive        = 8
        error_reading_relid          = 9
        OTHERS                       = 10.

    gt_tax1[] = gs_payresult-nat-tax1[].
    READ TABLE gt_tax1 INTO gs_tax1 WITH KEY
      regnr = in_regnr
      acnbf = in_acnbf
      wrkar = in_wrkar.
    IF sy-subrc NE 0.
      CONTINUE.
    ENDIF.

    gt_rt[] = gs_payresult-inter-rt[].
    SORT gt_rt BY lgart.

    SELECT * FROM t596i INTO gs_t596i
      WHERE appl  EQ gv_appl AND
            sumlg EQ in_slart.
      LOOP AT gt_rt INTO gs_rt WHERE lgart = gs_t596i-lgart.
        IF gs_rt-cntr1 EQ gs_tax1-cntr1. "Do only for the business number passed to the method
          IF gs_t596i-rechz EQ '-'.
            gv_rt_betrg = gs_rt-betrg * -1.
          ELSE.
            gv_rt_betrg = gs_rt-betrg.
          ENDIF.
          IF gs_rgdir-fpend EQ gv_save_fpend OR "Do the split for every record of the same FPPER.
             gv_save_fpend IS INITIAL.
            gv_split1 = gv_rt_betrg * gv_prort1. "Prorate
            gv_split2 = gv_rt_betrg * gv_prort2. "Prorate
            gv_betrg1 = gv_betrg1 + gv_split1.
            gv_betrg2 = gv_betrg2 + ( gv_rt_betrg - gv_split1 ).
          ELSE.
            gv_betrg2 = gv_betrg2 + gv_rt_betrg.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDSELECT.

    MOVE gs_rgdir-fpend TO gv_save_fpend.
  ENDLOOP.

  MOVE gv_betrg1 TO ex_betrg1.
  MOVE gv_betrg2 TO ex_betrg2.


ENDMETHOD.

c64_fanboy_0-1738177278439.pngc64_fanboy_1-1738177301874.png

 

sally_janus
Explorer
0 Kudos

@c64_fanboy 

Thank you very much.

EPantino
Discoverer
0 Kudos

Hello all, 

Has anyone had an issue running the T4s via PC00_M07_CCYR with the Display Summary Results ticked, and in the middle of generation gets kicked out from SAP altogether? No ABAP runtime logs are being registered. 

I have logged in a case with SAP but haven't heard from support. If anybody has experienced the same, can you kindly share how you were able to get through this issue.

Thank you!