07-29-2008 7:51 AM
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.
07-29-2008 7:54 AM
Pls check your import export parameter are they are pass correctly?
Amit.
07-29-2008 8:02 AM
As far as i can see yes they are filled correctly, i have used HR_INFOTYPE_OPERATION more often without this problem!
07-29-2008 8: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
07-29-2008 8: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
07-29-2008 8:31 AM
I have authorization to add a IT0025 record
Can't find the values in the DELAYED_CONSTRUCTOR
07-29-2008 8:46 AM
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
07-29-2008 12:02 PM
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
07-30-2008 8:30 AM
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
07-30-2008 9:13 AM
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.
07-30-2008 9:18 AM
07-31-2008 8:58 AM
DOes anybody know which switchesi have to change in T77S0 to get ride of the error message and dump
08-12-2008 2:10 PM
Is there somewhere a other way to insert a infotype record??
Without changing switches??
08-14-2008 1:54 PM
Using call transaction now works as gequired.
Thanks for all the tips!
10-13-2008 2:33 PM
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