Google Search - Blog...........

Employee Deduction Report In HR ABAP

REPORT zhr_deduction_report MESSAGE-ID zmsg.

*----------------------------------------------------------------*
* TABLES *
*----------------------------------------------------------------*
TABLES:pa0001,
t569v,
t549a,
t549q.
*-----------------------------------------------------------------*
* T Y P E P O O L S *
*-----------------------------------------------------------------*
TYPE-POOLS : slis.

************************************************************************
* DECLARATION OF INTERNAL TABLES *
************************************************************************
DATA : v_permo TYPE t549a-permo.


TYPES: BEGIN OF ty_pa0000,
pernr TYPE pa0001-pernr,
begda TYPE pa0001-begda,
endda TYPE pa0001-endda,
massn TYPE pa0000-massn,
massg TYPE pa0000-massg,
stat2 TYPE pa0000-stat2,
END OF ty_pa0000.

TYPES: BEGIN OF ty_pa0002,
pernr TYPE pa0001-pernr,
vorna TYPE pa0002-vorna,
nachn TYPE pa0002-nachn,
END OF ty_pa0002.

TYPES: BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
persg TYPE pa0001-persg,
persk TYPE pa0001-persk,
btrtl TYPE pa0001-btrtl,
abkrs TYPE pa0001-abkrs,
kostl TYPE pa0001-kostl,
orgeh TYPE pa0001-orgeh,
plans TYPE pa0001-plans,
stell TYPE pa0001-stell,
END OF ty_pa0001.

TYPES: BEGIN OF ty_pa0008.
INCLUDE STRUCTURE p0008.
TYPES: END OF ty_pa0008.

TYPES: BEGIN OF ty_pa2010,
pernr TYPE pa2010-pernr,
begda TYPE pa2010-begda,
endda TYPE pa2010-endda,
lgart TYPE pa2010-lgart,
anzhl TYPE pa2010-anzhl,
END OF ty_pa2010.

TYPES: BEGIN OF ty_pa2001.
INCLUDE STRUCTURE p2001.
TYPES: END OF ty_pa2001.

TYPES: BEGIN OF ty_pa2006.
INCLUDE STRUCTURE p2006.
TYPES: END OF ty_pa2006.

TYPES: BEGIN OF ty_pa0045.
INCLUDE STRUCTURE p0045.
TYPES: END OF ty_pa0045.

DATA: BEGIN OF wagetypes,
lga LIKE p0008-lga01,
bet LIKE p0008-bet01,
END OF wagetypes.

TYPES: BEGIN OF ty_pa0041.
INCLUDE STRUCTURE p0041.
TYPES: END OF ty_pa0041.

TYPES: BEGIN OF ty_pa0014.
INCLUDE STRUCTURE p0014.
TYPES: END OF ty_pa0014.

DATA: lfs_0008 LIKE p0008.

DATA: BEGIN OF dates,
dar LIKE p0041-dar01,
dat LIKE p0041-dat01,
END OF dates.

data: sno type i.

*Internal table for storing field names for displaing in list
TYPES : BEGIN OF ty_final,
sno type i,
pernr TYPE p0001-pernr, "Personnel Number
ename TYPE p0001-ename, "Emp Name
gosi_9 TYPE pa0008-bet01,
bank TYPE pa0008-bet01,
other TYPE pa0008-bet01,
advrec TYPE pa0008-bet01,
ghouse TYPE pa0008-bet01,
dfpp TYPE pa0008-bet01,
homeloan TYPE pa0008-bet01,
persloan TYPE pa0008-bet01,
saladv TYPE pa0008-bet01,
total1 TYPE pa0008-bet01,
END OF ty_final.

DATA: it_final TYPE TABLE OF ty_final WITH HEADER LINE.

DATA: it_pa0000 TYPE TABLE OF ty_pa0000 WITH HEADER LINE,
it_pa0001 TYPE TABLE OF ty_pa0001 WITH HEADER LINE,
it_pa0002 TYPE TABLE OF ty_pa0002 WITH HEADER LINE,
it_pa0008 TYPE TABLE OF ty_pa0008 WITH HEADER LINE,
it_pa0008_01 TYPE TABLE OF ty_pa0008 WITH HEADER LINE,
it_pa0041 TYPE TABLE OF ty_pa0041 WITH HEADER LINE,
it_pa0014 TYPE TABLE OF ty_pa0014 WITH HEADER LINE,
it_pa0045 TYPE TABLE OF ty_pa0045 WITH HEADER LINE,
it_pa2001 TYPE TABLE OF ty_pa2001 WITH HEADER LINE,
it_pa2006 TYPE TABLE OF ty_pa2006 WITH HEADER LINE,
it_pa2010 TYPE TABLE OF ty_pa2010 WITH HEADER LINE,
it_rgdir TYPE TABLE OF pc261 WITH HEADER LINE,
it_result TYPE pay99_result ,
wa_itrgdir TYPE pc261,
wa_rt TYPE pc207,
w_molga TYPE t500l-molga,
w_seqnr TYPE cdseq,
w_relid TYPE relid_pcl2,
wagetype TYPE char15,
v_total TYPE pa0008-bet01,
v_pernr TYPE pa0001-pernr,
v_werks TYPE pa0001-werks,
v_btrtl TYPE pa0001-btrtl,
v_persg TYPE pa0001-persg,
v_persk TYPE pa0001-persk,
v_abkrs TYPE pa0001-abkrs.


*For ALV fieldcatlog
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
*For ALV fieldcatlog
wa_fieldcat TYPE slis_fieldcat_alv,
it_layout TYPE slis_layout_alv,
it_events TYPE slis_t_event,
wa_events TYPE slis_alv_event,
it_list TYPE slis_t_listheader WITH HEADER LINE.
*************************************************************************
** SELECTION-SCREEN *
*************************************************************************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-002.

PARAMETERS:p_abkrs TYPE pa0001-abkrs .

PARAMETERS: p_pabrp TYPE t569v-pabrp,
p_pabrj TYPE t569v-pabrj,
p_begda TYPE pa0001-begda,
p_endda TYPE pa0001-endda.

PARAMETERS: r1 RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND aaa,
r2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b3 .
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-003.
SELECT-OPTIONS: s_pernr FOR pa0001-pernr,
s_werks FOR pa0001-werks, "Personnel Area
s_btrtl FOR pa0001-btrtl, "Personnel Subarea
s_persg FOR pa0001-persg, "Employee Group
s_persk FOR pa0001-persk. "Employee Subgroup
SELECTION-SCREEN END OF BLOCK b4 .
SELECTION-SCREEN END OF BLOCK b1 .

AT SELECTION-SCREEN OUTPUT.

IF r1 = 'X'.

PERFORM get_data_from_current_period.

LOOP AT SCREEN.

IF screen-name = 'P_PABRP'
OR screen-name = 'P_PABRJ'
OR screen-name = 'P_BEGDA'
OR screen-name = 'P_ENDDA'.
screen-input = 0.
ENDIF.
MODIFY SCREEN.

ENDLOOP.

ELSEIF r2 = 'X'.


PERFORM get_data_from_period.


LOOP AT SCREEN.
IF screen-name = 'P_BEGDA'
OR screen-name = 'P_ENDDA'.
screen-input = 0.
ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

************************************************************************
* START OF SELECTION *
************************************************************************
START-OF-SELECTION.

PERFORM get_pa0000_data.

IF NOT it_pa0000[] IS INITIAL.

PERFORM get_pa0001_data.

PERFORM get_pa0002_data.

PERFORM get_pa0008_data.

ENDIF.

END-OF-SELECTION.


PERFORM process_data.

END-OF-SELECTION.

*To build ALV fieldcatlog
PERFORM build_fieldcatlog.

*For ALV Layout
PERFORM alv_layout.

PERFORM get_events.

PERFORM top_of_page.

*To diaplay output in ALV grid format
PERFORM display_alv.

*&---------------------------------------------------------------------*
*& Form GET_DATA_FROM_CURRENT_PERIOD
*----------------------------------------------------------------------*
FORM get_data_from_current_period .

SELECT SINGLE * FROM t569v
WHERE abkrs = p_abkrs
AND vwsaz = '01'.
IF sy-subrc = 0.
p_pabrp = t569v-pabrp.
p_pabrj = t569v-pabrj.
ENDIF.

SELECT SINGLE * FROM t549a WHERE abkrs = p_abkrs.
IF sy-subrc = 0.
v_permo = t549a-permo.
ELSE.
IF r2 = 'X'.
MESSAGE e000 WITH 'Enter a valid Payroll Period'.
ENDIF.

ENDIF.

SELECT SINGLE * FROM t549q WHeRE permo = v_permo
AND pabrj = t569v-pabrj
AND pabrp = t569v-pabrp.
IF sy-subrc = 0.
p_begda = t549q-begda.
p_endda = t549q-endda.
ENDIF.

ENDFORM. " GET_DATA_FROM_CURRENT_PERIOD
*&---------------------------------------------------------------------*
*& Form GET_DATA_FROM_PERIOD
*----------------------------------------------------------------------*
FORM get_data_from_period .

SELECT SINGLE * FROM t549a WHERE abkrs = p_abkrs.
v_permo = t549a-permo.

SELECT SINGLE * FROM t549q WHERE permo = v_permo
AND pabrj = p_pabrj
AND pabrp = p_pabrp.


IF sy-subrc = 0.
p_begda = t549q-begda.
p_endda = t549q-endda.
ENDIF.


ENDFORM. " GET_DATA_FROM_PERIOD
*&---------------------------------------------------------------------*
*& Form BUILD_FIELDCATLOG
*&---------------------------------------------------------------------*
FORM build_fieldcatlog .

wa_fieldcat-fieldname = 'PERNR'.
wa_fieldcat-reptext_ddic = 'Employee Number'.
wa_fieldcat-just = 'L'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'ENAME'.
wa_fieldcat-reptext_ddic = 'Employee Name'.
wa_fieldcat-just = 'L'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'BANK'.
wa_fieldcat-reptext_ddic = 'Bank Deductions'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'OTHER'.
wa_fieldcat-reptext_ddic = 'Other Deductions'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'ADVREC'.
wa_fieldcat-reptext_ddic = 'Advance Recovery'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'DFPP'.
wa_fieldcat-reptext_ddic = 'Difference from Previous Period'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'GHOUSE'.
wa_fieldcat-reptext_ddic = 'Guest House Deductions'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'GOSI_9'.
wa_fieldcat-reptext_ddic = 'GOSI 9% deductions'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'HOMELOAN'.
wa_fieldcat-reptext_ddic = 'Home Loan Repay'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'PERSLOAN'.
wa_fieldcat-reptext_ddic = 'Pers Loan Repay'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'SALADV'.
wa_fieldcat-reptext_ddic = 'Advance Recovery'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'TOTAL1'.
wa_fieldcat-reptext_ddic = 'Total Deductions'.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C710'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.

ENDFORM. " BUILD_FIELDCATLOG
*&---------------------------------------------------------------------*
*& Form ALV_LAYOUT
*----------------------------------------------------------------------*
FORM alv_layout .

it_layout-colwidth_optimize = 'X'.
it_layout-totals_text = 'Totals'.
it_layout-subtotals_text = 'Totals'.
it_layout-zebra = 'X'.


ENDFORM. " ALV_LAYOUT
*&---------------------------------------------------------------------*
*& Form DISPLAY_ALV
*----------------------------------------------------------------------*
FORM display_alv .

DATA: is_print TYPE slis_print_alv.

is_print-no_print_listinfos = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = it_layout
it_fieldcat = it_fieldcat
it_events = it_events
is_print = is_print
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2.


ENDFORM. " DISPLAY_ALV
*&---------------------------------------------------------------------*
*& Form GET_EVENTS
*---------------------------------------------------------------------*
FORM get_events .

*---top of page for the first block
wa_events-name = 'TOP_OF_PAGE'.
wa_events-form = 'TOP_OF_PAGE'.
APPEND wa_events TO it_events.
CLEAR wa_events.

ENDFORM. " GET_EVENTS
*&---------------------------------------------------------------------*
*& Form TOP_OF_PAGE
*----------------------------------------------------------------------*
FORM top_of_page .


PERFORM write_header.

*--- Get the comments on the top of page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_list[].


ENDFORM. " TOP_OF_PAGE
*&---------------------------------------------------------------------*
*& Form WRITE_HEADER
*----------------------------------------------------------------------*
FORM write_header .

REFRESH it_list.
CLEAR it_list.

CLEAR it_list.
it_list-typ = 'H'.
it_list-key = space.
it_list-info = 'Employee Total Deductions Report'.
APPEND it_list TO it_list.

****** REPORT PROGRAM NAME AND CLIENT ****************
it_list-typ = 'S'.
it_list-key = space.
CONCATENATE 'Report...:' sy-repid INTO it_list-info SEPARATED BY space.
APPEND it_list TO it_list.

****** USER NAME *************************************
CLEAR it_list.
it_list-typ = 'S'.
it_list-key = space.
CONCATENATE 'User.....:' sy-uname INTO it_list-info SEPARATED BY space.
APPEND it_list TO it_list.

****** DATE / TIME STAMP *****************************
CLEAR it_list.
it_list-typ = 'S'.
it_list-key = space.
CONCATENATE 'Date/Time:' sy-datum sy-uzeit INTO it_list-info SEPARATED BY space.
APPEND it_list TO it_list.

clear it_list.
it_list-typ = 'S'.
it_list-key = space.
concatenate 'Payroll Area:' p_abkrs into it_list-info separated by space.
append it_list to it_list.

it_list-typ = 'S'.
it_list-key = space.
concatenate 'Payroll Period:' p_begda+4(2) '.' p_begda+6(2) '.' p_begda+0(4) ' ' '-' ' '
p_endda+4(2) '.' p_endda+6(2) '.' p_endda+0(4) into it_list-info.
append it_list to it_list.

ENDFORM. " WRITE_HEADER
*&---------------------------------------------------------------------*
*& Form GET_PA0000_DATA
*----------------------------------------------------------------------*
FORM get_pa0000_data .

SELECT pernr
begda
endda
massn
massg
stat2
FROM pa0000
INTO TABLE it_pa0000
WHERE pernr IN s_pernr
AND stat2 = '3'
AND begda LE p_endda
AND endda GE p_begda.


IF sy-subrc = 0.
DELETE ADJACENT DUPLICATES FROM it_pa0000 COMPARING pernr.
ENDIF.

ENDFORM. " GET_PA0000_DATA
*&---------------------------------------------------------------------*
*& Form GET_PA0001_DATA
*----------------------------------------------------------------------*
FORM get_pa0001_data .


SELECT pernr
bukrs
werks
persg
persk
btrtl
abkrs
kostl
orgeh
plans
stell
FROM pa0001
INTO TABLE it_pa0001
FOR ALL ENTRIES IN it_pa0000
WHERE pernr = it_pa0000-pernr
AND abkrs = p_abkrs
AND begda LE p_endda
AND endda GE p_begda
AND werks IN s_werks
AND btrtl IN s_btrtl
AND persg IN s_persg
AND persk IN s_persk.

IF sy-subrc = 0.

SELECT *
FROM pa0041
INTO CORRESPONDING FIELDS OF TABLE it_pa0041
FOR ALL ENTRIES IN it_pa0001
WHERE pernr = it_pa0001-pernr
AND begda LE p_endda
AND endda GE p_begda.

ENDIF.

ENDFORM. " GET_PA0001_DATA
*&---------------------------------------------------------̻-----------*
*& Form GET_PA0002_DATA
*----------------------------------------------------------------------*
FORM get_pa0002_data .

SELECT pernr
vorna
nachn
FROM pa0002
INTO TABLE it_pa0002
FOR ALL ENTRIES IN it_pa0000
WHERE pernr = it_pa0000-pernr
AND begda LE p_endda
AND endda GE p_begda.

ENDFORM. " GET_PA0002_DATA
*&---------------------------------------------------------------------*
*& Form GET_PA0008_DATA
*----------------------------------------------------------------------*
FORM get_pa0008_data .

SELECT *
FROM pa0008
INTO CORRESPONDING FIELDS OF TABLE it_pa0008
FOR ALL ENTRIES IN it_pa0000
WHERE pernr = it_pa0000-pernr
AND begda between p_begda and p_endda.


SELECT *
FROM pa0008
INTO CORRESPONDING FIELDS OF TABLE it_pa0008_01
FOR ALL ENTRIES IN it_pa0000
WHERE pernr = it_pa0000-pernr.

ENDFORM. " GET_PA0008_DATA
*&---------------------------------------------------------------------*
*& Form PROCESS_DATA
*----------------------------------------------------------------------*
FORM process_data .



LOOP AT it_pa0001.

it_final-pernr = it_pa0001-pernr.

READ TABLE it_pa0002 WITH KEY pernr = it_pa0001-pernr.
IF sy-subrc = 0.
CONCATENATE it_pa0002-vorna it_pa0002-nachn INTO it_final-ename.
ENDIF.

PERFORM get_rt_data.

sno = sno + 1.

it_final-sno = sno.

APPEND it_final .
CLEAR it_final .
ENDLOOP.


ENDFORM. " PROCESS_DATA
*&---------------------------------------------------------------------*
*& Form GET_RT_DATA
*----------------------------------------------------------------------*
FORM get_rt_data .

DATA: l_pernr LIKE pa0001-pernr.

CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = it_final-pernr
IMPORTING
molga = w_molga
TABLES
in_rgdir = it_rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.

IF r1 = 'X'.

IF NOT w_molga IS INITIAL.
CALL FUNCTION 'CD_READ_LAST'
EXPORTING
begin_date = p_begda
end_date = p_endda
IMPORTING
out_seqnr = w_seqnr
TABLES
rgdir = it_rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
ENDIF.

SORT it_rgdir BY fpend DESCENDING.

READ TABLE it_rgdir INTO wa_itrgdir WITH KEY fpbeg = p_begda
fpend = p_endda.
IF sy-subrc = 0.
w_seqnr = wa_itrgdir-seqnr.
ENDIF.

SELECT SINGLE
relid
FROM t500l
INTO w_relid
WHERE molga = w_molga.

l_pernr = it_final-pernr .

CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = w_relid
employeenumber = l_pernr
sequencenumber = w_seqnr
read_only_international = 'X'
CHANGING
payroll_result = it_result
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10.

ELSEIF r2 = 'X'.

IF NOT w_molga IS INITIAL.
CALL FUNCTION 'CD_READ_LAST'
EXPORTING
begin_date = p_begda
end_date = p_endda
IMPORTING
out_seqnr = w_seqnr
TABLES
rgdir = it_rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
ENDIF.

SORT it_rgdir BY fpend DESCENDING.

* For Offcycle Payyroll
READ TABLE it_rgdir INTO wa_itrgdir WITH KEY fpbeg = p_begda
fpend = p_endda.
IF sy-subrc = 0.
w_seqnr = wa_itrgdir-seqnr.
ENDIF.
SELECT SINGLE relid FROM t500l INTO w_relid WHERE molga = w_molga.

l_pernr = it_final-pernr .

CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = w_relid
employeenumber = l_pernr
sequencenumber = w_seqnr
read_only_international = 'X'
CHANGING
payroll_result = it_result
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10.
ENDIF.


LOOP AT it_result-inter-rt INTO wa_rt.
wagetype = wa_rt-lgart.
CASE wagetype.

WHEN '2130'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-bank = wa_rt-betrg .

WHEN '2030'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-advrec = wa_rt-betrg .

WHEN '2080'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-other = wa_rt-betrg .

WHEN '2090'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-ghouse = wa_rt-betrg .

WHEN '2040'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-other = wa_rt-betrg .

WHEN '2000'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-gosi_9 = wa_rt-betrg .

WHEN '9100'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-homeloan = wa_rt-betrg .

WHEN '9200'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-persloan = wa_rt-betrg .

WHEN '9300'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-saladv = wa_rt-betrg .

WHEN '9160'.
IF wa_rt-betrg LT 0.
wa_rt-betrg = wa_rt-betrg * ( -1 ).
ENDIF.
it_final-total1 = it_final-total1 + wa_rt-betrg.
it_final-dfpp = wa_rt-betrg .

ENDCASE.

ENDLOOP.

ENDFORM. " GET_RT_DATA


ALSO READ:

- Comparison Report For The Employee Salaries In HR ABAP.

- Cash Payment Report In HR ABAP.

- Bank Report For Employees In HR ABAP.

- BDC For Uploading Absence Data Into PA30 Transaction.

- HR Master Data Update Using T-Code CAT2 With BAPI.

.....Back To Sub-Index On HR ABAP.

.....Back To MAIN INDEX.


No comments:

Post a Comment