Difference between revisions of "SAP HCM CHILE"

From SapWiki
 
(11 intermediate revisions by the same user not shown)
Line 175: Line 175:
 
                              
 
                              
 
  select single name1 from adrc where addrnumber = t536c-adrnr.
 
  select single name1 from adrc where addrnumber = t536c-adrnr.
 +
 +
*para actualizar usar vista V_T536C
  
 
==Cálculo Provisión de vacaciones==
 
==Cálculo Provisión de vacaciones==
Line 267: Line 269:
 
==Libro de Remuneraciones Electrónico==
 
==Libro de Remuneraciones Electrónico==
 
[https://blogs.sap.com/2021/10/19/libro-de-remuneraciones-electronico/ Libro de Remuneraciones Electrónico]
 
[https://blogs.sap.com/2021/10/19/libro-de-remuneraciones-electronico/ Libro de Remuneraciones Electrónico]
 +
 +
[https://help.sap.com/docs/ERP_HCM_SPV/b7b68db5e5b04d1488c14972fbdc94f1/8a53e60ba5f341dcb0460c55d9880810.html?locale=en-US Documentación LRE]
 +
 +
===Notas libro remuneraciones electrónico===
 +
<nowiki>reporte RPC_PAYCL_LRE_DRIVER
 +
tabla T596J
 +
badi (Enhancement Spot) HRPAYCL_LRE , methods FILL_PRE_TOTAL & FILL_FINAL
 +
 +
Notas SAP:
 +
3082115 - [CL] New Generic Log Framework
 +
3092547 - [CL] Prerequisite objects for SAP Note 3047487
 +
3047487 - [CL] LRE: Electronic Payments Book Report
 +
 +
Includes:
 +
CL_HRPAYCL_T596J==============CP method READ_BY_APPLICATION => lectura tabla t596j
 +
 +
RPC_PAYCL_LRE_PY_RES_SINGLE_C    METHOD if_hrpaycl_lre_payroll_result~read_wagetypes_from_rt
 +
RPC_PAYCL_LRE_PY_RES_SINGLE_C    METHOD if_hrpaycl_lre_payroll_result~read_from_cumulator
 +
RPC_PAYCL_LRE_FLDS_CUM_CALC_C    method get_amount_by_cumulator
 +
       
 +
RPC_PAYCL_LRE_V01_FILL_PRE_T_C  METHOD if_hrpaycl_lre_filler~fill => llamada a badi FILL_PRE_TOTAL
 +
RPC_PAYCL_LRE_V01_FILL_FINAL_C  METHOD if_hrpaycl_lre_filler~fill => llamada a badi FILL_FINAL
 +
</nowiki>
 +
 
==Ley SANNA==
 
==Ley SANNA==
 
* 2921540 - [CL] Contract suspension due to COVID19
 
* 2921540 - [CL] Contract suspension due to COVID19
Line 274: Line 300:
 
* cc-nom /E10 (Contribución SANNA)
 
* cc-nom /E10 (Contribución SANNA)
 
* función de nómina CLMUT [https://help.sap.com/viewer/41df15e669414dcebb36ba94d03e8c9d/1.4.93/en-US/972af10e3e3b47abbbd62d631ac1cb98.html]
 
* función de nómina CLMUT [https://help.sap.com/viewer/41df15e669414dcebb36ba94d03e8c9d/1.4.93/en-US/972af10e3e3b47abbbd62d631ac1cb98.html]
 +
==Programa HCLCCRTA0 - Certificado de ingresos==
 +
* Rango de N° (SNRO) : HR_CL_CRTA
 +
* Tabla T7CLCERTIFNBR : Employee Income Certificate number assignment
 +
* clase CL_HRPAYCL_NBR_RANGE_HANDLER - método GET_INCOME_CERTIFICATE_NBR
 
[[Category:Chile]]
 
[[Category:Chile]]

Latest revision as of 22:05, 26 August 2024

Payroll

Driver: HCLCALC0

Notas driver

Tabla interna datumsangabe : Datos de fecha, ver función de nómina DATES, FORM fudates

SAP HCM Payroll Chile

Previred

Programa

  • HCLCPRVD0

Ver formularios

  • Trn. HR99S00_DAQVIEW

Tablas Previred

Determinar lógica y modificarla para un campo de interfaz PREVIRED

Digamos que se desea determinar la lógica del campo N° 18 y modificarla, vamos a la tabla T5F99FD con:

T5F99FD-MOLGA = '39'
T5F99FD-APPL = 'PRVD'
T5F99FD-ORDSE = 18

obtenemos T5F99FD-FIELD, en este caso = 'TRAMO'

vamos a tabla T5F99FF con

T5F99FF-MOLGA = '39'
T5F99FF-APPL = 'PRVD'
T5F99FF-FIELD = 'TRAMO'

se observa que T5F99FF-FNAME = 'HR_CL_DAQ_PROCESS_CCAF'

vamos a la trn. SE37 con HR_CL_DAQ_PROCESS_CCAF

se observa que acá esta la lógica para determinar el tramo:

    WHEN 'TRAMO'. "Family Allowance Brackets
      PERFORM get_bracket USING ls_wpbp
                                ls_pay-inter-rt
                                lr_employee->at_p0008
                       CHANGING ls_value-data.

Si queremos modificar la lógica para determinar el tramo debemos copiar la función HR_CL_DAQ_PROCESS_CCAF digamos a ZHR_CL_DAQ_PROCESS_CCAF e incluir la lógica necesaria, en este caso:

FUNCTION zhr_cl_daq_process_ccaf.
*"--------------------------------------------------------------------
*"*"Interfase local
*"  IMPORTING
*"     REFERENCE(IM_DAQ) TYPE  P99SD_CODAQ
*"     REFERENCE(IM_TAB_PAY) TYPE  TABLE
*"     REFERENCE(IM_TAB_TIME) TYPE  TABLE
*"     REFERENCE(IM_TAB_PRELP) TYPE  P99SG_TAB_PRELP OPTIONAL
*"     REFERENCE(IM_TAB_USER) TYPE  TABLE OPTIONAL
*"     REFERENCE(IM_FORM) TYPE REF TO CL_HR99S00_DAQ
*"     REFERENCE(IM_WAFOR) TYPE  P99SD_WAFOR OPTIONAL
*"     REFERENCE(IM_TAB_FODAT) TYPE  P99SD_TAB_FODAT OPTIONAL
*"  EXPORTING
*"     REFERENCE(EX_TAB_VALUE) TYPE  P99SD_TAB_VALUE
*"     REFERENCE(EX_RETURNCODE) TYPE  SY-SUBRC
*"  CHANGING
*"     REFERENCE(CH_TAB_ERROR) TYPE  P99SF_TAB_ERROR OPTIONAL
*"     REFERENCE(CH_MISC) TYPE  ANY OPTIONAL
*"--------------------------------------------------------------------
* data definitions
  DATA ls_value             TYPE p99sd_value.
  DATA ls_employee          TYPE hr99b_hrf_ee_misc.
  DATA lr_employee          TYPE REF TO cl_hrpaycl_employee.
  DATA lt_pay         TYPE hrpaycl_tab_of_results.
  DATA ls_wpbp        TYPE pc205.
  DATA ls_pay         TYPE paycl_result.
  DATA ls_aux_pay     TYPE paycl_result.

  lt_pay = im_tab_pay.

  ls_employee = ch_misc.
  lr_employee ?= ls_employee-employee.

* Get last payroll result whitin period
  LOOP AT lt_pay INTO ls_aux_pay WHERE evp-payty IS INITIAL.
    LOOP AT ls_aux_pay-inter-wpbp INTO ls_wpbp WHERE aktivjn = abap_true.
      ls_pay = ls_aux_pay.
    ENDLOOP.
  ENDLOOP.

  IF ls_wpbp IS INITIAL.
    ls_wpbp-bukrs = lr_employee->a_pernr_el-bukrs.
  ENDIF.

  ls_value-begda = im_daq-begda.
  ls_value-endda = im_daq-endda.

  CASE im_wafor-field.
    WHEN 'TRAMO'. "Family Allowance Brackets

      DATA: lt_p9021 TYPE TABLE OF p9021.
*  leer el tramo del trabajador vía ITP9021 para el pago de asignaciones familiares

      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr           = lr_employee->a_pernr
          infty           = '9021'
        TABLES
          infty_tab       = lt_p9021
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
* Implement suitable error handling here
      ENDIF.

      LOOP AT lt_p9021 INTO DATA(ls_p9021) WHERE begda <= ls_wpbp-endda AND
                           endda >= ls_wpbp-begda.
      ENDLOOP.
      IF sy-subrc = 0.
        ls_value-data = ls_p9021-tramo.
      ELSE.
        PERFORM get_bracket USING ls_wpbp
                                  ls_pay-inter-rt
                                  lr_employee->at_p0008
                         CHANGING ls_value-data.

      ENDIF.
  ENDCASE.

  APPEND ls_value TO ex_tab_value.
ENDFUNCTION.

por último actualizamos la vista V_T5F99FF (trn. SM30) para field = 'TRAMO' con la nueva función ZHR_CL_DAQ_PROCESS_CCAF

Notas SAP Previred

Varios PREVIRED

CL_HRPAYCL_DAQ_ENGINE  => RUN_1_DAQ

CALL METHOD ar_daq_form->get_values_forms

#####################################################
function HR_99S_DAQ_GET_VALUES
para analizar poner break acá:

        loop at <fs_sectn>-field ASSIGNING <fs_fifor> where field in im_field.

*         init
          wa_form-field = <fs_fifor>-field.
          wa_form-ficon = <fs_fifor>-atrib.  "<--------BREAK-POINT

#####################################################
function HR_99S_DAQ_GET_FIELD

LHR99S00_DAQF02 form daq_wages

HR_CL_IF_PRVD_GENERATE_FILE
transaccion DAQ_UPLOAD

 
function HR_CL_IF_PRVD_FORMAT_FODAT => (clase CL_HRPAYCL_PRVD_TABLE_HANDLER, método FILL_STRUCTURE):

feature CLCAF

HR_CL_READ_T7CL29

###########################################
LHRPAYCL_IF_PRVDF01 656

Representante Legal

  • Rut Representante Legal
T7CL30-RUTRL
  • Nombre Representante Legal
SELECT SINGLE * FROM t536c WHERE molga EQ '39'
                            AND   anart EQ 'RL'
                            AND   ankey EQ T7CL30-ankrl.
                            
select single name1 from adrc where addrnumber = t536c-adrnr.
  • para actualizar usar vista V_T536C

Cálculo Provisión de vacaciones

Calculo Provisión de vacaciones

Notas SAP Varias

Función CLTAX moneda CLP4

1587331 - [CL] Rounding issue in Income Tax calculation (CLTAX)

Symptom

The Income Tax Payroll function (CLTAX) is performing rounding procedures during the tax calculation process. The correct approach is to use decimal places during the calculation and round the final result, as defined by the Chilean tax authority (SII). Rounding CLP amounts during the tax calculation may lead to slight differences in the tax deduction.

Other Terms

Chile; decimal places; HR_CL_INCOME_TAX; rounding

Solution

The new currency CLP4 was created in order to be used during the Income Tax calculation using 4 decimal places. The Income Tax calculation was changed in order to use the new currency for UTM conversion and to store the Income Tax basis (/T23) using 4 decimal places during the Income Tax wage type (/312) generation. The final result is then rounded to CLP.

From now on, the currency conversion rate between UTM and CLP4 should be maintained monthly as the conversion rate between UTM and CLP is being maintained (using the same conversion rate and values).

The solution described in this note will be included in an HR Support Package, as indicated in item "Reference to Support Packages".

In case you require these changes to be implemented immediately, do the following steps attached as Correction Instructions:

- apply the manual pre-implementation steps.

- use SNOTE to apply the source code correction instructions.

Manual Activities

I) New currency CLP4

a) Go to SM30 transaction and maintain the table view V_CURC.

b) Insert the following entry:

Currency: CLP4
Long Text: Chilean Peso
Short Text: Peso
ISO code: CLP
Alternative key: 152 

c) Save your changes.

d) Go to SM30 transaction and maintain the table view V_CURX.

e) Insert the following entry:

Currency Decimals

CLP4 4

f) Save your changes.

g) Go to SM30 transaction and maintain the table view V_TCURF.

h) Insert the following entries:

ExRt From To Valid from Ratio(from) Ratio(to)
M CLP CLP4 01.01.1900 1 1 
M CLP4 CLP 01.01.1900 1 1

i) Save your changes.

j) Go to SM30 transaction and maintain the table view V_TCURR.

k) Insert the following entries:

ExRt Valid From From Dir.quot. To
M 01.01.1900 CLP 1 CLP4 
M 01.01.1900 CLP4 1 CLP

l) Save your changes.

II) New message HRPAYCL035

a) Go to SE91 transaction and maintain the message 035 for Message class HRPAYCL:

Message Message short text
035 No exchange rate from &1 to &2 in table V_TCURR on &3 

b) Save your changes.

1444894 - Migrated Record Update via PA30 gives a shortdump

Sympton:

After upgrade to release 6.00 EhP5, you can not maintain Infotype 0021 (Display Family/ Related Person) for Chile. The message 'Error in UPDATE from table PA3226 argument' will be displayed.

Libro de Remuneraciones Electrónico

Libro de Remuneraciones Electrónico

Documentación LRE

Notas libro remuneraciones electrónico

reporte RPC_PAYCL_LRE_DRIVER
tabla T596J
badi (Enhancement Spot) HRPAYCL_LRE , methods FILL_PRE_TOTAL & FILL_FINAL

Notas SAP:
3082115 - [CL] New Generic Log Framework
3092547 - [CL] Prerequisite objects for SAP Note 3047487
3047487 - [CL] LRE: Electronic Payments Book Report

Includes: 
CL_HRPAYCL_T596J==============CP method READ_BY_APPLICATION => lectura tabla t596j

RPC_PAYCL_LRE_PY_RES_SINGLE_C    METHOD if_hrpaycl_lre_payroll_result~read_wagetypes_from_rt
RPC_PAYCL_LRE_PY_RES_SINGLE_C    METHOD if_hrpaycl_lre_payroll_result~read_from_cumulator
RPC_PAYCL_LRE_FLDS_CUM_CALC_C    method get_amount_by_cumulator
        
RPC_PAYCL_LRE_V01_FILL_PRE_T_C   METHOD if_hrpaycl_lre_filler~fill => llamada a badi FILL_PRE_TOTAL
RPC_PAYCL_LRE_V01_FILL_FINAL_C   METHOD if_hrpaycl_lre_filler~fill => llamada a badi FILL_FINAL

Ley SANNA

  • 2921540 - [CL] Contract suspension due to COVID19
  • Please apply also the SAP Note 2923563 to install the solution to handle the Ley SANNA calculation.
  • Regla (PE02) >LS Nuevo Cálculo Ley SANNA, >LSB Nuevo Cálculo Ley SANNA, >LSN Ajusta Pago Ley SANNA con Lic 30 días
  • constante Z_LYS (V_T511K)
  • cc-nom /E10 (Contribución SANNA)
  • función de nómina CLMUT [1]

Programa HCLCCRTA0 - Certificado de ingresos

  • Rango de N° (SNRO) : HR_CL_CRTA
  • Tabla T7CLCERTIFNBR : Employee Income Certificate number assignment
  • clase CL_HRPAYCL_NBR_RANGE_HANDLER - método GET_INCOME_CERTIFICATE_NBR