GetBankCountryCode

Get Bank Country Code

Minor Business Rule

Object Name: N0001202

Parent DLL: CFIN

Location: Client/Server

Language: NER

Functional Description

Purpose

The purpose of this business function is to return the Country Code Associated with a Bank Account.


Setup Notes and Prerequisites


Special Logic

Fetching Bank Account information from the F0030:

The business function has four different modes that are used to determine how to fetch the Bank 

Account Record from the F0030 table.  Mode '1' will use the Unique Key ID.  Mode '2' will use the Record 

Type and the Account ID (and Business Unit if the Record Type is M); this is used for G/L Bank Account 

with Record Type G and M.  Mode '3' will use the Record Type and the Address Number (this should be the 

account owners Address Number) for example Record Type 'V' and the suppliers Address number.  If the 

business function is not passed one of these three modes it will not fetch from the F0030 and rely on 

the information passed in from the calling object.  This is useful for situations when the calling 

object has already fetched the F0030 record and only needs to call this function to determine the Country 

Code associated with the bank account.


Hierarchy for retuning the bank account country Code:

First, the Country Code is stored in the F0030 or passed in that value will be used. If the country 

code is not available the banks address number will be used to obtain the banks country code.  If the 

banks address number is not available, the account owners address number will be used to obtain the 

banks country code.


Technical Specification


Parameters


Alias:  EV01

Data Item:  cFetchF0030Mode_EV01

Input/Output:  Input

Instruction:  Pass blank, '1', '2', or '3'.  This is used to determine how data will be fetched from 

the F0030 table.  Blank will indicate that no data will be fetched form the F0030.  If the mode is '1' 

then the Unique Key ID will be used.  If the mode is '2' then the Record Type and the Account ID will 

be used (Business Unit will also be used for 'M' Type Records).  If the mode is '3' Record Type and 

Address Number will be used.


Alias:  UKID

Data Item:  mnUniqueBankIDNumber_UKID

Input/Output:  Input

Instruction:  This is a required field when the Mode is '1'.

                

Alias:  AID

Data Item:  szGLBankAccountIDNumber_AID

Input/Output:  Input

Instruction:  This is a required field when the Mode is '2' or none for G/L Bank Accounts.


Alias:  MCU

Data Item:  szCostCenter_MCU

Input/Output:  Input

Instruction:  This is a required field when the Mode is '2' and the Record Type is 'M'.


Alias:  BKTP

Data Item:  cBankTransitRecordType_BKTP

Input/Output:  Input

Instruction:  This is a required field when the Mode is '2' and '3'.


Alias:  AN8

Data Item:  mnBankAcctOwnerAddressNum_AN8

Input/Output:  Input

Instruction:  This is a required field when the Mode is blank and the not a G/L Bank Account.


Alias:  AN8BK

Data Item:  mnBankAcctAddressNumber_AN8BK

Input/Output:  Input

Instruction:  This address number associated with the bank and not a customer of that bank branch.


Alias:  CTR

Data Item:  szBankCountryCode_CTR

Input/Output:  Input/Output

Instruction:  If the calling object was already fetched the F0030 record this could be passed in by 

the calling function, but in most cases will be output.


Related Tables

Bank Transit Master - F0030


Related Functions

F0901 Get Account Company - B0400009

F0010 Get Company Address - B0000047

F0116 Get Effective Address - B0100033

Get UDC Description - N0800031


Processing





Data Structure

D0001202 - Get Bank Country Code

Parameter NameData ItemData TypeReq/OptI/O/Both
cFetchF0030Mode_EV01EV01charOPTINPUT

Pass a value of:
'0' - no fetch to the F0030 table, use the values passed into the data structure only.

'1' - Use the Bank Unique ID to fetch the F0030 record.

'2' - Use the GL Bank Account ID and Business Unit, to fetch the F0030 record.

'3' - Use the Bank Account Owners address book number, to fetch the F0030 record.

mnUniqueBankIDNumber_UKIDUKIDMATH_NUMERICOPTINPUT

This is only used if the Fetch Mode is '1'.

szGLBankAccountIDNumber_AIDAIDcharOPTINPUT

This is used if the bank record is a G/L bank account record, this can be used with fetch mode 2 or 0.  The account AID 
will be used to get the bank accounts company number, and the company number will be used to get the Company 

Address Book number.

szCostCenter_MCUMCUcharOPTINPUT

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

cBankTransitRecordType_BKTPBKTPcharOPTINPUT

A code that distinguishes external bank accounts from internal bank accounts. Valid values are: B  Valid bank transit numbers C  Customer 
bank accounts D  Default bank account for Accounts Receivable drafts and auto debits G  Internal general ledger bank accounts H Dutch bank 
accounts M  General ledger bank account and business unit that is used to define print information in Accounts Payable payments  P Auto 
reciepts payor V  Supplier bank account for payment via bank tape X Alternate bank account for a supplier Y Multiple bank accounts for a 
supplier Note: When you use bank type B, no other bank types are allowed. When you use bank type V, no other V bank types are allowed. When you 
use bank type D, no other D bank types are allowed.

mnBankAcctOwnerAddressNum_AN8AN8MATH_NUMERICOPTINPUT

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

mnBankAcctAddressNumber_AN8BKAN8BKMATH_NUMERICOPTINPUT

The address book number of the bank.

szBankCountryCode_CTRCTRcharOPTBOTH

A user defined code (00/CN) that identifies a country. The country code has no effect on currency conversion. The Address Book system 
uses the country code for data selection and address formatting.

Related Functions

None

Related Tables

None