on 2020 Sep 30 4:51 PM
Hello experts,
When i try to update a record using the function module HR_INFOTYPE_OPERATION in specific infotype i'm getting the folowing error :
My code is as the follows :
SELECT SINGLE * FROM PA9310 INTO CORRESPONDING FIELDS OF LS_P9310 WHERE PERNR EQ P_PERNR.
IF SY-SUBRC EQ 0.
LS_P9310-MISE_DEUM = 'X'.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = LS_P9310-PERNR
IMPORTING
RETURN = l_return
* LOCKING_USER =
.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '9310'
NUMBER = LS_P9310-PERNR
* SUBTYPE =
* OBJECTID =
* LOCKINDICATOR =
VALIDITYEND = LS_P9310-ENDDA
VALIDITYBEGIN = LS_P9310-BEGDA
RECORDNUMBER = LS_P9310-SEQNR
RECORD = LS_P9310
OPERATION = 'MOD'
* TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT = ''
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
RETURN = l_return
* KEY =
.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = LS_P9310-PERNR
IMPORTING
RETURN = l_return
* LOCKING_USER =
.
ENDIF.
Request clarification before answering.
Hi,
At first glance your code seems ok!
Couple of suggestions.
When using this FM to update info types i would always specify the full key so I would assign values to SUBTYPE, OBJECTID and LOCKINDICATOR. Removes any possibility of updating the wrong record.
For test purposes change your code and set DIALOG_MODE = '2'
This will run thru the transaction in the foreground and you will see exactly what issue is arising.
bg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are you able to debug?
Set a breakoint at the call to HR_INFOTYPE_OPERATION and double the check the contents of all the varaibles you are passing in.
I would be suspicious your issue is with LS_P9310. Is this type P9310 and is LS_P9310-INFTY populated, if not that would be a problem.
Set LS_P9310-INFTY = '9310' and see if you get any farther
bg
User | Count |
---|---|
100 | |
16 | |
6 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.