Retrieve value for calculated HR Wage Types with SAP
When looking at infotypes via PA20 you may see a value in a particular wage type which may not exist when you read the infotype from within your program. This could be because this particular wage type is calculated rather than input directaly into the infotype. The following code allows you to retrieve the actual value of the wage from within you program. There is example code for infotypes 0008 and 0014 but the code may be slightly different for other infotypes
*Code used for retrieving wage value from infotype 0008 data: gd_bet01 type pad_amt7s. constants: c_molga type molga value '08'. "Value can be retrieved dynamically SELECT SINGLE betrg INTO gd_bet01 FROM t510 WHERE molga = c_molga AND trfar = p0008-trfar AND trfgb = p0008-trfgb AND trfgr = p0008-trfgr AND begda <= p0015-begda AND endda >= p0015-begda. *Code used for retrieving wage value from infotype 0014 data: gd_bet01 type pad_amt7s. constants: c_molga type molga value '08'. "Value can be retrieved dynamically SELECT SINGLE betrg INTO ld_bet01 FROM t510 WHERE molga = c_molga AND trfar = p0008-trfar AND trfgb = p0008-trfgb AND lgart = wa_p0014-lgart AND begda <= wa_p0014-begda AND endda >= wa_p0014-begda.
Related Articles
Retrieving SAP HR wage type cost assignments for infotype records - IT0014