SAP Function RP_25_MAP_ER_ADDRESS - Mapping ER address from T500P to the format required by tax authority

Parameter Reference Type Length Default Optional Text
SUBAREA T500P-PERSA C 4 Personnel Area

Parameter Reference Type Length Text
BLOCKNUMBER P0006-HSNMR C 10 House Number
POSTALCODE P0006-PSTLZ C 10 Postal Code
RETURNCODE SYST-SUBRC I 4 Return value, return value after ABAP statements
STORYNUMBER P0006-FLOOR C 10 Floor in building
STREETNAME T512G-GTEXT C 255 Line in Form
UNITNUMBER P0006-POSTA C 10 Identification of an apartment in a building

Parameter Reference Length Optional Text
I500P T500P 171 Personnel Areas

Functionality
This function maps company's address in table T500P to a formatrequired by Singapore's tax authority in IR21 report. It calls anotherfunction, i.e. RP_25_MAP_ADDRESS, which will perform the parsing andmapping operations.
Return code would be one of the following:
'0' succesful
'4' warning (all fields would be returned in StreetName)
'8' unsuccesful (most likely due to data unavailability)

Example
In Table T500P:
House number/street (T500P-STRAS) : 750A Chai Chee Road #07-00
Zip Code (T500P-PSTLZ) : 469001
Output:
BlockNumber : 750A
StoryNumber : 07
UnitNumber : 00
StreetName : Chai Chee Road
PostalCode : 469001
ReturnCode : 0

Notes
In order to get correct storey number and unit number, a hash sign('#') must be used exclusively to precede the storey number and ahyphen sign ('-') must be used exclusively to precede the unit number.
A correct block/house number can be obtained by putting block/housenumber before the street name. Characters 'BLOCK' or 'BLK' can be usedto precede the block number, but they are not required.

Further information
Documentation of function module RP_25_MAP_ADDRESS.