Thursday, June 19, 2008

BSFN: ValidateAccountNumber (XX0901)

BSFN: ValidateAccountNumber

Account Number (alias=ANI) were very frequent used field in G/L side, unlike the other common alias out there ... ANI is a bit different.

ANI can be in any form and any length, most commonly setting were the "MCU.OBJ.SUB" combination.

So when comes to validation of Account Number, things were a bit complex.

I found this Business Function were quite handy in doing this job:
XX0901 (ValidateAccountNumber)

However it's a bit tricky to use, after looking at the parameter notes, I able to figure out how to make use of it for validation.

Example ER:

ValidateAccountNumber
[FC Account Number] -> [BF mnAccountNumber]
[VA evt_mnF0901_AID] <- [BF mnAccountID]
"7" -> [BF cBaseCode]
"1" -> [BF cFormatCode]

F0901.FetchSingle
[VA evt_mnF0901_AID] = [BF mnAccountID]

[VA evt_szF0901_OBJ] <- [BF ObjectAccount]

If [SV File_Status] equal to [CO_SUCCESS]
MDDebug
"Valid Account Number" -> [BF szComment]
[VA evt_mnF0901_AID] -> [BF String1]

Else
MDDebug
"Invalid Account Number" -> [BF szComment]
[VA evt_mnF0901_AID] -> [BF String1]

End If


by Avatar Ng
2008/06/19

No comments: