SAP HCM DECLUSTERING

From SapWiki

HCM Declustering Tools

Programa RPCDCT_INITIAL_LOAD - Herram.declustering: Transf.datos inicial p.resultados cálc.nómina (ver documentación)

Tablas declustering

HRDCT_D_TABLES    Index Table for Declustering Transparent Tables
ejemplo:
PCLTABNAME          PCL2
RELID               CL
INTERNAL TABNAME    RT
TABNAME             P2RX_RT
TABTYPE
ALTRELID
P2RX_AB           Cluster RD/B2: Table AB
P2RX_ABC          Cumulation of Absence Classes
P2RX_ACCR         Payroll Result: Month End Accruals
P2RX_ALP          Alternative Payment Table ALP
P2RX_ARRRS        Payroll Results: Arrears Table
P2RX_AVERAGE      Frozen Average Values in Payroll Result
P2RX_BENTAB       Benefits payroll results international
P2RX_BT           Payroll Results: Bank Transfers
P2RX_BT_PERSON    Payment-Related Information (Person)
P2RX_C0           Cost Distribution
P2RX_C1           Cost Distribution Table C1
P2RX_CODIST       Distribution opf Liabilities
P2RX_CRT          Payroll Results: Cumulated Results Table
P2RX_CRT_PERSON   Cumulated Results Table (Person)
P2RX_DDNTK        Payroll Results: Deductions Not Effected
P2RX_DFT          Payroll Results: Differences for Gross/Net Payroll
P2RX_EVAL_PERIOD  Index for Payroll Results Periods
P2RX_FUND         Accounting Structure for Funds Management
P2RX_GROUPING     Payroll Result: Grouping Table
P2RX_GRT          Payroll Results: Results Table
P2RX_LIDI         Cost-Distributed Liabilities
P2RX_LIFL         Outflow/Inflow to or from a Payroll Period
P2RX_LS           Payroll Results: Subsequent Time Tickets
P2RX_MODIF        HR-PAY: Modifiers
P2RX_RT           Payroll Results: Results Table
P2RX_RT_GP        Payroll Result: Payroll for Global Employees
P2RX_RT_PERSON    Results Table (Person)
P2RX_STATUS       Status Indicator
P2RX_V0           Variable Assignment
P2RX_VCP          Payroll Results: Leave Deduction
P2RX_VERSC        Payroll Status Information
P2RX_VERSION      Information on Creation
P2RX_WPBP         Payroll Results: Work Center/Basic Pay
P2RX_WPBP_INDEX   HRDCD HELPER TABLES FOR WPBP

Ejemplos de código

  SELECT DISTINCT rgdir~pernr INTO TABLE lt_pernr
  FROM hrpy_rgdir AS rgdir INNER JOIN
  p2rx_rt AS rt ON
  rgdir~pernr = rt~dct_pernr AND
  rgdir~seqnr = rt~dct_seqnr
  INNER JOIN p2rx_wpbp AS wpbp ON
  rgdir~pernr = wpbp~dct_pernr AND
  rgdir~seqnr = wpbp~dct_seqnr
  WHERE
  wpbp~bukrs IN mt_range_bukrs AND
  wpbp~werks IN mt_range_werks AND
  wpbp~persg IN mt_range_persg AND
  wpbp~persk IN mt_range_persk AND
  rgdir~abkrs = mv_abkrs AND
  rgdir~srtza = 'A' AND rgdir~ipend
  BETWEEN lv_begda AND lv_endda AND
  rt~lgart = mv_lgart AND rt~betrg
  BETWEEN mv_amt_low AND mv_amt_high.
  

  SELECT rt~lgart rt~betrg t512t~lgtxt INTO CORRESPONDING FIELDS OF TABLE lt_rt FROM hrpy_rgdir AS rgdir INNER JOIN
  p2rx_rt AS rt ON
  rgdir~pernr = rt~dct_pernr AND
  rgdir~seqnr = rt~dct_seqnr
  inner JOIN t512t AS t512t ON
  t512t~sprsl = sy-langu AND
  t512t~molga = iv_molga AND
  t512t~lgart = rt~lgart
  WHERE
  t512t~lgart in lt_lgart and
  rgdir~pernr = mv_pernr AND
  rgdir~abkrs = mv_abkrs AND
  rgdir~srtza = 'A' AND rgdir~fpper = mv_period AND rgdir~inper = mv_period.

 " WTs for IN period A results
 SELECT hrdct_tpy_rgdir~fpper AS groupid, hrdct_tpy_rgdir~fpper AS group_name, p2rx_rt~lgart AS lgart, p2rx_rt~betpe AS betpe, p2rx_rt~anzhl AS anzhl,  t512t~lgtxt AS lgtxt, "p2rx_eval_period~fpper as fpper,
       SUM( CASE hrdct_tpy_rgdir~srtza WHEN 'P' THEN betrg * -1
                     ELSE betrg END ) AS betrg
         INTO CORRESPONDING FIELDS OF TABLE @et_rt
                  FROM p2rx_rt INNER JOIN hrdct_tpy_rgdir
                                ON hrdct_tpy_rgdir~dct_pernr EQ p2rx_rt~dct_pernr
                               AND hrdct_tpy_rgdir~dct_seqnr EQ p2rx_rt~dct_seqnr
                     INNER JOIN t512t
                               ON t512t~sprsl = @sy-langu
                               AND t512t~molga = @lv_molga
                               AND t512t~lgart = p2rx_rt~lgart
        WHERE hrdct_tpy_rgdir~abkrs = @mv_payroll_area AND
              hrdct_tpy_rgdir~dct_pernr = @lv_pernr AND
              hrdct_tpy_rgdir~inper = @mv_payroll_period AND
              ( p2rx_rt~betrg <> 0 OR p2rx_rt~betpe <> 0 ) AND
              p2rx_rt~lgart IN @lt_sel_lgart
        GROUP BY hrdct_tpy_rgdir~fpper, p2rx_rt~lgart, p2rx_rt~betpe, p2rx_rt~anzhl, t512t~lgtxt . "#EC CI_BUFFJOIN