Skip to Content
0
Former Member
Jul 29, 2008 at 06:51 AM

Runtime error in activation BADI (CX_HRPA_INVALID_PARAMETER)

105 Views

In activation BADI i get a runtime error using 'HR_INFOTYPE_OPERATION'

*************************

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_HRPA_INVALID_PARAMETER', was not

caught in

procedure "RESOLVE_EXCEPTION" "(FORM)", nor was it propagated by a RAISING

clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

Ongeldige parameter EXCEPTION waarde

The occurrence of the exception is closely related to the occurrence of

a previous exception "CX_HRPA_VIOLATED_PRECONDITION", which was raised in the

program "CL_HRPA_MASTERDATA_FACTORY====CP",

specifically in line 6 of the (include) program

"CL_HRPA_MASTERDATA_FACTORY====CM004".

The cause of the exception was:

Niet aan voorwaarde voldaan

************************

DATA: personaldatakey TYPE bapipakey.

DATA: return TYPE bapireturn1.

DATA: l_p0025 TYPE p0025.

DATA: l_citem TYPE t71adm09-citem.

DATA: l_resultaat(2) TYPE n.

l_p0025-pernr = p0759-pernr.

  • Begindatum is begindatum binnengekomen IT0759 record - 1 jaar

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

date = p0759-begda

days = 0

months = 0

signum = '-'

years = 1

IMPORTING

calc_date = l_p0025-begda.

  • Einddatum is 31 december van het jaar binnegkomen IT0759

CONCATENATE: p0759-endda(04) '1231' INTO l_p0025-endda.

l_p0025-infty = '0025'.

IF p0759-cpamt >= 100.

*GENERATE ERROR

ELSE.

l_resultaat = p0759-cpamt.

  • IF l_resultaat < 10.

  • CONCATENATE '0' l_resultaat INTO l_p0025-krt01.

  • ELSE.

  • l_p0025-krt01 = l_resultaat.

  • ENDIF.

  • write data

CLEAR: return, personaldatakey.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0025'

number = l_p0025-pernr

validityend = l_p0025-endda

validitybegin = l_p0025-begda

record = l_p0025

operation = 'INS'

nocommit = ''

tclas = 'A'

IMPORTING

return = return

key = personaldatakey

EXCEPTIONS

OTHERS = 0.

IF NOT return-number IS INITIAL.

  • GENERATE ERROR

ELSE.

is_ok = 'X'.

process_standard = 'X'.

ENDIF.