Application Development 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: 

HR_INFOTYPE_OPERATION IT 0009

Former Member
0 Kudos
501

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.

1 ACCEPTED SOLUTION

StMou
Active Participant
0 Kudos
274

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

9 REPLIES 9

Former Member
0 Kudos
274

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.

0 Kudos
274

I try to simulate the creation of IT0009 and check if there are errors before using the same FM with code INS

StMou
Active Participant
0 Kudos
275

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

Former Member
0 Kudos
274

I insered the "Rollback work" instruction without success

StMou
Active Participant
0 Kudos
274

First have you Return from FM ?

Former Member
0 Kudos
274

Hi

Please check this OSS Note 600715. Hope it helps..

StMou
Active Participant
0 Kudos
274

Direct shortcut [Note 600715 - Maintaining infotypes with HR_INFOTYPE_OPERATION|https://service.sap.com/sap/support/notes/600715] more simple

Former Member
0 Kudos
274

This note is for 4.7 version and dated on 2003. I don't think we need it with ECC6

Former Member
0 Kudos
274

solved