The standard R/3 system provides different indirect valuation modules for determining the entry amounts of wage types. However, the existing modules may not meet the requirements of defaulting the number in the unit field. Instead, you can create a customer-specific indirect valuation module and use a standard Business Add-In to meet your requirement.
		
	
     
    
        Key Concept
        The SAP HR module uses indirect valuation modules to make the HR users’ job easier by performing tasks such as defaulting amounts and calculating the percentage of amounts based on base wage types. However, no indirect valuation module exists to default numbers in specified wage types in the number field. The technique explained in this article helps users to default the numbers for use in payroll calculations.
     
    
     Normally, payroll professionals use the indirect valuation modules such as PRZNT and SUMME to default the amount in any of the required wage types. However, some payroll users want to default some of the numbers that they use in payroll calculation. None of the standard indirect valuation modules are available for this purpose. 
Many payroll implementations include a requirement at the blueprint phase to default the amounts, values, and percentages using numbers or points. One such requirement is to capture 1.203,00 points as the disability insurance rate in wage type 9997. 
I’ll show you how to default the required number and unit in any wage types at the time of creation. This process involves simple configuration and a standard Business Add-In (BAdI). You can use this technique from R/3 Release 4.70 and up. 
Business Scenario 
Users want to store values that should default in the number field in some of the insurance wage types. For example, ABC company has the disability insurance rate of 1,203.00 points. The payroll team needs to store this rate as a number for employees who have chosen this component in their flexible benefit scheme. The payroll team must default this value in wage type 9997 as a number with some relevant units (points). 
To meet this requirement, you must perform a few configuration steps: 
Step 1. Create a new indirect valuation module. 
Step 2. Activate the BAdI. 
Step 3. Set the wage type characteristics. 
Step 4. Set the values in table T510K. 
A simple process flow (Figure 1) shows what happens in the front end and background after you configure the steps in the R/3 system. Note that the indirect valuation module functions in the background. 
 

Figure 1
Configuration process flow
This solution is easy to maintain because it requires no ABAP development except to activate a BAdI. In addition, you do not need to worry about version upgrades because standard BAdIs are supported. If the value of the default changes, you only need to access and change table T510K for defaults. Future payroll teams can create similar wage types with default numbers from table T510K by using this indirect valuation module. 
Configuration Steps 
Step 1. Create a new indirect valuation module. Create the customer-specific indirect valuation module. Go to transaction SPRO and follow menu path Personnel Management>Personnel Administration>Payroll data>Indirect valuation. Click on the New Entries button (Figure 2) and create an entry. Name the indirect valuation module with some business logic. In this case, I named it ANZHL because this module updates the ANZHL field in infotype 0015. When creating the indirect valuation module, avoid using the SAP standard names or modifying the existing modules. 
 

Figure 2
View the existing standard modules provided by the standard R/3 system
Next, go to transaction SPRO and follow menu path Personnel Management>Personnel Administration>Payroll Data>Additional Payments>Wage Types>Check Wage Type Catalog>Check wage type characteristics. Then, double-click on the required wage type (in this case, 9997). 
Configure the wage type characteristics with the following details (Figure 3): 
    - In the Amount tab, check the Deduction WT check box if you are using a deduction wage type 
 
    - In the Number/unit tab, enter Points in the Time unit/meas. field 
 
    - In the Input combination tab, enter * in both the Amount and Number/unit fields 
 
    - In the Indirect valuation tab, enter ANZHL as the indirect evaluation module 
 
 

Figure 3
Enter wage type 9997 details
Step 2. Activate the BAdI. Activate the BAdI in the implementation guide by following menu path SPRO>Personnel Management>Personnel Administration>Payroll Data>Indirect Valuation>BAdI: Maintain Indirect Valuation Module (Figure 4). Click on the create icon to create the BAdI with a customer-specific name. Name the BAdI starting with Z. I used the name ZHR_INDVAL. Next, enter the implementation short text with your naming logic (for example, ZHR_INDVAL). Define the filter as ANZHL. By defining this filter to ANZHL, you are activating the BAdI only for this indirect valuation module. Click on the green check mark (enter) icon. 
 

Figure 4
Create the BAdI with a customer-specific name
Go to the Interface tab in Figure 5 and double-click on the Method column. Use method DO_INDIRECT_VALUATION to define what you expect from this indirect valuation in ABAP code. For this example, insert the code in Figure 6. Then, activate the BAdI by clicking on the activate icon. 
 

Figure 5
Define the DO_INDIRECT_VALUATION method
 
    
        
            
            METHOD if_ex_hr_indval~do_indirect_valuation.   DATA: lw_510k TYPE t510k.  SELECT * INTO lw_510k FROM t510k     WHERE molga = molga     AND   lgart = lgart     ORDER BY PRIMARY KEY.   ENDSELECT.   IF sy-subrc EQ 0. * Set the selected value to VALUATION_OUTPUT     valuation_output-number = lw_510k-wert1.   ENDIF. ENDMETHOD.  
             | 
        
        
            | Figure 6  | 
            Code for BAdI | 
        
    
In the code in Figure 6, note that the T510K table includes ENDDA in the primary key. You must include ENDDA in the primary key to select the latest available value of the wage type with the end date 31/12/9999 in table T510K. ENDDA refers to the end date of the particular wage type. This lets the system choose the latest available default value for the given wage type. For example, if the value is 1 in the previous year and the current value is 2 with a start date as xx/xx/xxxx and end date as 31/12/9999, the system always chooses the value with the end date 31/12/9999. 
You should not use the construct SELECT SINGLE unless the entire key is specified with the equals operator. The user may choose to change the default value of a wage type (9997) over a period of time. This code should consider the time period. 
Step 3. Set the wage type characteristics. You need to maintain the required default values in the table T510K so only this BAdI refers to this table and defaults it in the front-end PA30 screen. You must maintain the values in table T510K for the required wage types. You could configure table T510K through transaction SPRO each time you set user parameters (for respective country grouping and country-specific table). For example, if your payroll runs for both Great Britain and Ireland, then you need to search for different nodes. The simplest way to configure this is to use transaction code SM31. This allows you to access the table directly. In the transaction code field, enter the table value as V_T510K. Select the Enter conditions button. Click on the Maintain button and enter the required country grouping as Figure 7 shows. In this case, I have chosen country grouping 08 (Great Britain). Payroll constants are country specific, so choose the relevant country grouping assigned to the company code. 
 

Figure 7
Maintain the country grouping
Step 4. Set the values in table T510K. Click on the New Entries button to enter the required default values for the 9997 wage type. Enter the values that Figure 8 shows. 
 

Figure 8
Enter the required default values for the 9997 wage type
If the values for the same wage type change, then you can delimit the previous entry and enter the new values for the same wage types with new dates. This might happen if the insurance provider changes the base value from 10 (which applies from 01/01/1990 to 01/01/2000) to 1.203,00 (which applies from 01/01/2000). For example, Figure 9 shows two values for wage type 9997 for these different dates. The user exit always defaults the values with end date 31/12/9999. 
 

Figure 9
The existing and delimited values of constant valuation of wage types
Finally, test the scenario using transaction PA30. To do so, select the personnel number. Enter the infotype code as 0015 and subtype as 9997, and then click on the create icon. The number field defaults from table T510K to the value 1.203,00. Figure 10 shows the result of this user exit. The existing and delimited values of constant valuation of wage types. 
 

Figure 10
The default value 1.203,00 when users create the record for an employee in the PA30 screen for wage type 9997 in infotype 0015
Maintenance Advice 
With this solution, users must update many existing infotype 0015 records whenever the insurance rate changes. Whenever there is a change in insurance rates, users can delimit the values in table T510K for the respective wage type and update them with the new value. To update the changed values of the same wage type for individual employees using the employee master record, you can generate a standard ad hoc query with personnel number, start date, and end date for a particular wage type. Based on this report, you can delimit the relative subtype of infotype 0015 and create the new wage type for employees through fast entry transaction PA71.
    
    
    
    
    
        Raghavendran Parthasarathy
        Raghavendran Parthasarathy works for Hexaware Technologies as a Principal Consultant,where he manages SAP solution design for customers across the globe. He has worked in SAP ERP HCM for over 14 years in various capacities, including payroll projects in the Middle East, Europe, and Asia/Pacific. In addition to payroll, Raghavendran has experience in negative time management, personnel administration, and recruitment. He has also been a part of portal implementations. Currently, he is involved with cloud-based HCM applications such as SAP SuccessFactors and Workday.
        
        
        
        
              You may contact the author at raghs99@yahoo.com. 
				   
            
                If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.