SAP HR TIPS – Infotype 1018 Cost Distribution





BAPIHR1018 is a standard SAP table available within R/3 SAP systems depending on your version and release level. Below is the standard documentation available for this table and a few details of the fields which make up this table. You can view this information and more if you enter the table name BAPIHR1018 into the relevant SAP transaction such as SE11 or SE80. You can also view the data contained in this database table via these transactions or alternatively use transaction SE16
Within the comments section below there is also an opportunity for anyone to be able add useful hints and information specific to this SAP object. This means that you and other users will be able to find these details quickly by simply searching on the object name BAPIHR1018 .

By: se80.co.uk



SAP HR TIPS – Get user email from RH data in SAP





When sending one email, sometimes you use SY-UNAME as reference so this is the desired select:

select single usrid usrid_long  from pa0105
where pernr eq SY-UNAME
and subty eq 9003 (ASK HR Manager)
and begda le sy-datum
and endda ge sy-datum.

if usrid is empty use usrid_long

endselect.

And it’s this,

any doubts just post

Tags: ,



SAP HR TIPS – Hold Loan Deduction for a Specific Period





If an employee has a loan and he can’t pay for a specific month. How can I stop loan deduction for that month?

You would do as follows:

SPRO->PA->Payroll data->Recurring payments and deductions-> Wage types-> Create wage types catalog
Select Delete (don’t worry you won’t delete).
Select your loan under Wage type column, uncheck Test run, and at the bottom of the screen, you would select the radio button: Limit Wage type acc to time until (enter the date you want it to be delimited here).
Then highight your loan and press delete (don’t worry, it won’t delete, but will give an end date).
You will see message that it has been updated in all the wage type tables etc such as:
T511, T512W, T512Z etc.

Now go to check wage type text and you will see loan has an end date of ….what was entered above.

Now go to Check entry permissibility per infotype and you will see wage type has an end date. You don’t need to do anything, these are just checks.

Then go to Check Define wage type permissibility for each PS and ESG you will see: loan has a delimit date.

Now go to Check Wage type characteristics, you will see: loan has a delimit date.

Now in PA30 if you try to create infotype 14 with a start date later than the delimit date, it will not be available. That will be your test that it is no longer available.

When you want to make it available again, I think you would just need to copy it in the first step with start date of what you want and end date of 12/31/9999.

I have delimited a loan successfully and it works.

By : Bela Pathak

Tags: , , ,



SAP HR TIPS – Short Overview of SAP Payroll





Schemas and Functions

In SAP Payroll, functions provide the high-level logic for payroll calculations. Functions perform general processing – such as calculating payroll taxes on a given set of wages, reading wagetypes from specific infotypes, calculating benefits premiums, and storing the results of the payroll calculation. There are dozens of functions in SAP payroll, some are country-specific and others are not. Each function is defined and documented via transaction PE04; you can also view the function documentation via transaction PDSY in releases 4.5 and greater, or with report RPDSYS00 in earlier versions.

In SAP HR terms, a payroll function is not the same as an ABAP function. A payroll function does consist of ABAP code, but it is not executed in the same way an ABAP function would be. Payroll functions are executed within a schema by the payroll driver program (let’s assume RPCALCU0).

A schema is just a collection of functions executed in a specific order – each one passing its results on to the next. Schemas are always created and edited via transaction PE01, but are actually stored as a collection of rows in tables T52C0 (SAP standard schemas) and T52C1 (customer-created schemas and modified SAP-standard schemas). The payroll driver reads the lines in T52C0/T52C1 and executes the functions one by one.

So how do we make the leap from a payroll function stored in a table to the execution of ABAP code to get the work done? In transaction PE04 you can see the ABAP code associated with every function. The function name in the schema correlates to an ABAP form – for example payroll function WPBP maps to the ABAP form ‘fuwpbp’; function USTAX maps to form ‘fuustax’. So when the payroll driver is executing the schema, it takes the function name from the current row in schema, puts an ‘fu’ on the beginning of the name, and then does a ‘perform’ statement on it. It’s a very simple and elegant design.

Wage Types

In a broad sense, a wagetype simply holds a piece of data – a rate, number, and/or amount. But more specifically, a wagetype has dozens of attributes that control how it is manipulated and processed. In the end though, it ends up as an object in the payroll results database that stores a rate, number, and/or amount.

The most typical use of a wagetype is to store the amounts of earnings, deductions and taxes in an employee’s paycheck. A person’s base pay is stored in a wagetype, the amount of their United Way deduction is stored in a wagetype, and their taxable wages & taxes are stored in wagetypes. Wagetypes, as the primary data element for employee paychecks, are also mapped to FI/CO accounts to record the debits and credits resulting from the paycheck and reported on the W-2 and other tax forms.

Wagetypes can also be used to store statistical data – such as the number of hours worked in a pay period, the average weekly wages for the past six months, or the amount of wages eligible for a profit sharing calculation. Wagetype attributes are stored in several tables, but the central table is T512W. Much more time will be spent on various aspects of T512W.

There are three categories of wagetypes – model, technical, and user. Model wagetypes are delivered by SAP for customers to use as guidelines for creating their own wagetypes. They always start with a letter and SAP may add, delete or update them in system upgrades or HRSP’s. Technical wagetypes always start with the ‘/’ symbol, and are delivered by SAP. They are intended for very specific standard processing in payroll, and while you can modify them, SAP may also update them during upgrades or HRSP’s. So if you ever (I mean EVER) change a technical wagetype, check it after each upgrade or HRSP to make sure it still has the attributes you want. And never delete a technical wagetype. User wagetypes always start with a number – and these are wagetypes that SAP does not change during upgrades & HRSP’s. OK, SAP rarely changes them in upgrades and HRSP’s. User wagetypes are for all the company-specific payroll payments and deductions.

Rules and Operations

A long-time client of ours once created a screen-saver message that stated ‘Payroll Rules!’. Those of us who were experienced SAP Payroll analysts or consultants immediately saw the double meaning, and corny humor, in that message. Rules contain the most basic logic used in SAP Payroll. Where a schema is a collection of functions, a rule is a collection of operations. An operation is a very basic piece of logic that is used, mostly, to manipulate wagetypes. For example, operation MULTI multiplies the number and rate fields of a wagetype to determine the amount to pay an employee.

Operation OUTWP retrieves specific data about an employee so that another operation can make a decision on how to process it. For example, if the work contract on infotype 1 is UA then do ‘x’, if it is UB then do ‘y’, otherwise do ‘z’.

Operations can also be viewed in transactions PE04 and PDSY, and are edited with transaction PE02. Where a function’s ABAP equivalent form starts with ‘fu’, an operation’s ABAP form starts with ‘op’. For example, operation MULTI would have an ABAP form ‘opmulti’. Rules, like schemas, are stored in a table – rules are stored in T52C5.

The more senior SAP consultants who have been working with computer systems for many years often find similarities between payroll rules and programming mainframe computers in Assembly language. While there is nothing fancy about operations, when used correctly together they can be very powerful.

By: sap-img.com

Tags: , , ,



SAP HR TIPS – Personnel Areas/SubAreas





Personnel Areas

123 Groups

1000-1                                2000-1                        3000-1
Personnel Areas
1000-Location-1  1100-Location-2                       3000-Location-1   3100-Location-2

A personnel area is a Personnel Administration specific unit and is the subunit of the company code.  The individual personnel areas in a company code have four digit alphanumeric idetifiers.  The pesonnel areas within a client must be clear.

The personnel area has the following functions :-
1.  It allows you to generate default values for data entry, for e.g. for the payroll accounting area.
2.  It is a selection criteria for reporting.
3.  It constitutes a unit in authorization checks.

Personnel Subareas

123 Groups
1000-Country                    2000-Country              3000-Country
1000-1                              2000-1                        3000-1
1000-Location-1  1100-Location-2                              3000-Location-1   3100-Location-2

Personnel SubAreas                   1101         1102                             3001
Head Office  Production                     Sales

The principal organizational aspects of human resources are controlled at this level, namely the pay scale and wage, type structures and the planning of work schedules.

The main organizational functions of the peronnel subarea are as follows:-
1.  To specify the country grouping.  Master data entry and the setting up and processing of wage types
and pay scale groups in payroll depend on the country grouping.  The grouping must be unique
within a company code.
2.  To assign a legal person which differentiates between companies in legal terms.
3.  To set groupings for Time Mangement so that work schedules and substitution, absence and leave
types can be set up for individual personnel subareas.
4.  To generate a default pay scale type and area for an emplyee’s basic pay.
5.  To define a public holiday calendar.
6.  To define subarea-specific wage types for each personnel area.

Personnel Structure
For administrative purposes, the employees in an enterprise are divided into two levels.
1.  The highest level is an employee group, the second, employee subgroup.
2.  These levels are subject to authorization checks, to define remuneration levels or different work
schedules, for e.g.

By : sap-img.com

Tags: , , ,



SAP HR Tips





What are the reports involved in payroll?

Kindly note down the some of the reports used in payroll 

1) You can use report RPCSC000 (Scheduler for Parallel Accounting) to split the personnel numbers into small sets and run payroll in parallel in the background. In this way you reduce the payroll runtime. 

2) To create payroll jobs call the Scheduling of Payroll Jobs report (RPCPRC10) using this function.

3) Rreport RPCDTBX0 (Preliminary Data Medium Exchange Program for Separate Payment Run) has to be created for a preliminary document for a wage types 

4) Use Report RPUCTP00 (Generation of Payroll Periods) to generate the payroll periods for every period parameter that you have assigned to a payroll area

5) Check the payroll results for an employee using the report Displaying the Payroll Results H99_DISPLAY_PAYRESULT). You can use this report to display the contents of all tables in which the system has saved data for the employee’s payroll result.

6) RPDLGA20  report generates a list of the wage types available for a selected country.             *– Somasekhar 

How to add a logo into HR sapscripts?

- create the logo and save it in baseline tiff6 format ie logo.tiff
- from sap menu choose – tools,abap workbench and choose abap editor.
- in the program field, enter RSTXLDMC
- execute
- determine the location of logo.tiff
- in the file name field enter the name with it’s location – unix file names are case sensitive.
- in the type field, enter the appropriate type.bmon black and white, bcol = colour
- in the text name field, enter zhex-macro-logo
- execute
- upload may take a while
- at the end of the protocol zhex-macro-logo id st language en saved succesfully message is necessary.
- back 4 times to main menu.
- tools-word processing- standard text
- in the text name field choose zhex-macro-logo
- choose display
- check the standard text

Now to add it.
- tools-word processing-form
- enter form name
- choose page layout and change
- add the logo_window it will be displayed in
- in the logo_window code section choose insert from top menu bar
- insert-text-standard, put in your logo name, zhex_macro-logo
- execute or enter

List of Employees Who Have Completed Certain Yrs of Service

*&---------------------------------------------------------------------* *& Report  ZPV003HR_ANIV_EMP                                            *&---------------------------------------------------------------------* REPORT  zpv003hr_aniv_emp  . TABLES: pernr. INFOTYPES: 0002,            0001. DATA: age TYPE d,       serv TYPE d,       curdate TYPE d. DATA: years TYPE d,       enddate TYPE d . DATA: BEGIN OF int_empinfo OCCURS 0,         pernr LIKE p0002-pernr,         nachn LIKE p0002-nachn,         vorna LIKE p0002-vorna,         gbdat LIKE p0002-gbdat,         begda LIKE p0001-begda,         emp_age   TYPE d,         emp_serv  TYPE d,       END OF int_empinfo. SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001. PARAMETERS: 5_years RADIOBUTTON GROUP g1  DEFAULT 'X',             10_years RADIOBUTTON GROUP g1,             15_years RADIOBUTTON GROUP g1. *curdate type d DEFAULT '00050101' . SELECTION-SCREEN END OF BLOCK block1. START-OF-SELECTION .   IF 5_years = 'X'.     curdate = '00050101'.   ELSEIF 10_years = 'X'.     curdate = '00100101'.   ELSEIF 15_years = 'X'.     curdate = '00150101'.   ENDIF. GET pernr.   PERFORM get_0002.   PERFORM get_0001.   IF int_empinfo-emp_serv NE '00000000'.     APPEND int_empinfo.   ENDIF. END-OF-SELECTION.   IF int_empinfo[] IS INITIAL. WRITE:/ 'NO EMPLOYEE WITH', curdate+2(2), 'YEARS OF  SERVICE' COLOR 6   .   ENDIF.   PERFORM write_empinfo. *&---------------------------------------------------------------------* *&      Form  get_0002 *&---------------------------------------------------------------------* *       text *----------------------------------------------------------------------* *  -->  p1        text *  <--  p2        text *----------------------------------------------------------------------* FORM get_0002 .   rp-provide-from-last p0002 space pn-begda pn-endda.   IF pnp-sw-found EQ '1'. "record found     age   = sy-datum - p0002-gbdat.     MOVE:            p0002-pernr TO int_empinfo-pernr,            p0002-vorna TO int_empinfo-vorna,            p0002-nachn TO int_empinfo-nachn,            p0002-gbdat TO int_empinfo-gbdat,            age TO int_empinfo-emp_age.   ELSE.     REJECT.   ENDIF. ENDFORM.                                                    " get_0002 *&---------------------------------------------------------------------* *&      Form  write_empinfo *&---------------------------------------------------------------------* *       text *----------------------------------------------------------------------* *  -->  p1        text *  <--  p2        text *----------------------------------------------------------------------* FORM write_empinfo .   LOOP AT int_empinfo.     WRITE:/             int_empinfo-pernr,            20  int_empinfo-nachn,            35  int_empinfo-vorna,            50  int_empinfo-gbdat,            75  int_empinfo-emp_age+2(2),            85  int_empinfo-emp_serv+2(2) .   ENDLOOP. ENDFORM.                    " write_empinfo *&---------------------------------------------------------------------* *&      Form  get_1001 *&---------------------------------------------------------------------* *       text *----------------------------------------------------------------------* *  -->  p1        text *  <--  p2        text *----------------------------------------------------------------------* FORM get_0001 .   rp-provide-from-last p0001 space pn-begda pn-endda.   IF pnp-sw-found EQ '1'. "record found     enddate = p0001-endda .     years = sy-datum - p0001-begda.     IF years > curdate AND enddate >= '99991231' .       MOVE:              years TO int_empinfo-emp_serv.     ENDIF.   ELSE.     REJECT.   ENDIF. ENDFORM.                                                    " get_1001 TOP-OF-PAGE.   WRITE:/               'EMP_PERNR',              20  'LAST_NAME',              35  'FIRST_NAME',              50  'DOB',              75  'EMP_AGE',              85  'EMP_SERVICE' . ULINE.

With Compliment: Phani Varada

Tags: , ,

Copyright © 2010 ABOUT SAP. All rights reserved.