2010 Feb 26 2:13 PM
Hi all,
I try to use the FM HR_INFOTYPE_OPERATION with action CHK for IT0009 like this :
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0009'
number = pernr
subtype = subty
validityend = l_0009-endda
validitybegin = l_0009-begda
record = l_0009
operation = 'CHK'
tclas = 'A'
nocommit = 'X'
IMPORTING
return = return.
The issue is that the system create the record! for other Infotypes, it's working fine(IT0002....)
Is it particular for IT0009? how to prevent the record update?
thanks
K.
2010 Feb 26 2:52 PM
Hi,
If you have return, system doesn't make ROOLBACK WORK. see this
...
IF RETURN IS INITIAL.
READ TABLE MODIFIED_KEYS INDEX 1.
MOVE MODIFIED_KEYS(8) TO KEY(8).
MOVE MODIFIED_KEYS+12 TO KEY+8.
ELSE.
IF NOT NOCOMMIT IS INITIAL.
ROLLBACK WORK.
ENDIF.
ENDIF.
Solution
Make an ROOLBACK After call your function module
call function 'HR_INFOTYPE_OPERATION'
....
ROLLBACK WORK.
Rgds
2010 Feb 26 2:26 PM
Hi,
what do you pretend to do ?? I cannot find action CHK in domain ACTIO.
If you´re trying to check the existance of information in IT 0009, either read PA0009 or use function HR_READ_INFOTYPE.
2010 Feb 26 2:37 PM
I try to simulate the creation of IT0009 and check if there are errors before using the same FM with code INS
2010 Feb 26 2:52 PM
Hi,
If you have return, system doesn't make ROOLBACK WORK. see this
...
IF RETURN IS INITIAL.
READ TABLE MODIFIED_KEYS INDEX 1.
MOVE MODIFIED_KEYS(8) TO KEY(8).
MOVE MODIFIED_KEYS+12 TO KEY+8.
ELSE.
IF NOT NOCOMMIT IS INITIAL.
ROLLBACK WORK.
ENDIF.
ENDIF.
Solution
Make an ROOLBACK After call your function module
call function 'HR_INFOTYPE_OPERATION'
....
ROLLBACK WORK.
Rgds
2010 Feb 26 3:03 PM
2010 Feb 26 3:06 PM
2010 Feb 26 3:10 PM
2010 Feb 26 3:13 PM
Direct shortcut [Note 600715 - Maintaining infotypes with HR_INFOTYPE_OPERATION|https://service.sap.com/sap/support/notes/600715] more simple
2010 Feb 28 4:42 PM
This note is for 4.7 version and dated on 2003. I don't think we need it with ECC6
2011 Jan 03 4:23 PM