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

HR ABAP - Minimum & Maximum Salaries For The Employees.

REPORT yztest .

*----data base tables used
TABLES: pa0008.

*---types declaration
TYPES: BEGIN OF ty_pa0008,
pernr LIKE pa0008-pernr,
begda LIKE pa0008-begda,
endda LIKE pa0008-endda,
trfar LIKE pa0008-trfar,
trfgb LIKE pa0008-trfgb,
trfgr LIKE pa0008-trfgr,
trfst LIKE pa0008-trfst,
END OF ty_pa0008.

TYPES: BEGIN OF ty_t510n,
molga LIKE t510n-molga,
trfar LIKE t510n-trfar,
trfgb LIKE t510n-trfgb,
trfgr LIKE t510n-trfgr,
trfst LIKE t510n-trfst,
grmin LIKE t510n-grmin,
grmax LIKE t510n-grmax,
endda LIKE t510n-endda,
END OF ty_t510n.

*--internal table declaration
DATA: it_pa0008 TYPE TABLE OF ty_pa0008 WITH HEADER LINE,
it_t510n TYPE TABLE OF ty_t510n WITH HEADER LINE.

*---selection screen data
SELECT-OPTIONS:s_pernr FOR pa0008-pernr.
PARAMETERS:p_molga TYPE molga.

*--start of selection
START-OF-SELECTION.

perform get_data.

END-OF-SELECTION.

perform display_data.

*&---------------------------------------------------------------------*
*& Form get_data
*----------------------------------------------------------------------*
form get_data .


SELECT pernr
begda
endda
trfar
trfgb
trfgr
trfst
FROM pa0008
INTO TABLE it_pa0008
WHERE pernr IN s_pernr.

if not it_pa0008[] is initial.

SELECT molga
trfar
trfgb
trfgr
trfst
grmin
grmax
endda
FROM t510n
INTO TABLE it_t510n
FOR ALL ENTRIES IN it_pa0008
WHERE trfar = it_pa0008-trfar
AND trfar = it_pa0008-trfar
AND trfgb = it_pa0008-trfgb
AND trfgr = it_pa0008-trfgr
AND trfst = it_pa0008-trfst
AND endda = '99991231'.
endif.

endform. " get_data
*&---------------------------------------------------------------------*
*& Form display_data
*----------------------------------------------------------------------*
form display_data .


LOOP AT it_pa0008.
WRITE:/ it_pa0008-pernr ,
it_pa0008-begda ,
it_pa0008-endda .

READ TABLE it_t510n WITH KEY trfar = it_pa0008-trfar
trfgb = it_pa0008-trfgb
trfgr = it_pa0008-trfgr
trfst = it_pa0008-trfst.
WRITE:/ it_t510n-trfar,
it_t510n-trfgb ,
it_t510n-trfgr,
it_t510n-trfst,
it_t510n-grmin ,
it_t510n-grmax.
ENDLOOP.

endform. " display_data


the selection screen is like this ..



and the output is like this:




ALSO READ:

- Handling User Exits In HR ABAP.

- Termination Workbench Report In HR ABAP.

- Service Calculation Report In HR ABAP.

- Use Of BAPI HR_MAINTAIN_MASTERDATA For Updating HR DATA.

- Upload The Over Time Report In HR ABAP.

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

.....Back To MAIN INDEX.


No comments:

Post a Comment