ABAP - Get the time results for a payroll period. (provided by Francois Henrotte)
Example:
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE,
IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE.
W_BEGDA = '20010101'.
W_PERNR = '00000001'.
CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
EXPORTING
get_begda = w_begda
TABLES
get_periods = it_t549q
EXCEPTIONS
no_period_found = 1
no_valid_permo = 2.
CHECK sy-subrc = 0.
CALL FUNCTION 'HR_TIME_RESULTS_GET'
EXPORTING
get_pernr = w_pernr
get_pabrj = it_t549q-pabrj
get_pabrp = it_t549q-pabrp
TABLES
get_zl = it_zl
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5.
NOTE: it_zl-iftyp = 'A' absence
it_zl-iftyp = 'S' at work
No comments:
Post a Comment