1.Functional Description
1.1Purpose
This function will use cache to Verify that the sum of the Percentages of the suppliers at any given
date is equal to 100, otherwise it will return an error.
1.2 Setup Notes and Prerequisites
Cache Action Code
'D' Delete - delete a cache element.
'T' Terminate - terminate cache (PercentCache)
't' Terminate - terminate cache (TotalCache)
'V' Verify that the total of the percentages at any given date within and including effective
from and effective thru is 100 otherwise issue an error.
This function creates two caches Percent cache and total cache. The function appends the input Job
Number string to the two character ID 'JD' and 'AN8' to build the two cache names used for the
calling application.
2.Technical Specifications
Cache Layout:Cache includes all of the following fields; key fields are noted.
Cache : Percent Cache
Data Item Data Structure DescriptionKey Field
AN8mnAddressNumberY
EFFFjdEffectiveFromDateY
EFFTjdEffectiveThruDate
VSPCmnSplitpercentage
Cache2 : Total Cache
JDEDATE jdDate;
MATH_NUMERIC mnTotal;
Data Item Data Structure DescriptionKey Field
JDEDATEjdDateY
MATH_NUMERICmnTotal
I.Perform setup functions
B.If not successful, set error "032E", set Cache Error Code = '2', and return failure.
C.Set Cache Error Code = '0'
D.Set return code to success.
II.Processing Based on Mode.
A.If Cache Action Code is 'A' CACHE_ADD:
2.If jdeCacheAdd fails to add the element return CACHE_ERROR.
2.If Delete fails set error"032E", Return CACHE_ERROR.
2.If Terminate fails set error "032E", Return CACHE_ERROR.
2.If Terminate fails set error "032E" , return CACHE_ERROR.
2.If Open is succesfull, add all the dates in the Percent cache (Effective from and Effective
Through + 1) to the Total Cache.
3.The last date in the total cache should not be processed so we need to remove it from the total
cache. To do this we loop through all the dates and take one day from the last date.
4.Now we loop through all the dates in the Percent cache and through all the dates in the Total
Cache (inner loop) if the date in the Total cache is within effective from and effective thru
accumulate the total cache.
5.Now we loop through all Total Cache Dates . If all the corresponding totals are equal to 100
return PERCENT_SUCCESS. If One (or more ) of the totals is not equal to 100 return PERCENT_ERROR.
6.Note that during the call to VERIFY_PERCENT any call to a cache API that fails, we return a
CACHE_ERROR.
^
D3401350 - Verify Supplier Percentages
Data Item Data Structure DescriptionI/ORequiredNotes
JOB Job Number I/OY Job Number as string for
cache name
AN8 Address Number IN
EFFF Effective from (Date) IN
EFFT Effective Thru (Date) IN
VSPC Percent Split IN Used to calculate the total
percentage
EV01 Cache Action Code IY 'A' adds the cache
'D' deletes the cache
'T' terminates the
PercentCache
't' terminates the TotalCache
'V' verifies that the total
of the
percentages is 100.
EV01 ErrorSuccessMessage ON '0' = Success
'1' = Percent Error
'2' = Cache Error
INT01 Number of Keys IN Number of Keys to be used in
the
cache process. It is
initialized to
2.
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnAddressNumber | 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
| ||||
mnSplitpercentage | VSPC | MATH_NUMERIC | NONE | NONE |
The percentage applied.
For Suppler Release Scheduling: The percentage of the planned quantity that the system applies to the
| ||||
jdEffectiveFromDate | EFFF | JDEDATE | NONE | NONE |
A date that indicates one of the following:
o When a component part goes into effect on a bill of material
o When a routing step goes into
| ||||
jdEffectiveThruDate | EFFT | JDEDATE | NONE | NONE |
A date that indicates one of the following:
o When a component part is no longer in effect on a bill of material
o When a routing step is no
| ||||
cErrorSuccessMessage | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
nNumberOfKeys | INT01 | integer | NONE | NONE |
Number of Days in Future to Query for Responses Due. | ||||
cActionCode | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szJobNumber | JOB | char | NONE | NONE |
Job Number | ||||
mnTotalPercentage | TOTOW | MATH_NUMERIC | NONE | NONE |
The total of the period percentage amounts for the Depreciation Spread Pattern. |
None |
None |