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

HR_READ_INFOTYPE problem

Former Member
0 Likes
947

Hi! I try to do some by pushing a button..

REFRESH: T0298. CLEAR: T0298.
            CALL FUNCTION 'HR_READ_INFOTYPE'
              EXPORTING
                PERNR           = p0298-pernr
                INFTY           = '0298'
                BEGDA           = p0298-begda
                ENDDA           = p0298-endda
              TABLES
                INFTY_TAB       = T0298
              EXCEPTIONS
                INFTY_NOT_FOUND = 1
                OTHERS          = 2.
            IF sy-subrc eq 0.
              LOOP AT T0298.
                IF T0298-IDENTD ne ''.
                  p0298-IDENTD = T0298-IDENTD.
                  p0298-ZZIDGROUP = T0298-ZZIDGROUP.
                  m_objid = T0298-IDENTD.
                  EXIT.
                ELSE.
                  p0298-IDENTD = m_objid.
                  p0298-ZZIDGROUP = ln_number.
                  EXIT.
                ENDIF.
              ENDLOOP.
            ENDIF.

            p0298-status = 'smth'.

            CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
              EXPORTING
                NUMBER = p0298-pernr.
            CALL FUNCTION 'HR_INFOTYPE_OPERATION'
              EXPORTING
                INFTY         = '0298'
                NUMBER        = p0298-pernr
                LOCKINDICATOR = ''
                VALIDITYEND   = p0298-endda
                VALIDITYBEGIN = p0298-begda
                RECORD        = p0298
                OPERATION     = 'MOD' "or MOD or DEL
                NOCOMMIT      = ''
                tclas         = 'A'
              IMPORTING
                RETURN        = RETURN
              EXCEPTIONS
                OTHERS        = 0.
            IF return-type = 'E'.
              MESSAGE ID return-ID TYPE 'E' NUMBER RETURN-NUMBER.
            ENDIF.

first time i've pushed the button i see the value IDENTD in pa0298 is not empty. 'HR_INFOTYPE_OPERATION' work fine.

but second time i've pushed the button i suppose to get the value IDENTD in structure T0298.

'HR_READ_INFOTYPE' sy-subrc = 0. but IDENTD and

ZZIDGROUP is clear!!! though it's in the database it has values.

and when i push the button the third time - 'HR_READ_INFOTYPE' works fine.

thankful for any ideas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
742

hi alex,

Even i have faced a similar problem.This happens because the program checks the buffer so mark 'X' in the importing parameter 'BYPASS BUFFER while calling function module 'HR_READ_INFOTYPE' & also before calling the function module refresh your internal table.

Hope this is useful,

Best of luck,

Bhumika

thanks very much!

2 REPLIES 2
Read only

Former Member
0 Likes
743

hi alex,

Even i have faced a similar problem.This happens because the program checks the buffer so mark 'X' in the importing parameter 'BYPASS BUFFER while calling function module 'HR_READ_INFOTYPE' & also before calling the function module refresh your internal table.

Hope this is useful,

Best of luck,

Bhumika

Read only

0 Likes
742

thanks very much!