Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

REPORT zhr_master_data.

*----------------------------------------------------------------*

* Type pools

*----------------------------------------------------------------*

TYPE-POOLS: slis.

TABLES: pa0000,

pa0008.

types : begin of ty_pa0008,

pernr type pa0008-pernr,

begda type pa0008-begda,

endda type pa0008-endda,

subty type pa0008-subty,

preas type pa0008-preas,

trfar type pa0008-trfar,

trfgb type pa0008-trfgb,

trfgr type pa0008-trfgr,

trfst type pa0008-trfst,

stvor type pa0008-stvor,

waers type pa0008-waers,

bsgrd type pa0008-bsgrd,

divgv type pa0008-divgv,

ansal type pa0008-ansal,

lga01 type pa0008-lga01,

bet01 type pa0008-bet01,

lga02 type pa0008-lga02 ,

bet02 type pa0008-bet02,

lga03 type pa0008-lga03,

bet03 type pa0008-bet03,

lga04 type pa0008-lga04,

bet04 type pa0008-bet04,

lga05 type pa0008-lga05,

bet05 type pa0008-bet05,

end of ty_pa0008.

types : begin of ty_t510a,

trfar type t510a-trfar,

tartx type t510a-tartx,

end of ty_t510a.

types : begin of ty_t510g,

trfgb type t510g-trfgb,

tgbtx type t510g-tgbtx,

end of ty_t510g.

types : begin of ty_t510,

trfar type t510-trfar,

trfgb type t510-trfgb,

trfkz type t510-trfkz,

trfgr type t510-trfgr,

trfst type t510-trfst,

lgart type t510-lgart,

endda type t510-endda,

begda type t510-begda,

betrg type t510-betrg,

end of ty_t510.

types : begin of ty_t710,

sltyp type t710-sltyp,

slreg type t710-slreg,

slgrp type t710-slgrp,

sllvl type t710-sllvl,

endda type t710-endda,

begda type t710-begda,

slmin type t710-slmin,

slmax type t710-slmax,

slref type t710-slref,

end of ty_t710.

types : begin of ty_t591s,

subty type t591s-subty,

stext type t591s-stext,

end of ty_t591s.

types : begin of ty_t530f,

infty type t530f-infty,

preas type t530f-preas,

rtext type t530f-rtext,

end of ty_t530f.

types : begin of ty_final5,

pernr type pa0008-pernr,

begda type pa0008-begda,

endda type pa0008-endda,

subty type pa0008-subty,

preas type pa0008-preas,

trfar type pa0008-trfar,

trfgb type pa0008-trfgb,

trfgr type pa0008-trfgr,

trfst type pa0008-trfst,

stvor type pa0008-stvor,

waers type pa0008-waers,

bsgrd type pa0008-bsgrd,

divgv type pa0008-divgv,

ansal type pa0008-ansal,

lga01 type pa0008-lga01,

bet01 type pa0008-bet01,

lga02 type pa0008-lga02 ,

bet02 type pa0008-bet02,

lga03 type pa0008-lga03,

bet03 type pa0008-bet03,

lga04 type pa0008-lga04,

bet04 type pa0008-bet04,

lga05 type pa0008-lga05,

bet05 type pa0008-bet05,

stext type t591s-stext,

tartx type t510a-tartx,

tgbtx type t510g-tgbtx,

rtext type t530f-rtext,

slmin type t710-slmin,

slmax type t710-slmax,

end of ty_final5.

data : it_t710 type table of ty_t710 with header line,

it_t591s type table of ty_t591s with header line,

it_t510a type table of ty_t510a with header line,

it_t510 type table of ty_t510 with header line,

it_t510g type table of ty_t510g with header line,

it_t530f type table of ty_t530f with header line,

it_final5 type table of ty_final5 with header line,

it_pa0008 type table of ty_pa0008 with header line.

data : it_fieldcat5 type slis_t_fieldcat_alv,

wa_fieldcat like line of it_fieldcat5,

wa_layout type slis_layout_alv.

SELECT-OPTIONS: s_pernr FOR pa0000-pernr,

s_trfar for pa0008-trfar,

s_trfgb for pa0008-trfgb,

s_trfgr for pa0008-trfgr,

s_trfst for pa0008-trfst.

PARAMETERS: p_begda TYPE pa0001-begda default '18000101' ,

p_endda TYPE pa0001-endda default '99991231' .

START-OF-SELECTION..

select

pernr

begda

endda

subty

preas

trfar

trfgb

trfgr

trfst

stvor

waers

bsgrd

divgv

ansal

lga01

bet01

lga02

bet02

lga03

bet03

lga04

bet04

lga05

bet05

from pa0008

into table it_pa0008

where pernr in s_pernr

and begda le p_endda

and endda ge p_begda

and trfar in s_trfar

and trfgb in s_trfgb

and trfgr in s_trfgr

and trfst in s_trfst.

.

if sy-subrc = 0.

select subty

stext

from t591s

into table it_t591s

where infty = '0008'

and sprsl = sy-langu.

select trfar

tartx

from t510a

into table it_t510a

for all entries in it_pa0008

where trfar = it_pa0008-trfar

and molga = '99'.

select trfgb

tgbtx

from t510g

into table it_t510g

where molga = '99'.

select preas

rtext

from t530f

into table it_t530f

for all entries in it_pa0008

where preas = it_pa0008-preas.

select trfar

trfgb

trfkz

trfgr

trfst

lgart

endda

begda

betrg

from t510

into table it_t510

for all entries in it_pa0008

where trfar = it_pa0008-trfar

and trfgb = it_pa0008-trfgb

and trfgr = it_pa0008-trfgr

and trfst = it_pa0008-trfst.

select

sltyp

slreg

slgrp

sllvl

endda

begda

slmin

slmax

slref

from t710

into table it_t710

for all entries in it_pa0008

where molga = '99'

and sltyp = it_pa0008-trfar

and slreg = it_pa0008-trfgb

and slgrp = it_pa0008-trfgr

and sllvl = it_pa0008-trfst.

endif.

end-of-selection.

loop at it_pa0008.

move-corresponding it_pa0008 to it_final5.

read table it_t591s with key subty = it_pa0008-subty.

if sy-subrc = 0.

it_final5-stext = it_t591s-stext.

endif.

read table it_t510a with key trfar = it_pa0008-trfar.

if sy-subrc = 0.

it_final5-tartx = it_t510a-tartx.

endif.

read table it_t510g with key trfgb = it_pa0008-trfgb.

if sy-subrc = 0.

it_final5-tgbtx = it_t510g-tgbtx.

endif.

read table it_t530f with key preas = it_pa0008-preas.

if sy-subrc = 0.

it_final5-rtext = it_t530f-rtext.

endif.

read table it_t710 with key sltyp = it_pa0008-trfar

slreg = it_pa0008-trfgb

slgrp = it_pa0008-trfgr

sllvl = it_pa0008-trfst.

if sy-subrc = 0.

it_final5-slmin = it_t710-slmin.

it_final5-slmax = it_t710-slmax.

endif.

append it_final5.

clear it_final5.

endloop.

perform build_fcat using 'PERNR' 'Emp Number' ''.

perform build_fcat using 'BEGDA' 'Start Date' ''.

perform build_fcat using 'ENDDA' 'End Date' ''.

perform build_fcat using 'SUBTY' 'Payment Type' ''.

perform build_fcat using 'STEXT' 'Payment Type Text' ''.

perform build_fcat using 'PREAS' 'Reason' ''.

perform build_fcat using 'RTEXT' 'Reason Text' ''.

perform build_fcat using 'TRFAR' 'Pay scale type' ''.

perform build_fcat using 'TARTX' 'Pay scale text' ''.

perform build_fcat using 'TRFGB' 'Pay Scale Area' ''.

perform build_fcat using 'TGBTX' 'Pay Scale Area Text' ''.

perform build_fcat using 'TRFGR' 'Pay Scale Group' ''.

perform build_fcat using 'TRFST' 'Pay Scale Level' ''.

perform build_fcat using 'SLMIN' 'Lower limit' ''.

perform build_fcat using 'SLMAX' 'Upper limit ' ''.

perform build_fcat using 'STVOR' 'Date of Next Increase' ''.

perform build_fcat using 'WAERS' 'Currency' ''.

perform build_fcat using 'BSGRD' 'Capacity Utilization' ''.

perform build_fcat using 'DIVGV' 'Working Hours' ''.

perform build_fcat using 'ANSAL' 'Annual salary' ''.

perform build_fcat using 'LGA01' 'Wage Type' ''.

perform build_fcat using 'BET01' 'Wage Type Amount' ''.

perform build_fcat using 'LGA02' 'Wage Type' ''.

perform build_fcat using 'BET02' 'Wage Type Amount' ''.

perform build_fcat using 'LGA03' 'Wage Type' ''.

perform build_fcat using 'BET03' 'Wage Type Amount' ''.

perform build_fcat using 'LGA04' 'Wage Type' ''.

perform build_fcat using 'BET04' 'Wage Type Amount' ''.

perform build_fcat using 'LGA05' 'Wage Type' ''.

perform build_fcat using 'BET05' 'Wage Type Amount' ''.

wa_layout-zebra = 'X'.

wa_layout-colwidth_optimize = 'X'.

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = sy-repid

i_callback_top_of_page = 'TOP_OF_PAGE'

is_layout = wa_layout

it_fieldcat = it_fieldcat5

tables

t_outtab = it_final5.

*&---------------------------------------------------------------------*

*& Form BUILD_FCAT

*----------------------------------------------------------------------*

form build_fcat using value(p_0107)

value(p_0108)

value(p_0109).

wa_fieldcat-fieldname = p_0107.

wa_fieldcat-reptext_ddic = p_0108.

wa_fieldcat-do_sum = p_0109.

append wa_fieldcat to it_fieldcat5.

clear wa_fieldcat.

endform.

  • No labels