Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MESSAGE_TYPE_X: NESTED_PERFORM_ON_COMMIT :HR_INFOTYPE_OPERATION

Former Member
0 Likes
1,520

Hi Experts,

I used HR_INFOTYPE_OPERATION in my custom program to delete the USERID assignment for the Employees. But I have got a dump when I run the report in background MESSAGE_TYPE_X NESTED_PERFORM_ON_COMMIT .

Short text of error message: |

Nested call of PERFORM ON COMMIT: NESTED_PERFORM_ON_COMMIT caller: SAPLB

| UBA_4 program: SAPLBUBA_4 form: GENERAL_BADI_CALL

I have applied for some SAP notes 1560109,1508004 etc. But nothing works.

If anybody knows about this dump, please share your ideas .

Thanks,

3 REPLIES 3
Read only

Former Member
0 Likes
891

Hi

Please pass the operation as Del using the actio data element. before the process enter into the F.M Pls try to do enqueue & after the operation gets over, pls Dequeue it.

IF pv_operation NE c_dis.

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE' " Locks the Employee Record

EXPORTING

number = x_key-pernr

IMPORTING

return = x_return

.

IF px_return-type CA c_aex.

RETURN.

ENDIF.

ENDIF.

CLEAR: px_return.

CALL FUNCTION 'HR_INFOTYPE_OPERATION' " Updation of Employee Record

EXPORTING

infty = px_key-infty

number = px_key-pernr

subtype = px_key-subty

objectid = px_key-objps

lockindicator = px_key-sprps

validityend = px_key-endda

validitybegin = px_key-begda

recordnumber = px_key-seqnr

record = px_infty

operation = pv_operation

tclas = 'A'

dialog_mode = '0'

nocommit = space

  • VIEW_IDENTIFIER =

  • SECONDARY_RECORD =

IMPORTING

return = px_return

key = px_bapikey.

IF pv_operation NE c_dis.

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE' " Unlock the Employee Record

EXPORTING

number = px_key-pernr

  • IMPORTING

  • RETURN = .

.

ENDIF.

Read only

0 Likes
891

Thanks Aahbha for the quick reply. But I am using ENQUEUE and DEQUEUE FMs in my program. And the problem is with "COMMIT" statement and not regarding "LOCK".

Read only

0 Likes
891

There seems to be a problem with the nested commits on the FM. I would suggest two approaches or maybe even one with both options. First you might try calling FM with parameter NOCOMMIT = 'X' and do the commit yourself after the call of the FM. Also, i would suggest using FM HR_PSBUFFER_INITIALIZE in the main loop, for mass changes of employees i have encountered several problems with this FM, also performance problems and for every employee besides de lock/unlock, also cleaning buffers is advised. Other than that, i don't really know, i have used that FM many times but haven't had this problem before.