Application Development 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: 

Runtime error in activation BADI (CX_HRPA_INVALID_PARAMETER)

Former Member
0 Kudos

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.

14 REPLIES 14

former_member181995
Active Contributor
0 Kudos

Pls check your import export parameter are they are pass correctly?

Amit.

Former Member
0 Kudos

As far as i can see yes they are filled correctly, i have used HR_INFOTYPE_OPERATION more often without this problem!

uwe_schieferstein
Active Contributor
0 Kudos

Hello Richard

I would try to track the problem by inactivating all optional parameters and just call the fm with the mandatory IMPORTING parameters:

INFTY
NUMBER
RECORD
OPERATION

If it is ok then add step by step another parameters. This would you should be able identify the error cause.

Regards

Uwe

Former Member
0 Kudos

Hi ,

i dont y its raising expection while creating the record , but can u check few things

1.Put a Break Point in the class CL_HRPA_MASTERDATA_FACTORY--->method DELAYED_CONSTRUCTOR see which condition is missinng ?

2.after getting this error , can u check if you sufficient Authorizations to create/read records of IT 25 ?

regards

prabhu

0 Kudos

I have authorization to add a IT0025 record

Can't find the values in the DELAYED_CONSTRUCTOR

0 Kudos

In my other usses of i declare record as

DATA: l_p0025 LIKE p0025.

In the class builder i can not use the like decalration, in stead of this i use

DATA: l_p0025 TYPE p0025.

Can this case a problem?

B.t.w. I tried to inactivate all parameter except record, number, infty, but no possitive result

0 Kudos

Hello Richard

The exception is raised in method SET_FRAMEWORK of class CL_HRPA_MASTERDATA_FACTORY. Perhaps the SAP note mentioned in the coding (on ECC 6.0) may be useful:


METHOD set_framework.

  IF a_is_initialized = true.
*   This indicates some complex problem which often can be easily
*   fixed. For details see NOTE 493984 (2003).
    RAISE EXCEPTION TYPE cx_hrpa_violated_precondition.  " line 6

  ELSE.
    CALL METHOD delayed_constructor
      EXPORTING
        read_infotype     = read_infotype
        masterdata_buffer = masterdata_buffer
        additional_buffer = additional_buffer
        legacy_mode       = legacy_mode.
  ENDIF.
ENDMETHOD.

Regards

Uwe

0 Kudos

I have read the note but still no idea what to do

LOAD-OF-PROGRAM.

PERFORM do_nothing(sapfp50p).

THis additionion can not be used in a Class and therefore not a sollution

Edited by: Richard van Veen on Jul 30, 2008 9:50 AM

0 Kudos

Rechard,

pls dont make a sad face.as we are programmer we suppose to face this kind of problem every day we need to find the solution.

and here is the actual OSS note which you are looking for dont worry its an SAP generated problem:

Note:716914

))

Amit.

0 Kudos

Which flags in T77S0 should i change to make this work

0 Kudos

DOes anybody know which switchesi have to change in T77S0 to get ride of the error message and dump

Former Member
0 Kudos

Is there somewhere a other way to insert a infotype record??

Without changing switches??

Former Member
0 Kudos

Using call transaction now works as gequired.

Thanks for all the tips!

0 Kudos

Hi Richard,

I have created one RFC to Update some details in infotype 0006,0002.

I executed my RFC in se37 its executing fine, but same RFC i used in web dynpro ABAP , i got same error

How you solved your error, Its very Urgent. please give some solution to solve this problem

Thanks,

Hemachandran.

Edited by: hemachandran R on Oct 13, 2008 3:33 PM