cancel
Showing results for 
Search instead for 
Did you mean: 

Funtion Module to retrieve the Last period in a retroactive Accounting Run?

Former Member
0 Kudos

Hi,


I would like to know if there is any FM in SAP which gives me the last period of an retroactive accounting run.

For example, Let's say in Period 12.2018, there is a retro active accounting run happened back to 09.2018.

So the HRPY_RGDIR cluster directory has the below details for the retroaccounting run.

For-Period | In-Period

09.2018 | 12.2018

10.2018 | 12.2018 <-- Record I'm processing

11.2018 | 12.2018

12.2018 | 12.2018 <-- Record that I need If I pass the record that I'm processing

Let's say, I'm processing a RGDIR record for which the For-Period is 10.2018 and In-Period is 12.2018.

I need a FM which provides me the last record of the retroactive run in which my processing record (10.2018/12.2018) is involved with? I need the Function module to return the record that has the For-Period and In-Period as 12.2018.

I can query the HRPY_RGDIR with For-Period and In-Period is 12.2018 and get the result.

However, if the retroactive accounting period is involved in an off-cycle run I cannot use the query where For-Period and In-Period as 00.0000, as there will be multiple Offcycles runs for the employee and it may not yield the correct output.

Say in the period after 12.2018, there is an Off-cycle run happened and if Retroed to 09.2018 again, and if I'm processing the 10.2018 record in the offcycle retro run, I need the FM to return the last record in the off-cycle run.

For-Period | In-Period

09.2018 | 00.0000

10.2018 | 00.0000 <-- Record I'm processing

11.2018 | 00.0000

12.2018 | 00.0000

00.0000 | 00.0000 <-- Record that I need If I pass the record that I'm processing

Please help me with this scenario.

Regards,

Narayana Reddy

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

for finance you can do it with the function modules

'FI_PERIOD_DETERMINE'

'FI_PERIOD_CHECK',

however to determine if the records are retroactive or do not think you should verify that the records in in_rgdir are the current SRTZA = 'A' and that they are not voided VOID = ''