**********************added code for log report change at infotype level ,
DATA : st_log TYPE hreic_s_logkey,
gt_tab TYPE TABLE OF pldoc_key,
gs_tab TYPE pldoc_key,
gs_det TYPE pldoc_key,
gt_status TYPE TABLE OF hrinftylog_fields,
gs_status TYPE hrinftylog_fields,
gt_temp_before TYPE TABLE OF prelp WITH HEADER LINE,
gt_temp_after TYPE TABLE OF prelp WITH HEADER LINE.
CLEAR : st_log , gt_tab[], gs_status, gs_det,gt_status[],gs_tab,gt_temp_before[],gt_temp_after[].
st_log-enddate = sy-datum .
st_log-startdate = sy-datum.
st_log-pernr = pernr-pernr .
CALL FUNCTION 'HREIC_GET_LOGGED_INFTY_CHANGES'
EXPORTING
is_log_key = st_log
IMPORTING
et_infty_modif = gt_tab.
*CLEAR : GS_DET .
IF gt_tab[] IS NOT INITIAL .
READ TABLE gt_tab INTO gs_tab WITH KEY bdate = sy-datum
infty = '0008'.
IF sy-subrc EQ 0 .
gs_det-relid = gs_tab-relid .
gs_det-tclas = gs_tab-tclas .
gs_det-pernr = gs_tab-pernr .
gs_det-infty = gs_tab-infty .
gs_det-bdate = gs_tab-bdate .
gs_det-btime = gs_tab-btime .
gs_det-seqnr = gs_tab-seqnr .
CALL FUNCTION 'HR_INFOTYPE_LOG_GET_DETAIL'
EXPORTING
logged_infotype = gs_det
auth_check = 'X'
* USE_ARCHIVE = ' '
* IMPORTING
* SUBRC =
TABLES
infty_tab_before = gt_temp_before
infty_tab_after = gt_temp_after
fields = gt_status.
READ TABLE gt_status INTO gs_status WITH KEY fname = 'TRFGR' .
IF sy-subrc EQ 0.
flg = 'X' .
ENDIF .
ENDIF .
ENDIF .
**********************
No comments:
Post a Comment