Skip to Content
author's profile photo Former Member
Former Member

Runtime error in activation BADI (CX_HRPA_INVALID_PARAMETER)

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Posted on Jul 29, 2008 at 06:54 AM

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

    Amit.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 29, 2008 at 07:02 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 29, 2008 at 07:15 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 29, 2008 at 07:18 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 01:10 PM

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

    Without changing switches??

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 14, 2008 at 12:54 PM

    Using call transaction now works as gequired.

    Thanks for all the tips!

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.