Functional Description
Purpose
This business function will duplicate a block of accounts from one business unit to another or to all
business units of a specified type. It will also duplicate any existing account translations to the
F0901D file for the new account.
Special Logic
JDB_SetLowerLimit is used in this business function instead of a JDB_SetSelection statement because
of the problem of copying all accounts (including those with blank or filled subsidiaries) within a
block of accounts specified by a beginning account and an ending account. An example of this would be to
copy all accounts within a range beginning with 1.1110.BEAR and ending with 1.1133 (excluding 1.1110
with a blank subsidiary). If SetSelection were used, data selection on the subsidiary would probably
be specified with a beginning and ending range (>= "BEAR" and <= 'blank'). Therefore, no records
would be selected because an impossible subsidiary value would be specified. This would also affect a
Select Structure specifying only accounts with subsidiaries >= 'BEAR'. Only accounts with subsidiaries
greater than or equal to 'BEAR' would be selected and all accounts with blank subsidiaries contained
within this block of accounts would be excluded. SetLowerLimit is used in this case to set the beginning
account for the block of accounts specified, in order to solve this problem.
Technical Specification
Processing
Main Program:
Return Errors if Invalid Data is passed in
If "To Business Unit" is specifed and "To Business Unit Type" and "Company" are blank
Fetch "To Business Unit"
Copy F0901 account records to one business unit only
If "To Company" is specified
While fetch of "To Business Units" is successful
Fetch next "To Business Unit"
Internal Function to Copy Accounts for each Business Unit:
If "From" object and subsidiary are specified
Select F0901 account records for "From Business Unit"
Fetch the next "From account"
While the account is within the specified range of accounts
Assign next number to new account ID
If "To Business Unit" is a model business unit
Write new F0901 account record for "To Business Unit"
If insert successful, increment number of new accounts written
Copy any matching F0901D Account Translations for the new account.
If next account is not within the specified range
D0900053 - Duplicate Business Unit
This business function will copy accounts to:
1) A single business unit if "To Business Unit" is specified.
2) Multiple corresponding business units for all companies if a NON-BLANK "Business Unit type" is
specified.
3) Multiple corresponding business units within one company if a NON-BLANK "Business Unit type" and
"Company" are specified.
4) Multiple corresponding simple business units within one company if a BLANK "Business Unit type"
and "Company" are specified.
(If an object/subsidiary range is not specified, all accounts in the "From Business Unit" will be
copied.)
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szCostCenterF | MCU | char | NONE | INPUT |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szCostCenterT | MCU | char | NONE | INPUT |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szCostCenterType | STYL | char | NONE | INPUT |
A user defined code (00/MC) that identifies the classification of the business unit. | ||||
szCompany | CO | char | NONE | INPUT |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
cLevelofDetail | LDA | char | NONE | INPUT |
A number used to summarize and classify accounts in the general ledger by level of detail. Level 9 is the most detailed and Level 1 is the
| ||||
szObjectFrom | OBJ | char | NONE | INPUT |
The portion of a general ledger account that refers to the division of the Cost Code (for example, labor, materials, and equipment) into
| ||||
szObjectThru | OBJ | char | NONE | INPUT |
The portion of a general ledger account that refers to the division of the Cost Code (for example, labor, materials, and equipment) into
| ||||
szSubsidiaryFrom | SUB | char | NONE | INPUT |
A subset of an object account. Subsidiary accounts include detailed records of the accounting activity for an object account. | ||||
szSubsidiaryThru | SUB | char | NONE | INPUT |
A subset of an object account. Subsidiary accounts include detailed records of the accounting activity for an object account. | ||||
cExistFlag | EV01 | char | NONE | OUTPUT |
A value of 1 is returned in this flag if at least one of the accounts specified to be copied already
| ||||
mnRecordsWritten | TOTALREC | MATH_NUMERIC | OPT | OUTPUT |
This number represents the total number of new records created. | ||||
szErrorCodeZeroAcctsCopied | ERNO | char | OPT | OUTPUT |
The error number assigned by the JDE edit/update programs designating the exact error that occured. | ||||
cExcludeConsolidBusUnits | EV02 | char | OPT | INPUT |
An option that specifies the type of processing for an event. |
B0000035 Compare Object/Subsidiary String | ||||
B9800100 Get Audit Information |
F0006 Business Unit Master | ||||
F0901 Account Master | ||||
F0901D Account Master - Alternate Description |