• No results found

Payroll Control Center - Check Implementation Guide

N/A
N/A
Protected

Academic year: 2021

Share "Payroll Control Center - Check Implementation Guide"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

Payroll Control Center

(2)

Contents

Introduction & Prerequisites

Customizing

(3)
(4)

Prerequisites

You have installed declustering on your system (notes 1774918 and 1846500 plus country-dependent note)You have installed HR Renewal 2.0

The Payroll Control Center has been set up according to the implementation guide.

While this is no prerequisite for following this implementation guide it is recommended to have declustered payroll data available for testing purposes. You should listen to the recorded expert session (ca 2 hrs) before using this guide, as it assumes familiarity with the Payroll Control Center and the terminology used.

This check implementation guide will take you through an implementation of a parameterized generic wage type check for the Payroll Control Center. This is not a full documentation on the IMG or customizing and we will not touch on the meaning of every field therein.

(5)
(6)

Customizing 1

Set up parameter types

First, go to the IMG "Payroll Data Source Framework“ and select the step “Create Data Source Types.”

We will start by defining the parameters of the check. Some parameters are delivered by SAP and can be used.

Select „Define Result Detail Types/Parameter Types.“ There are three additional parameters we need:

A lower limit (amount) Z1AMT_LOWAn upper limit (amount) Z1AMT_HIGHA wage type Z1LGART

(7)

Customizing 2

Define the amount parameters

Lower and upper limit differ only in their description. However, the check does need two distinct parameters to allow the limits to be set correctly, so both are needed. We are implementing a US-specific check, so we set MOLGA to 10 and the currency to USD.

The EDM type allows you to choose between a decimal and a string -important for conversion. Here we have a decimal of system type MAXBT, and precision, digits, and data element are set accordingly. The

parameter reflects an amount and it is an input parameter, so both checkboxes are set.

It is not a result - the result for this check will be a list of personnel numbers.

The lower limit is also an amount (USD, for the US), and is configured the same way, except for the description.

(8)

Customizing 3

Define the wage type parameter

The wage type has no numerical properties, and those fields remain empty.

We still make this a US specific parameter in this example. That means we will only be able to use it in US specific checks.

We do not assign attributes in any of the other steps for these parameters.

Note:

These parameters do not necessarily have to be country specific. This is an example only, and we recommend experimentation.

(9)

Customizing 4

Create the data source type

Go to the next IMG step “Create Data Source Types.”

Create a new data source type „Z_PYC_HRUS_GEN_WT_BT“ Give the new data source type a text a short text.

Set the country grouping to 10, for the US, and „Transparent results“ to „Supported.“

The run time class is ZCL_PYD_GENCHECK_WT_BETWEEN. We will create this class later. At this point in time it does not exist.

(10)

Customizing 5

Assign input and result type parameters

Select “Assign input type parameters.”

We want our check to be able to select by a range of parameters, including the three we defined just now. Assign those parameters as shown on the right.

„Fixed“ parameters are entered in customizing, and used to create a specific check instance, e.g a check for „>= 1000 USD gross“ for students employed part-time.

„Mandatory“ parameters are just that. All non-mandatory parameters do not need to be set.

Select “Assign result type parameters.”

Assign PERNR as result type. This example checks for authorization on infotype 8. If you have no authorizations for the data source framework customized you can leave the field empty for this example.

(11)

Customizing 6

Assign Result Details

With parameter PERNR selected, select “Assign Result Detail Type.” We want to show an employee header with generic information on the employee, a generic overview, and – for this check – the payroll results in form of a wage type list. These three generic views are delivered by SAP. Add the views as shown in the image on the right.

The flag „Is header“ puts the employee information in the header bar. The flag „Is default“ opens the generic overview when an employee is selected.

The sort order defines in which order the icons are displayed.

These views are filled by the check code. That means for different checks you can display different details.

(12)

Customizing 7

Assign Status Change Reasons

Select “Status Change Reasons.” (The parameter PERNR should still be selected from the previous step. If you have gone out of that view you will need to select it again.)

For this generic check we expect exceptions that we might set to „OK“ manually for additional wage types or retrocalculation differences. Add these two reasons as shown.

The reasons you have configured here will be shown as possible

selections in the pop-up that appears when you set an employee to „OK“ manually.

(13)

Customizing 8

Setting up the UI: Tiles

We will now set up tiles, folders, and check instances that form the structure we see on the UI. In this example, we restrict ourselves to one tile, with one folder, and a few instances of our check.

Leave this IMG step entirely and go to Classify Data Sources / Set Up Data Source Classes.

Create a class Z_US_TEST with the name „US Payroll Result Checks.“ This will create a tile on the UI with that name.

The class category is PY_COCKPIT. All check classes have this category. It is delivered by SAP.

Parameter type is ABKRS- Payroll Area. This class works on payroll area level.

(14)

Customizing 9

Setting up the UI: Folders

Select “Folder.”

Create a folder „Earnings“ for country grouping 10 – US. We will create a few check instances for earnings and assign them to this folder.

(15)

Customizing 10

Setting up the UI: Assign data source types to folders

Select “Assignment data source type to folder.”

Create a folder „Earnings“ for country grouping 10 – US. We will assign our data source type to this folder. Its instances will appear here.

(16)

Customizing 11

Defining check instances

Leave the previous IMG step and go to “Define Data Source Instances.” We define two instances:

Low retrocalculation difference ( /552 <= 100 USD) Severance pay (MII3 exists: 0<= M113 <= 99999999 USD )

There are many more checks you can implement simply by parameterizing this generic wage type check. In this example we do not restrict the check by organizational assignment. (For other examples, such as „high gross“ which may be different across personnel groups, that may make more sense.)

(17)

Customizing 11

Defining check instances

Leave the previous IMG step and go to “Define Data Source Instances.” We define two instances:

Low retrocalculation difference ( /552 <= 100 USD) Severance pay (MII3 exists: 0<= M113 <= 99999999 USD )

Note: You can check for existence of a wage type by checking for a value between 0 and the maximum amount. With this check you cannot check for missing wagy types.

There are obviously many more checks you can implement simply by

parameterizing this generic wage type check. In this example we do not restrict the check by organizational assignment. (For other examples, such as „high gross“ which may be different across personnel groups, that may make more sense.)

(18)

Customizing 12

Defining check instances – instance setup

We will walk through the „low retrocalculation“ check. The severance payments check is set up analogously, with the parameters shown on the previous slide.

Create a data source instance as shown on the right.

Give it a name and a short, name, and assign it to country grouping 10 for the US.

Select „Uses transparent payroll results.“

The type is the data source type we created earlier: Z_PYC_HRUS_GEN_WT_BT

(19)

Customizing 13

Defining check instances – instance parameters

Select „Instance input parameter“

In this example we set only the mandatory parameters we defined earlier: payroll area, wage type, lower limit, and upper limit.

Create parameter Z1LGART as shown on the right. The selection value is the wage type: /552. It has no currency or measurement unit, and those fields cannot be set.

Analogously, create the lower limit Z1AMT_LOW (selection value 0) and the upper limit Z1AMT_HIGH (selection value 100). The currency is set automatically as defined by us earlier.

Create the parameter ABKRS. The selection parameter should be an existing payroll area for which you have test data.

(20)
(21)

Structure of a check class

In order to implement our sample check, we need to define methods for:Execution of the check

Filling the overview tab on the UIFilling the wage type list on the UI

The employee header information is already filled in a standard class.

Keep the structure given on the right side in mind when following the example on the next slides.

Method structure:

Execute (find all employee that fail a given check): Retrieve the instance parameters SELECT employees from the database Return the results

Get overview/wage type list (for a single employee when selected in the UI): Retrieve the parameters

(22)

Code 1

Creating the check class

In this section we will create the runtime class for our check. You can either access it via the IMG step in which you created the data source type, or via transactions se24 or se80.

Create class ZCL_PYD_GENCHECK_WT_BETWEEN Inherit class CL_PYD_TY_PERNR_BASE

(23)

Code 2

Creating the attributes

First, we create the attributes that store the parameters we need for our check. That includes those parameters defined in the IMG as well as definitions for corresponding selection ranges.

Please note that for easier re-use and control this is given as code on the right side. For this part it is probably easier to work in the source code editor of transaction se24 rather than in the graphical interface.

You will note that some parameters are missing. For ease of reading we will not show all code on the right, but only the parts relevant for our discussion. Full sample code is attached at the end of this presentation.

PROTECTED SECTION.

DATA mt_range_bukrs TYPE RANGE OF bukrs. DATA mt_range_werks TYPE RANGE OF persa. DATA mt_range_persg TYPE RANGE OF persg. DATA mt_range_persk TYPE RANGE OF persk. DATA mv_amt_low TYPE maxbt.

DATA mv_amt_high TYPE maxbt. DATA mv_lgart TYPE lgart.

(24)

Code 3

The check method – getting the optional parameters

The check is executed via the EXECUTE method of interface IF_PYD_TY_RT. For our purposes, we need to redefine this method.

In the code on the right, all attributes are set first.

Then, we look for the optional parameter BUKRS that we defined in the IMG. If it is set, a selection range is set.

The other optional parameters are set accordingly.

CLASS ZCL_PYD_GENCHECK_WT_BETWEEN IMPLEMENTATION. METHOD if_pyd_ty_rt~execute.

super->if_pyd_ty_rt~execute( is_inst = is_inst is_ty = is_ty

it_par = it_par ).

FIELD-SYMBOLS <ls_exec_param> LIKE LINE OF mt_exec_parameters. LOOP AT mt_exec_parameters ASSIGNING <ls_exec_param>.

set_attribute( EXPORTING

iv_attribute_name = <ls_exec_param>-par_type iv_attribute_prefix = 'Z1' ).

ENDLOOP.

DATA ls_range_bukrs LIKE LINE OF mt_range_bukrs. IF mv_bukrs IS NOT INITIAL.

ls_range_bukrs-option = 'EQ'. ls_range_bukrs-sign = 'I'.

ls_range_bukrs-low = mv_bukrs.

(25)

Code 5

The check method – executing the check

Now, we have all parameters and selection ranges and can execute the check. With declustered tables, this is a simple SELECT statement.

The payroll results are stored in transparent table P2RX_RT, and they are still accessed via tables RGDIR and WPBP, but now in an SQL JOIN, and in a single statement.

In the WHERE clause you find a selection on exactly those parameters that we defined in the IMG.

All that is left now is to sort and return the list of personnel numbers we get from the SELECT.

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. ls_result-par_type = if_pyd_cont_types=>gcs_par_type-pernr.

(26)

Code 6

The overview method – retrieving data for the UI

Here, after retrieving data from the payroll area for the begin and end dates, we read infotype 8, and use it to fill an output table with salary data. This output table will be shown on the UI exactly as filled here.

See the code sample at the end for the full implementation using several infotypes and grouping the output.

METHOD get_generic_overview. […] lif_infotype_reader->read( EXPORTING tclas = 'A' pernr = mv_pernr infty = '0008' begda = lv_begda endda = lv_endda no_auth_check = abap_false IMPORTING infotype_tab = lt_infotype_tab data_exists = lv_data_exists ). IF lv_data_exists = abap_true. cl_hr_pnnnn_type_cast=>prelp_to_pnnnn_tab(

EXPORTING prelp_tab = lt_infotype_tab IMPORTING pnnnn_tab = lt_p0008 ). ENDIF.

lv_group_id = 'SALARY'. lv_group_name = 'Basic Pay'.

LOOP AT lt_p0008 ASSIGNING <ls_p0008>. ls_gov-text = 'Annual salary'.

ls_gov-value = <ls_p0008>-ansal. ls_gov-groupid = lv_group_id. […]

(27)

Code 7

The wage type list – retrieving data for the UI

Here, we retrieve the payroll results for an employee and append it to an output table. This output table will be shown in the Wage Type List tab on the UI. For a full implementation have a look at the attached code samples.

METHOD get_simple_wt_list. . […]

CLEAR rt_list.

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.

LOOP AT lt_rt INTO ls_rt.

ls_output_rt-text = ls_rt-lgart && ' - ' && ls_rt-lgtxt. ls_output_rt-amt = ls_rt-betrg.

ls_output_rt-num = ls_rt-anzhl. ls_output_rt-rte = ls_rt-betpe.

(28)

Sample Code

Sample code is attached to the note.

This code is split into two classes: some parts can be used in more than the wage type check only, and these are included in the class

(29)
(30)

© 2014 SAP AG or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG or an SAP affiliate company. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG (or an SAP affiliate company) in Germany and other countries. Please seehttp://global12.sap.com/corporate-en/legal/copyright/index.epxfor additional trademark information and notices. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP AG or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP AG or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP AG or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP AG or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP AG’s or its affiliated companies’ strategy and possible future

developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP AG or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

(31)

© 2014 SAP AG oder ein SAP-Konzernunternehmen.

Alle Rechte vorbehalten.

Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG oder ein SAP-Konzernunternehmen nicht gestattet.

SAP und andere in diesem Dokument erwähnte Produkte und Dienstleistungen von SAP sowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG (oder von einem SAP-Konzernunternehmen) in Deutschland und verschiedenen anderen Ländern weltweit. Weitere Hinweise und Informationen zum Markenrecht finden Sie unterhttp://global.sap.com/corporate-de/legal/copyright/index.epx.

Die von SAP AG oder deren Vertriebsfirmen angebotenen Softwareprodukte können Softwarekomponenten auch anderer Softwarehersteller enthalten. Produkte können länderspezifische Unterschiede aufweisen.

Die vorliegenden Unterlagen werden von der SAP AG oder einem SAP-Konzernunternehmen bereitgestellt und dienen ausschließlich zu Informationszwecken.

Die SAP AG oder ihre Konzernunternehmen übernehmen keinerlei Haftung oder Gewährleistung für Fehler oder Unvollständigkeiten in dieser Publikation. Die SAP AG oder ein SAP-Konzernunternehmen steht lediglich für Produkte und Dienstleistungen nach der Maßgabe ein, die in der Vereinbarung über die jeweiligen Produkte und Dienstleistungen ausdrücklich geregelt ist. Keine der hierin enthaltenen Informationen ist als zusätzliche Garantie zu interpretieren.

Insbesondere sind die SAP AG oder ihre Konzernunternehmen in keiner Weise verpflichtet, in dieser Publikation oder einer zugehörigen Präsentation dargestellte Geschäftsabläufe zu verfolgen oder hierin wiedergegebene Funktionen zu entwickeln oder zu veröffentlichen. Diese Publikation oder eine zugehörige Präsentation, die Strategie und etwaige künftige Entwicklungen, Produkte und/oder Plattformen der SAP AG oder ihrer Konzernunternehmen können von der SAP AG oder ihren Konzernunternehmen jederzeit und ohne Angabe von Gründen unangekündigt geändert werden.

References

Related documents

Four parts follow this introduction: the second section below delineates the context of planning education, with a specific focus on British HE; the third suggests how Freire’s

standard generic traps. For example, if we select ‘Equals’ and ‘4’ in the Result field, a trap will be created for authentication failures. a) Select the Check Condition from

HOURLY PAYROLL CHECK PROCESSING consists of simply entering in hours against each employee along with any one-time earnings or deductions and running the pre-check

Keywords: pilot, randomised trial, preterm birth, umbilical cord clamping, neonatal care at the bedside.. *

AD = Alzheimer’s disease; T2DM = Type2 Diabetes Mellitus; ADD = Antidiabetic drugs; ADDLs = Aβ-Derived Diffusible Ligands; Aβ = Amyloid β; BBB = Blood brain barrier; AMPK

Their responsibilities include scope and change management, keeping the project plan current (deliverables, schedule, and resources), issue and risk management, maintaining

To specify text as either a Header or Subheader, select the text you want to modify by pressing down your mouses' left button and holding it, sweep the text that you wish to

He defends himself by saying there was no way he was going back to his own time in that &#34;zoot suit.&#34; While they uncover the Delorean to prep it, Marty tells Doc how