Functional Description
Purpose
This function is to be used from the address book master business function. It will edit the tax id
for search types of A,E,X,Q based on Country and Search Type.
Setup Notes and Prerequisites
Address Number is required for this function.
Special Logic
Technical Specification
Parameters:
Data Item Data StructureDescriptionI/ORequiredNotes
AN8mnAddressNumberI/OYes
AT1szSearchTypeIYes
DTAIszErrorCodeONoSends back number of Error Code to be
called.
EV01cSuppressErrorINoInput 1 for no error calls within BSFN
SSNszSocialSecurityNumberIYes
CTRszCountryIYes
Processing:
BF szErrorCode = ""
// ******************************************************************************
// Only edit on HR search Types
// ******************************************************************************
If BF szSearchType is equal to "A,E,Q,X"
// ******************************************************************************
// If the address book application is not called from P0801, the country code is
// blank. If this is the case use the country for payroll retrieved from the
// F060116
// ******************************************************************************
If BF szCountry is equal to
VA evt_TableHandleF060116_HF06 = F060116.Open Handle
F060116(VA evt_TableHandleF060116_HF06).Fetch Single
F060116(VA evt_TableHandleF060116_HF06).Close
End If
// ******************************************************************************
// Editing Based on Country
// ******************************************************************************
If BF szCountry is equal to "US" Or BF szCountry is equal to
// ******************************************************************************
// US
// ******************************************************************************
HRM Tax ID Edit - USA
If VA evt_cUSTaxEditError_EV01 is equal to "1"
// Blanks Error
If BF szSocialSecurityNumber is equal to
Or BF szSocialSecurityNumber is equal to
// ******************************************************************************
// Editing Based on Search Type - Blanks allowed for all but E,X
// ******************************************************************************
If BF szSearchType is equal to "E,X"
If BF cSuppressError is equal to "1"
BF szErrorCode = "046D"
Else
Set NER Error(046D, BF szSocialSecurityNumber)
End If
End If
Else
// Length Error
If BF cSuppressError is equal to "1"
BF szErrorCode = "2104"
Else
Set NER Error("2104", BF szSocialSecurityNumber)
End If
End If
End If
Else
// ******************************************************************************
// Canada
// ******************************************************************************
If BF szCountry is equal to "CA"
HRM Tax ID Edit - CA
If VA evt_cCATaxEditError_EV01 is equal to "1"
// Blank Error
If BF szSocialSecurityNumber is equal to
equal to
// ******************************************************************************
// Editing Based on Search Type - Blanks allowed for all but E,X
// ******************************************************************************
If BF szSearchType is equal to "E,X"
If BF cSuppressError is equal to "1"
BF szErrorCode = "046D"
Else
Set NER Error(046D, BF szSocialSecurityNumber)
End If
End If
Else
// Length Error
If BF cSuppressError is equal to "1"
BF szErrorCode = "2104"
Else
Set NER Error("2104", BF szSocialSecurityNumber)
End If
End If
Else
// Check Digit Error
If VA evt_cCATaxEditError_EV01 is equal to "2"
If BF cSuppressError is equal to "1"
BF szErrorCode = "2189"
Else
Set NER Error("2189", BF szSocialSecurityNumber)
End If
End If
End If
Else
If BF szCountry is equal to "AU,NZ"
BF szSocialSecurityNumber = ""
Else
// ******************************************************************************
// Other - Localization
// ******************************************************************************
N0800015 - Plug and Play
End If
End If
End If
End If
D0800274 - HRM Tax Id Edit with Search Type
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnAddressNumber | AN8 | MATH_NUMERIC | REQ | INPUT |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
szSearchType | AT1 | char | REQ | INPUT |
A user defined code (01/ST) that specifies the kind of address book record to search for. Examples include:
E
Employees
X
Ex-employees
| ||||
szSocialSecurityNumber | SSN | char | OPT | BOTH |
A number that indicates the tax ID. In the United States, the tax ID is the social security number. In Canada, it is the social insurance number.
| ||||
szCountry | CTR | char | OPT | INPUT |
A user defined code (00/CN) that identifies a country. The country code has no effect on currency conversion.
The Address Book system
| ||||
cSuppressError | EV01 | char | OPT | INPUT |
An option that specifies the type of processing for an event. | ||||
szErrorCode | DTAI | char | OPT | OUTPUT |
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or
|
None |
None |