Sie sind auf Seite 1von 35

c  


   c    
 
c Y

An HR-Form often functions as an enterprise's business card, which means it requires an attractive
graphical design. The HR Forms will enable you in future to create flexible reports with an attractive
layout for HR master data, personnel time data, and payroll results. Therefore, it will be a central Human
ResourceYtool that enables you to select data from various sources in a uniform manner, which you can
then design and print. Y

J 

 Y

÷ Selecting data for HR forms


÷ Designing the layout of HR forms
÷ Activating HR forms
÷ Testing and correcting form printing
÷ Starting form printing

Ex   Y

The requirement of our client is to print a Remuneration Statement (Pay slip) using HR Forms, which
looks like the screen shot below: Y
Y

Go to the transaction PE51. The initial screen appears as the one below: Y
Y

In the above screen shot the country grouping is a unique indicator for a country that is used in the
Human Resources components of the R/3 System. The form name is the HR form which we have to
develop. In our case the standard form IN01 is copied to ZN02. For each HR form we have some sub
objects as we see in the screen shot above. Y

÷ Attributes Y
÷ Background Y
÷ Single fields Y
÷ Window Y
÷ Line layout Y
÷ Cumulative ID¶s Y
÷ Text Modules Y
÷ Rules Y
÷ DocumentationY

^Y  Y

The attributes are technical characteristics, like form name, form size, form class, as well as
administrative information on the form, like the person who changed the form last, when the change took
place, and so on. The system automatically sets the administrative information. Y
Y

Õ  Y

The form background contains information that is printed in the same position in the form and does not
vary. For example, the company¶s address, Logo of the company and others. Y

The form background is set up using lines. You must define all lines in a form. This means that lines
containing only individual fields or windows need to be defined as blank lines on the form background. In
our case, once the form IN01 is copied to ZN02. Go to the change mode of the form ZN02. The screen
would look like the one below. Remove / Add the extra lines as per the requirement. Y
YYY

èse page up / page down and forward / backward buttons to view the rest of the page. After making
changes to the form as per required, it would look like the one below Y
Y
^Y Jx Y

These are the individual fixed texts that have to appear on the form. These can be the description of the
fields, which appear on the pay slip like Name, ID, Pay period etc« For creating the text modules, from
the initial screen of PE51, select the radio button text modules and click on change. Add each of them as
shown below.Y

Y

^Y Ô   Y

These contain information that is always printed in the same position but can vary. For example, on the
pay slip the Employee ID, name, department, Location, Bank Account number and so on will change from
employee to employee. So these are to be kept in single fields. The text modules created above should
also be placed using the single fields. Placing a field on the form is simple. From the initial screen of
PE51, select the radio button Single field and click on change. Now place the cursor at the position where
you want to add a single field. For example, if you want to add the text module µName¶ on the form. Place
the cursor at that position and double click at that position. You can find a pop-up as follows: Y
Õ  Y

The form background contains information that is printed in the same position in the form and does not
vary. For example, the company¶s address, Logo of the company and others. Y

The form background is set up using lines. You must define all lines in a form. This means that lines
containing only individual fields or windows need to be defined as blank lines on the form background. In
our case, once the form IN01 is copied to ZN02. Go to the change mode of the form ZN02. The screen
would look like the one below. Remove / Add the extra lines as per the requirement. Y
YYY

èse page up / page down and forward / backward buttons to view the rest of the page. After making
changes to the form as per required, it would look like the one below Y
Y
^Y Jx Y

These are the individual fixed texts that have to appear on the form. These can be the description of the
fields, which appear on the pay slip like Name, ID, Pay period etc« For creating the text modules, from
the initial screen of PE51, select the radio button text modules and click on change. Add each of them as
shown below.Y

Y

^Y Ô   Y

These contain information that is always printed in the same position but can vary. For example, on the
pay slip the Employee ID, name, department, Location, Bank Account number and so on will change from
employee to employee. So these are to be kept in single fields. The text modules created above should
also be placed using the single fields. Placing a field on the form is simple. From the initial screen of
PE51, select the radio button Single field and click on change. Now place the cursor at the position where
you want to add a single field. For example, if you want to add the text module µName¶ on the form. Place
the cursor at that position and double click at that position. You can find a pop-up as follows: Y
2   

Select the radio button Text Module, take the F4 help and select the text, which you want to place. You
can specify the output length of it if required. Y

Now if you have to place a field from the table P0001 against the text µName¶. Follow the same procedure.
But in the pop-up select the radio button Table field and give the table name and field to consider as in
the screen shot below. Y
Y

In the same way, as per required place the other fields also on the form. Finally it would appear like the one
below:
Y

^Y Y

An HR form can contain more than one window. A window is a particular area within a form. Y

Information in a window is only printed on the form if there is a value in the data record at the Y
time of evaluation. The quantity of information can vary, depending on whether or not the required
information exists at the time of the evaluation. For example, values for a wage type may exist in the
payroll result for one personnel number but not for other. If the information was printed in a individual
field, the form would therefore be printed with gaps. To avoid this, this type of information is usually
printed in a window. Y

In order to align the windows on the form, from the initial screen of PE51, select the radio button Window
and click on change. Right Click on the form and select the option window overview. And set the positions
as required. After setting the window positions it would look like the one below: Y

Y
After positioning the windows, double click on each window to see the window group which comes as a
pop-up as this: Y
Y

The above screen shot is for the Window 1 i.e., Earnings window. If you double Click on Group ± 01, we
can see the different fields, which have to be populated in this window. For the Earnings window the
following fields are added. The user can add additional fields or can remove unnecessary fields from this.
The screen shot of these fields would look like the one below: Y
Y
Follow the same procedure for rest of the windows too. Y

The report µHINCEDT0¶ can be executed to see the output of this R/3 form. The output of this would look
like this. Y
Y

This R/3 form is being used by smart form µHR_ESS_PAYSLIP_TO_PDF¶ to convert the output in PDF
format. The standard smart form µHR_ESS_PAYSLIP_TO_PDF¶ is copied to
µZHR_ESS_PAYSLIP_TO_PDF¶ and the main window is adjusted so that the data in the form gets fixed
into it properly. To see the output of PDF form µZHR_ESS_PAYSLIP_TO_PDF¶, use transaction
µPZ11_PDF¶. You can only execute this transaction from SE93 since it¶s an Easy web transaction. Finally,
the output in the PDF format would be as follows: Y
Y
Note: Y

The prerequisites to achieve this scenario: Y

÷ The form ZN02 created above should be attached to the report µHINCEDT0¶.
÷ HR master data should be maintained in the system.
÷ If we want to report on the payroll Results then we should make sure that the Payroll should be
completed successfully.
÷ One should know which data is required to create the form, and also must know which SAP
÷ System tables are used to store the data.
÷ If the data is stored in customer tables or info types, it means data is maintained in the metadata.
c 
c  
 

  
By Ribhu Ahuja, TCS

Suppose your requirement for payslip through PE51 involves certain fields which are not there in CRT,
RT or ZRT or other payroll tables, and you want to show the same in your payslip, you can do so by
customer enhancement in the standard program ± HINCEDT0 and making necessary alterations in your
PE51 form. (SAP ECC 6.0). Y

Let us proceed with our payslip design in PE51 (This tutorial does not cover the design part of payslip in
PE51. For that, please visit  )Suppose we want to show a running number on the payslips of
various employees during mass printing of the payslips (1 for first processed employee, 2 for second
processed employee) and License Plate Numbers of employee in our payslip, which is stored in Infotype
0032 - Internal Data, field KFZKZ. Y

The main program which comes into picture for payslip generation through tcodes PC00_M40_CALC and
PC00_M40_CEDT is HINCEDT0. We would have to make a Z enhancement for the same. Go to
Transaction SE38 and open report HINCEDT0 in display mode. Y
Y

Double click on include rpcedsz9 (form routines for customer modifications). It will take you to the include
program. Click on the , button on the top and it will show all the enhancements. Y

Y
Next, click on edit -> Enhancement Operations -> Show Implicit Enhancement Operations. Y
Y
Choose or double click on HINCEDT0 as shown. Y

Y
It shows various enhancement points with arrows: Y
Y

We can write our code in these enhancement points by creating an enhancement and an implementation
of the same. These various forms are called either one time (e.g. Form INIT-MOD), or once for every
personnel number called during payslip program (e.g. Form INIT_SOS-MOD) or once for every processed
personnel number (e.g. Form FILL-ZK-MOD). You can find out the same by putting a break point on
these forms and running pc00_m40_cedt and pc00_m40_calc. As per our requirement, we want to
increase counter of serial number for every PERNR processed and fetch pa0032- KFZKZ, so we would
use the Form FILL-ZK-MOD. Right click on FILL-ZK-MOD and click Enhancement Implementation ->
create. Y

Y
Choose Code for the type of Enhancement. Y

Y
It asks for the Enhancement implementation and Composite Enhancement Implementation. Give let's say
zenhancement for Enhancement Implementation and click on create button. Y

Y
Give zmainenhancement* as Composite Enhancement Implementation and click on the green tick mark.
Y

In the form FILL-ZK-MOD, write the following code in ENHANCEMENT and END-ENHANCEMENT: Y
data tt type i. Y

data tt1 type i. Y

data: begin of itab occurs 0, Y

number1 type char4, Y

end of itab. Y

data itl like line of itab. Y

IMPORT ITAB FROM MEMORY ID 'rab1'. Y

READ TABLE ITAB INTO ITL INDEX 1. Y

ITL-number1 = ITL-number1 + 1. INSERT ITL INTO ITAB INDEX 1. Y

LOOP AT ITAB INTO ITL. Y

IF SY-TABIX NE 1. Y

DELETE ITAB INDEX SY-TABIX. Y

ENDIF. Y

ENDLOOP. Y

FREE MEMORY ID 'rab1'. Y

EXPORT ITAB TO MEMORY ID 'rab1'. Y

read table itab index 1 into itl. Y

P0185-GRPVL = itl-number1. " We will store sequence number here in str. P0185 Y

select single * from pa0057 into corresponding fields of p0057 where begda le PN-BEGDA and endda ge
pn-endda and pernr = pernr-pernr. Y

select single * from pa0581 into CORRESPONDING FIELDS OF p0581 where begda le PN-BEGDA and
endda ge pn-endda and pernr = pernr-pernr. Y

select single * from pa0032 into CORRESPONDING FIELDS OF p0032 where begda le PN-BEGDA and
endda ge pn-endda and pernr = pernr-pernr. Y

Now save and activate the code and go to transaction pe51_checktab. Here, in this T code, we will put
the additional structures p0185, p0057, p0581 and p0032 and their respective fields, so they become
available in pe51 - payslip form designing. Y
Y

In country grouping, give 40 (India) and in form class, give CEDT (payslip) and click on change button as
shown. Y

It gives a pop up message. Click on the green tick mark. Y

Y
Now we see the following screen: Y
Y
Click on the create button. Let us add say P0032 structure and a field KFZKZ here and you can similarly
add your required structures and fields. Put µp0032¶ in table column; check all the three check boxes and
give description in description column, as shown. Y

Y
Next, click on the fields tab and enter the values after clicking on insert button. Y
Y
Now, lets change the payslip in transaction PE51 or rather add the newly available fields in transaction
PE51. Give form name in PE51 and click Change: Y
Y

On the next screen, click on the "Next Screen" button, to go to the single fields screen, as shown below. Y

Y
On the next screen, click on the add button to add the newly available field: Y
Next, make the entry of table p0032, field KFZKZ as shown. Y

Y
As we click on the green tick mark, the field adds up in our payslip on desired location. Y
Y

Similarly add all the fields you want to show in the payslip output. Now, Lets take a look at info type 32 of
say an employee ± 2007: Y

The License Plate Number is 111111. Now let¶s run the payroll by using t code PC00_M40_CEDT. Give
the values as shown and click on the execute button. Y
Y
As we run the payslip program, we see the following output, which is according to our requirement. Y

Y
Important ± If you want to check the payslip of any employee or bring it on to your Smart form, you can
use FM µGET_PAYSLIP¶. Go to SE37 and give fm name as µget_payslip¶. Click on display. Y
Y
Click on execute and give the following values as shown: Y

Y
Following is the output: Y

Double click on . Hence we see the output of the generated


payslip: Y

Das könnte Ihnen auch gefallen