B03B0075
F03B16 Balance Stats History
Functional Description
Purpose
This business function will update balance and statistical information in the Account Statistical
History file (F03B16) and the Account Statistic Summary file (F03B16S).
Setup Notes and Prerequisites
This should be called immediately after the Update Statistic History UBE (R03B16) has completed.
Special Logic
This business function should only select records out of the F03B16 that have the Net Change Amount
(CHGA) set to a value not equal to 0. The AN8 and CO parameters are optional. If sent then only F03B16
records for that AN8 and CO should be processed.
Technical Specifications
Parameters
ItemDescriptionI/OReq?Notes
AN8 Customer NumberICustomer to be processed.
CO Company NumberICompany to be processed.
EV01 DSO MethodIReqDSO Method.
MATH01 DSO PeriodsIReqPeriods to include in DSO calc.
CTRY mnCenturyI
FY mnFiscalYearI
PN mnPeriodNoI
Related Tables
F03B16Account Statistic History
F03B16SAccount Statistic Summary
F03B08Credit/Collection Date Pattern
Related Business Functions
B03B0042Retrieve Company Constants - Aging
B03B0137F03B11 As Of Aging Summary
B9800100Get Audit Information
N03B0135F03012 Retrieve Credit and Collection Manager
JDEAPPApplications Global Definitions - include file only
Processing
While Fetch on RBAL is Successful
SetSelection F03B16 (RBAL <> 0)
SelectKeyed
Fetch F03B16 returning AN8, CO, FY, PN and RBAL
SetSelection F03B16 (AN8, CO, FY >=, PN >=)
SelectKeyed
While Fetch F03B16
If RBAL = 2 <== Meaning that this is a new F03B16 record.
Call Subroutine to fetch Previous ending balance. Returning Prev Ending Balance
ENBL = prev periods ENBL + Change Amount
Move '1' to RBAL field
Else
ENBL = current ENBL + Change Amount
End If
Move ENBL to Previous Ending Balance
Move '1' to RBAL field
Update F03B16 record
Write Record to Cache
Fetch Next F03B16
End While
End While
Subroutine
SetSelection F03B16 (AN8, CO, FY <, PN <)
SelectKeyed
Fetch F03B16 returning FY, PN and ENBL
If SUCCESS
Return Ending Balance = ENBL
Call Subroutine Determine if there is a gap in periods
Retrieve F03B08 Record on FY and Company and return to array
If Not Successful and CO <> '00000'
Retrieve F03B08 Record on FY and Zero Company and return to array
End If
If Successful Fetch
If FY of Subroutine record = FY of the main processing record
counter = Subroutine period
While Continue
Counter + 1
If Array[counter].Period = Main Record Period
End Loop
Else
If Array[counter].Period <> 0
ENBL = Previous ENBL
Write F03B16 Record
Write Record to Cache
End If
End If
End While
Else
Retrieve F03B08 Record on Subroutine FY and Company and return to array
If Not Successful and CO <> '00000'
Retrieve F03B08 Record on Subroutine FY and Zero Company and return to array
End If
If Successful Fetch
counter = Subroutine period
While Continue
Counter + 1
If Array[counter].Period <> 0
ENBL = Previous ENBL
Write F03B16 Record
Write Record to Cache
Else
If Main Record Period = 1
End Loop
Else
Counter2 = 0
While Counter2 <> Main Record Period
Counter2 + 1
ENBL = Previous ENBL
Write F03B16 Record
Write Record to Cache
End While
End If
End If
End While
Else
ERROR
End If
Else
ERROR
End If
Else
Return Ending Balance = 0
End If
^
D03B0075 - F03B16BalanceStatsHist
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnCustomer_Number | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
szCompany | CO | char | NONE | NONE |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
cDSOMethod | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnDSOPeriods | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnCentury | CTRY | MATH_NUMERIC | NONE | NONE |
The calendar century associated with the year. Enter is the first two digits of
the year. For example, 19 indicates any year beginning with 19
| ||||
mnFiscalYear | FY | MATH_NUMERIC | NONE | NONE |
A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal
| ||||
mnPeriodNo | PN | MATH_NUMERIC | NONE | NONE |
A number indicating the current accounting period. This number, used in conjunction with the Company Constants table (F0010) and the
|
B03B0042 Retrieve Company Constants - Aging | ||||
B03B0137 F03B11 As Of Aging Summary | ||||
B9800100 Get Audit Information |
F03B16 A/R Statistical History | ||||
F03B16S A/R Statistical Summary |