04-21-2009 2:34 PM
Hi,
I'm trying to change an infotype via RFC.
I'm using this RFC in a Java WebDynpro.
The webdynpro is getting the information of the existing infotypes.
When I change the hours in the infotype and click the save button, I get a runtime error.
When I click the save button again, everything works fine...
this is a piece of code out of the RFC.
DATA: ls_2001_old TYPE p2001,
ls_2001_new TYPE p2001,
return1 TYPE bapireturn1,
key type BAPIPAKEY.
/* fill ls_2001_old ls_2001_new */
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = ls_2001_old-pernr.
/* this function results in a short dump, all parameters are correct! */
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2001'
number = pernr
subtype = ls_2001_old-subty
objectid = ls_2001_old-objps
lockindicator = ls_2001_old-sprps
validityend = ls_2001_old-endda
validitybegin = ls_2001_old-begda
recordnumber = ls_2001_old-seqnr
record = ls_2001_new
operation = 'MOD'
* TCLAS = 'A'
dialog_mode = '0'
nocommit = ' '
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
return = return1
KEY = key
.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = ls_2001_old-pernr.
The problem is in the method set_framework of the class CL_HRPA_MASTERDATA_FACTORY class.
a_is_initialized = true. I checked note 493984 and it is implemented in our system.
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.
ELSE.
CALL METHOD delayed_constructor
EXPORTING
read_infotype = read_infotype
masterdata_buffer = masterdata_buffer
additional_buffer = additional_buffer
legacy_mode = legacy_mode.
ENDIF.
ENDMETHOD.
Any suggestions?
Any idea's of what is going wrong here? Tips?
thanks,
Joachim
04-21-2009 4:19 PM
Did you try with the following right before the call to HR_INFOTYPE_OPERATION?
* Initialize the new IT framework
perform do_nothing(sapfp50p).
~Suresh
04-21-2009 4:19 PM
Did you try with the following right before the call to HR_INFOTYPE_OPERATION?
* Initialize the new IT framework
perform do_nothing(sapfp50p).
~Suresh
04-23-2009 12:27 PM
Hi Suresh,
Thanks for the quick reply.
I allready tried to add this line.
Unfortunately this results in the same error message.
kr,
Joachim
04-23-2009 12:32 PM
As per Suresh' s Suggestion you need to add this code.
perform do_nothing(sapfp50p).
This should be called at initialization or in Constructor.
Idenitify the correct place and call this.
In WebDynpro ABAP i too faced the similar problem and solved with the help of perform do_nothing.
04-23-2009 2:20 PM
Hello,
I added this to the constructor of the class where I read and write this infotype.
Writing works now, but reading dumps on this functionmodule:
CALL FUNCTION 'HR_ECM_READ_TEXT_INFOTYPE'
EXPORTING
pernr = wa_pa2001-pernr
infty = '2001'
subty = wa_pa2001-subty
begda = wa_pa2001-begda
endda = wa_pa2001-endda
message_handler = r_msghandler
IMPORTING
text_tab = lt_text
is_ok = lv_ok.
IF sy-subrc = 0.
READ TABLE lt_text INTO wa_attest-motivatie INDEX 1.
ENDIF.
Can someone explain me this strange behavior?
kr,
Joachim
04-23-2009 2:25 PM
instead of normal constructor , keep it in Class_Constructor. I think you kept in Normal Constructor. it should be in Static constructor i.e CLASS_CONSTRUCTOR.
This will definitely works.
04-23-2009 2:36 PM
I added it in the class_constructor and removed it in the normal constructor, but still the same error for reading the infotype.
This is the first time I have this issue. Normally I don't have any problems with reading and writing infotypes...
kr,
Joachim
04-24-2009 1:05 PM
Hello,
I think the problem is that I use HR_ECM_READ_TEXT_INFOTYPE and HR_INFOTYPE_OPERATION in one session.
I changed the HR_ECM_READ_TEXT_INFOTYPE by a select statement and then everything seems to work. Even without the perform do_nothing...
Is there someone who can explain this?
Thanks for your help,
Joachim
04-24-2009 1:25 PM
I read some notes and in some notes it is explained that if some hr master switches not maintained then you will find these kind of issues. there is one parameter a_is_initialized in method SET_FRAMEWORK of class CL_HRPA_MASTERDATA_FACTORY is initialized, if it is set then next time you will get a short dump.
I fixed it by calling the do_nothing in my static constructor.
04-07-2014 4:04 PM
Hello Vijay,
How did you fixed the calling to the do_nothing in your static constructor if you are not supposed to use perform in Class objects?.
Could write it please have the same problem.
Thanks.
Miguel
06-06-2016 12:20 PM
Just call both Programms in sequence
11-24-2014 6:44 PM
I too am having the same issue.
I have added the call PERFORM do_nothing in PROGRAM sapfp50p. inside my class before the call to the function module that is short dumping but it now will shot dump at the above statement.
***** Update.
I added the call PERFORM do_nothing in PROGRAM sapfp50p. to the CLASS_CONSTRUCTOR of my class and it resolved the issue.
08-26-2022 7:16 AM
Having same issue, could you kindly help me to resolve this?
i don't get your updated comment above.
could you explain little bit more on what you have done?
Many thanks in advance 🙂