on 02-14-2011 2:15 PM
Hi All,
I'm trying to create a new infotype record using FM HR_INFOTYPE_OPERATION in a WD4A application but get the Precondition Violated shortdump.
I've debugged it and see that it's caused because a constructor apparanty tries to reset the context.
I found that for non WD4A applications this can be solved by either switching the LDB used or adding a subroutine call at the LOAD-OF_PROGRAM event.
Is there something simular for WD4A or maybe an alternative to using the FM?
Thanks in advance.
Hi,<br /> Even i faced the same problem while tryinh to update infotype 761 from my web dynpro abap component.Although it was showing todays date on the last changed column and also my sap id on the changed by column;then also the value which i was updating was not getting reflected in the database.<br /> <br /> Then i used the following solution which worked for me.After updating/inserting data in the infotype use the function module "HR_ECM_FLUSH_INFOTYPE".Then the data will reflect in the database.Below is the code snippet.<br /> <p /> <br />
DATA : wa_pskey TYPE pskey,<br />
message_handler TYPE REF TO if_hrpa_message_handler,<br />
is_ok TYPE boole_d.<br />
<br />
CALL FUNCTION 'HR_ECM_MODIFY_INFOTYPE' "to modify the infotype<br />
EXPORTING<br />
pnnnn = ls_wa_p0761<br />
TEXT_TAB =<br />
MODIFY_TEXT = ' '<br />
old_pskey = wa_pskey<br />
NO_AUTH_CHECK = ' '<br />
message_handler = message_handler<br />
IMPORTING<br />
SEQNR =<br />
is_ok = is_ok<br />
.<br />
<br />
CALL FUNCTION 'HR_ECM_FLUSH_INFOTYPE'<br />
EXPORTING<br />
nocommit = ''<br />
message_handler = message_handler<br />
IMPORTING<br />
is_ok = is_ok.<br />
<p />
<br />
Hope it works for everyone.<br />
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for this example.
Since a collegue of my went a different direction to solve this problem by using the decoupled infotype framework I will not be able to test this immediately.
I have assigned you some points for the answer. I'll have to try the ECM functions to see if they go around the problem from HR_INFOTYPE_OPERATION before I can get back to you to confirm if this solved my problem.
Regards,
Arthur
Just call both Programms in sequence
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a Z-version of HR_INFOTYPE_OPERATION with RFC marked and call the RFC with Destination 'NONE'
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check whether is it failing in authorization while executing the FM.
This FM will do authorization check before executing the action.
Regards,
Meera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is not in the authorization. The problem lies in the fact that the FM calls een form to initial a field. This form is only supposed to be called once but for some reason is called more than once.
The second time the form is called it creates the error because the variable is already set.
Regards,
Arthur
Hi,
Unfortunately we didn't solve the issue with the FM. A collegue of my changed the program to use the decoupled infotype framework though and so far that seems to be working. We still did have some issue but that was mainly because not all infotypes are fully integrated in the decoupled infotype framework.
Arthur
Hi,
I am talking to you as a moderator.
one question: Isn't this more an ABAP problem to be filed in the ABAP queue?
Where is the constructor being executed you are speking of?
Regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi The reason I placed my question here was that I'm trying to use the HR_INFOTYPE_OPERATION FM in a WebDynpro for ABAP application and thought this was the best forumn to place it.
The Constructor I'm talking about is part of the nestled function module HR_MAINTAIN_MASTERDATA. It calls a form called INITIALIZE_PS(SAPFP50P). In there somewhere a field named context is initialized.
If I debug my WebDynpro application I find that the Initialisation form is called multiple times and I have no idea why this is.
However this all isn't the essence of my question. I just want to know if anybody knows if there's an alternative to using the FM that does work in WD4A since the HR_INFOTYPE_OPERATION function module does not.
Regards,
Arthur
Hi Sanasrinivas,
I don't remeber what the return code was. The only thing I do remeber is that as i said in a previous reply is that the error occurs because for some reason the form INITIALIZE_PS(SAPFP50P) is called multiple times when it's only allowed to be called once.
This form said a value for a variable and once that is set, it doens't allow it to be changed resulting in the shortdump because apparently SAP standard programming isn't handling the exception.
Regards,
Arthur
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.