SAP Function RP_GET_EMP_REF - Get Employer Reference number (Malaysia)

Parameter Reference Type Length Default Optional Text
BEG_DATE T5LSR-BEGDA D 8 SY-DATUM X Begin of validity period
END_DATE T5LSR-ENDDA D 8 SY-DATUM X End of validity period
ST001 P0001 u 322 Structure of the valid Infotype 01 record
TX_OFF_CODE T5LTO-TXOFF C 4 X Tax office code for Malaysia
TYPE T5LSR-CTGRY C 1 Type 'S'-SOCSO, 'T'-Tax and 'E'-EPF.

Parameter Reference Type Length Text
EMP_REF_NO T5LSP-ERRNS C 20 Employer reference number
PAYEE_TEXT T521B-EMFNA C 25 Payee name
PAY_KEY T5LSP-EMFSL C 8 Payee key for transfers

Exception Text
TABLE_ENTRY_NOT_FOUND Entry not found in table T5LSP
TYPE_ERROR Type undefined

Functionality
The function module reads the Personnel area and subareagrouping from the table T5L0P, and Employee group and subgroupgrouping from the table T5L03. Depending on the type parameter itreturns the Payee key and the Employer reference number for taxSOCSO or EPF from the corresponding table T5LTP T5LTO, T5LSP orT5LEP.
This funtion module returns the employer reference number andthe payee key for SOCSO, EPF or Tax for Malaysia. The function modulealso returns the payee name.
The input parameters are :
(1) Infotype 0001 record of the employee
(2) the validity period (optional)
(3) the type S, T or E depending on SOCSO, Tax or EPF respectively.
(4) the tax office code necessary to read the employer refernce fortax however optional for others

Example

Call function 'RP_GET_EMP_REF'
exporting
st001 = P0001
type = 'T'
beg_date = my_begda
end_date = my_endda
tx_off_code = my_txoff
importing
emp_ref_no = my_erref
pay_key = my_emfsl
payee_text = py_name
exceptions
table_entry_not_found = 1
type_error = 2
others = 3.