Customer fiedls in payslip (PE51)
The printing of the payslip in the Payroll module of SAP (HR-PY) is performed through RPCEDTE0 report for Spain (with RPCEDTX0 programs in other countries, where X corresponds to the country, for example, P Portugal; U : USA, G England, etc.). The maintenance of the forms is from the transaction PE51, where we have different sections of receipt where we want to paint the display information to employees regarding their pay.
Basically we have the following items in a typical form:
For if we have the need to include new fields that are not in the standard, Sap leaves a door open in the print program through the includes:The technology is a bit old receipts and quite limited in the face of the inclusion of new fields or fields incorporating capital calculated in a special way, as well as with regard to the design of the form (including images or logos, files signature, etc.).
Background: fixed texts that appear on the form and are always printed.
Individual fields: information is always printed in the same place, and that will vary by employer we are trying (for example, employee number, name, address, social security number, total payment, etc).
Window: section for printing the salary (table). Lines are defined by defining the concepts that include print and format (arrangement of lines).
Line arrangement: format for printing the salary in the window.
Accumulation Identifiers: totalizamos accumulators where different elements of pay (eg accruals, deductions, withholding, social security, etc.) and you can also use the form for printing.
Texts: definition of texts may then be used in the form.
Rules: We do not allow printing or certain information if certain rules.
RPCEDDZ9: include for defining data structures.
RPCEDSZ9: include programming for filling these new data structures or additional routines.
These includes can define fields or data structures that later use in the form, and Abap code for filling those fields.
Besides programming, you have to perform additional customizing to tell the system to these new fields are available and in place of receipts that we will be able to use. To do this, use the transaction PE51_CHECKTAB.
PRACTICAL EXAMPLE: NEW ADDRESS FIELDS FOR EMPLOYEE WORKPLACE.
We created in infotype 6 addresses a new kind of leadership, Z1 where we will store the address of the place of work of employees who are not in the
headquarters of the company (which is what remains at the Divisional / Branch staff ). We then perform the change of the includes:
Include RPCEDDZ9: include the record where we will store the address data recovered of the employee.
DATA: BEGIN OF Z500P,
STRAS TYPE T500P-STRAS,
PSTLZ TYPE T500P-PSTLZ,
ORT01 TYPE T500P-ORT01,
END OF Z500P.
FORM POS-FIX-DATA-MOD USING $FOUND LIKE BOOLEAN
FLD_INFO TYPE TR_FLD_INFO.
$FOUND = TRUE.
PERFORM fill_z500p using wpbp.
This is not enough to make the field available at the time of designing the form. For new fields are visible, the tables must be parameterized T514, Through PE51_CHECKTAB transaction. For Spain payroll forms, we will work with countries grouper 04 and Form class CEDT.
In this case, being a record with multiple fields, we will include it in the Tables section (Field flag marking the individual, which is the section of the form where you use). Also, we will include each of the fields in the Fields section. Once the parameterization, we can edit the form and position in the desired new fields.
ADDITIONAL NOTE: We can also use the include RPCEDSZ9 (CHECK_PRINT_MOD routine) to include additional selection criteria in the printing of payslips (to select the value in the field AZ Print current period). We can, for example, create a routine that only print payroll for which payment has been made or any similar funcionality.