I see the statement that is failing in FM HR_MAINTAIN_MASTERDATA at line 285 in debug i see the sy-subrc EQ 0 and SY_MSGV1 is not same as username so it is satisfying the condiiton and
displaying error.
The Enqueue FM below is returning 0 and SY-MSGV1 is HRMD_B.
CALL FUNCTION 'ENQUEUE_EPPRELE'
EXPORTING
pernr = pspar-pernr
mode_prel
='X'
EXCEPTIONS
foreign_lock = 2
SYSTEM_FAILURE = 3.
IF SY-SUBRC NE 2 OR SY-MSGV1 NE SY-UNAME.
IF TCLAS EQ 'B'.
CALL FUNCTION 'DEQUEUE_EMPAPL'
EXPORTING
PERNR = PSPAR-PERNR
MODE_PAPL = 'X'.
ELSE.
CALL FUNCTION 'DEQUEUE_EPPRELE'
EXPORTING
PERNR = PSPAR-PERNR
MODE_PREL = 'X'.
ENDIF.
CALL FUNCTION 'BALW_BAPIRETURN_GET'
EXPORTING
TYPE = 'E'
CL = 'PG'
NUMBER = 184
IMPORTING
BAPIRETURN = RETURN
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'BALW_BAPIRETURN_GET1'
EXPORTING
TYPE = 'E'
CL = 'PG'
NUMBER = 184
IMPORTING
BAPIRETURN = RETURN1
EXCEPTIONS
OTHERS = 0.
Thanks,
Latha.