Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error: Leaving_date_not_found when running termination payroll

Former Member
0 Likes
2,020

Hi friends,

I have a dump (program error) when i run the termination in "test mode". The transaction is PC00_M17_TRM0 (program HLACTRM0).

This is the error:

A RAISE statement in the program "SAPLRPAI" raised the exception condition "LEAVING_DATE_NOT_FOUND".

Since the exception was not intercepted by a superior program, processing was terminated.

In my scenario, the person doesn't have the personel action "leaving". This is because we need to do a test in order to review some info, not to perform a real leaving.

I used this transaction in other installations and i never got this error.

In the transaction the "Term. Date (last active day)" it's indicated. This guess this field it's used as a leaving date.

Any idea?

I looked for sap notes, but i didn't found a related one. Although i founded two notes 1272361 and 1477985 that could help me with a problem in the additional payments tab's, because it doesn't appears the Severance pay codes.

Thanks in advance.

Albio.-

Edited by: Albio Manuel Vivas on Feb 17, 2011 2:11 PM

Hi friends,

I have a dump (program error) when i run the termination in "test mode". The transaction is PC00_M17_TRM0 (program HLACTRM0).

This is the error:

A RAISE statement in the program "SAPLRPAI" raised the exception condition "LEAVING_DATE_NOT_FOUND".

Since the exception was not intercepted by a superior program, processing was terminated.

In my scenario, the person doesn't have the personel action "leaving". This is because we need to do a test in order to review some info, not to perform a real leaving.

I used this transaction in other installations and i never got this error.

In the transaction the "Term. Date (last active day)" it's indicated. This guess this field it's used as a leaving date.

Any idea?

I looked for sap notes, but i didn't found a related one. Although i founded two notes 1272361 and 1477985 that could help me with a problem in the additional payments tab's, because it doesn't appears the Severance pay codes.

Thanks in advance.

Albio.-

Edited by: Albio Manuel Vivas on Feb 17, 2011 2:11 PM

12 REPLIES 12
Read only

Former Member
0 Likes
1,786

Hi Albio

As you have mentioned it is working in other installations, there are chances that some BADI might be implemented in this instance. When i saw the code, there is a BADI which also raises this exception. Please check whether the BADI HRPAD00_ENTRY_LEAVE and method get_leaving_date is implemented in your system. And if any custom logic added there is raising this exception.

Regards

Ranganath

Read only

0 Likes
1,786

Hi Ramesh,

That BADI isn't implemented in our system, so i guess the dates are determinated by standars functions: hr_entry_date and hr_leaving_date.

Thanks

Albio.-

Read only

0 Likes
1,786

Hi Albio

In that case, i can think of only debugging the FM HR_LEAVE_DATE_CALC and see reason behind the exception raised at line 264. Also, please check if the same issue is happening for other personnel number, just to be sure that the master data is consistent for this employee.

There is exit at the end of this FM call, but that does not seem to be raising this exception though.

Regards

Ranganath

Read only

0 Likes
1,786

Ramesh,

This problem occurs only if the person does not have the action leaving in infotipe 0000.

If the person have this action, the transaction for termination (program HLACTRM0) runs well.

But in our scenario, we need to do a test run, without the leaving action.

I run this scenario in others clients, and the system takes the date that appers in the field PLATRM_S_OPTIONS-TDATE. But in this client, it seems that the program doesn't take care of this date.

I'll try to debug.

Thanks friend.

Albio.-

Read only

0 Likes
1,786

In the debug, i think it's never take on mind the date that appers in the transaction (program HLACTRM0, field TDATE), just the dates on IT0000 with action leaving or reentry are taken.

that's why the table "dates" in the function it's empty, an then the error occurs.

i tried to found a oss note related to this, but i didn't found it.

Any suggestion?

Thanks.

Albio.-

Read only

Former Member
0 Likes
1,786

An exception LEAVING_DATE_NOT_FOUND is thrown from FM HR_LEAVING_DATE for non withdrawn employees. So, make sure that calling program does assigns a return value to the exception and if not, causes a run time error.

In our system, the main program(HLACTRM0) listed all the exceptions. please try to compare the code between two different clients and let me know.

CALL FUNCTION 'HR_LEAVING_DATE'

EXPORTING

PERSNR = p_pernr

BEGDA = p_begda

ENDDA = p_endda

IMPORTING

LEAVINGDATE = p_trm_date

TABLES

LEAVING_DATES = l_tab_dates

EXCEPTIONS

LEAVING_DATE_NOT_FOUND = 0

PERNR_NOT_ASSIGNED = 0

OTHERS = 0.

Thanks,

Prasanna.

Read only

0 Likes
1,786

Hi Prassana.

Yes... the exeptions are complete...

maybe i'm going to post a message for sap support...

thanks

Albio.-

Read only

Former Member
0 Likes
1,786

Can you share info of short dump.

Read only

0 Likes
1,786

Texto breve

Exception condition "LEAVING_DATE_NOT_FOUND" raised.

¿Qué ha sucedido?

The current ABAP/4 program encountered an unexpected

situation.

¿Qué puede hacer?

Note down which actions and inputs caused the error.

To process the problem further, contact you SAP system

administrator.

Using Transaction ST22 for ABAP Dump Analysis, you can look

at and manage termination messages, and you can also

keep them for a long time.

Anál.errores

A RAISE statement in the program "SAPLRPAI" raised the exception

condition "LEAVING_DATE_NOT_FOUND".

Since the exception was not intercepted by a superior

program, processing was terminated.

Short description of exception condition:

For detailed documentation of the exception condition, use

Transaction SE37 (Function Library). You can take the called

function module from the display of active calls.

Read only

0 Likes
1,786

Hi friends,

I found what is happening.

In the view V_T799L00 (Dismissal protection) it's a z function (Z_HR99L00_DISMPROT_DATA_EXT) that calls HR_LEAVING_DATE.

When we run the termination in test mode, that function it's called and the error occurs, i tried using the standar funtion HR99L00_DISMPROT_DATA_EXT, the program runs ok.

We are going to review the z function in order to fix it.

thanks

Albio

Read only

Former Member
0 Likes
1,786

Thanks Albio. If exceptions are caught correctly in caller program, it won't give run time error. lets wait for SAP's reply.

Read only

Former Member
0 Likes
1,786

solved. A Z function called by dismissal protection caused the problem.