02-29-2012 10:49 AM
Hi All,
I am using FM 'HR_ECM_INSERT_INFOTYPE' for updating data from an excel file in infotype 0377 but i am getting this error 'Entry VSEL does not exist in T5UBA (check entry)'. This is coming due to the foreign key validation on the fields BPLAN & LEVL1. So the records are not getting updated in the infotype. But when i am trying to create a record with same data manually through PA30 its getting created. Can you please tell me which FM is being used for infotype updation in PA30. If i use the same FM, may be my issue gets resolved.Thanks.
Regards,
Arpita.
02-29-2012 2:22 PM
Hi,
The FM usually used to maintained PA infotypes is HR_INFOTYPE_OPERATION.
Cheers,
Manu.
03-01-2012 9:36 AM
Hi Manu,
I tried using the function module 'HR_INFOTYPE_OPERATION' but now i am getting dump. please find the dump description below:
Category ABAP Programming Error
Runtime Errors UNCAUGHT_EXCEPTION
Except. CX_HRPA_INVALID_PARAMETER
ABAP Program SAPFP50P
Application Component PA-PA
Please help me to resolve this issue.
Thanks,
Arpita.
03-01-2012 10:00 AM
Hi,
Hard to say without a bit of code
Can you paste the call to the FM over here (with how you populate the structure passed to parameter RECORD)?
A couple of question first:
Have you call FMs for enqueuing and dequeuing the employee before and after the update?
Is the infotype 171 (General Benefit Info.) correctly maintained for that employee?
Kr,
Manu.
03-01-2012 10:20 AM
03-05-2012 4:03 AM
Please find the code below:
CREATE OBJECT v_message_handler.
CLEAR: v_is_ok.
CALL FUNCTION 'HR_ECM_INITIALIZE_BUFFER'
EXPORTING
message_handler = v_message_handler.
CALL FUNCTION 'HR_ECM_ENQUEUE_PERNR'
EXPORTING
pernr = wa_p0377-pernr
message_handler = v_message_handler
IMPORTING
is_ok = v_is_ok.
CLEAR v_error_mssg.
IF v_is_ok IS INITIAL.
PERFORM get_error_msg USING v_message_handler
wa_p0377-pernr
CHANGING v_error_mssg.
v_tot_err = v_tot_err + 1.
ELSE.
* CALL FUNCTION 'HR_ECM_INSERT_INFOTYPE'
* EXPORTING
* pnnnn = wa_p0377
* message_handler = v_message_handler
* IMPORTING
* is_ok = v_is_ok.
*
* IF v_is_ok IS INITIAL.
* PERFORM get_error_msg USING v_message_handler
* wa_p0377-pernr
* CHANGING v_error_mssg.
* v_tot_err = v_tot_err + 1.
* ELSE.
* v_tot_suc = v_tot_suc + 1.
* CLEAR wa_error.
* wa_error-cnt = '1'.
* wa_error-pernr = wa_p0377-pernr.
* wa_error-desc = 'Data Successfully Uploaded'.
* APPEND wa_error TO i_error.
* ENDIF.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0377'
number = wa_p0377-pernr
* SUBTYPE =
* OBJECTID =
* LOCKINDICATOR =
validityend = wa_p0377-endda
validitybegin = wa_p0377-begda
* RECORDNUMBER =
record = wa_p0377
operation = 'INS'
* TCLAS = 'A'
* DIALOG_MODE = '0'
* NOCOMMIT =
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
return = v_return
key = wa_perdatakey
EXCEPTIONS
OTHERS = 0.
IF sy-subrc = 0.
"Success
ENDIF.
IF v_error_mssg IS INITIAL.
CALL FUNCTION 'HR_ECM_FLUSH_INFOTYPE'
EXPORTING
nocommit = ' '
message_handler = v_message_handler.
ENDIF.
CLEAR v_is_ok.
CALL FUNCTION 'HR_ECM_DEQUEUE_PERNR'
EXPORTING
pernr = wa_p0377-pernr
message_handler = v_message_handler
IMPORTING
is_ok = v_is_ok.
ENDIF.
CLEAR wa_p0377.
ENDLOOP.
FREE i_it0377. "Clearing the internal table
ENDFORM. " SELECT_UPLOAD_DATA
Actually in this program i am fetching values from an excel file & updating them into IT0377.Yes the IT171 is maintained for those employees. CAn you please guide me as how to resolve this issue? If need more info, pls let me know.Thanks.