This note is to explain possible issue you may face in running P4314 (Voucher Match). So to debug issue in P4314, this document shall explain,
This note is to help you to analyze CallObject kernel log in your running P4314 (Voucher Match).
P4314 - Voucher Match
|--- W0411G - [Supplier Ledger Inquiry]
|--- W4314A - [Voucher Match]
|--- W4314B/W4314C - [Select Receipts/Orders to Match]
|--- W4314A - [Voucher Match]
: For this example, information selected in W4314B/W4314C is to be stored as cache (VMCache) and that cache can be used in W4314A. In adding a new line, E1 treats it as 2 way voucher match so either it update exiting Purchase Order or add a new order line
In running the voucher match application, tables F4301/F4311/F43121/F0411/F0911 and Master Business Function (XT4311Z1/XT4311Z2, XT4314ZN/XT4314Z2, B0400047 and B0900049) which to write these table are to be called/configured as below,
Form & Master/Cache Functions in P4314 | Source Module | Cache | Used For | |||||
---|---|---|---|---|---|---|---|---|
W4314A - [Voucher Match] | ||||||||
XT4314ZN | F4314BeginDoc | Initialize routine: validate header information and get valid next number. Get AP/GL JobNumber and Cache is to be created based on this job number. Document number is to be acquired in this routine | ||||||
B0400047 | F0411FSBeginDoc | Initialize AP routine and Initialize Cache F04UI001 | ||||||
B0900049 | F0911FSBeginDoc | Initialize GL routine and Initialize Cache I09UI002 | ||||||
W4314B/W4314C - [Select Receipts to Match] | ||||||||
B4302450 | CacheProcessTempVoucherCache | szCacheActionCode = 1 (Get) -> FAIL Cache Name B4302450D + JobNumber |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |||||
XT4314ZN XT4314Z2 |
F4314EditLine | Validate detail lines and create it into cache 1. Initialize Cache B4302450A + JobNumber |
||||||
B0400047 | F0411FSEditLine | Create AP Detail Cache CacheName = F04UI002 + JobNumber |
||||||
B4302450 | CacheProcessVoucherMatchCache | szCacheActionCode = 7 to Add Cache into B4302450B | Initialize VM Match Cache | |||||
B4302450 | CacheProcessTempVoucherCache | szCacheActionCode = 5 to open cursor B4302450D | ||||||
B4302450 | CacheProcessVoucherMatchCache | szCacheActionCode = 6 to Fetch Existing Cache from D4302450A | ||||||
B4302450 | CacheProcessTempVoucherCache | szCacheActionCode = 2 to add cache into B4302450D | ||||||
B4302450 | CacheProcessVoucherMatchErrorMsg | szCacheActionCode = 1 to close cursor of B4302450B | Only when Tolerance check is required CacheName=B4302450B+JobNumber |
|||||
W4314A - [Voucher Match] | ||||||||
B4302450 | CacheProcessVoucherMatchCache | szCacheActionCode = 6 to fetch existing cache from B4302450A | ||||||
XT4314ZN XT4314Z2 |
F4314EditLine | CacheName = B4302450A + JobNumber | This routine is to explain new line in W4314A screen. This additional line is considered 2-way voucher match so depends on the value you populate it calls master business function XT4311Z1/XT4311Z2 | |||||
XT4311Z1 XT4311Z2 |
F4311EditLine | JobNumber + XT4311Z1C | ||||||
B0001060 | RetrieveProcessAndTransactionID | This function is to return IPC (Inter-Communication Process ID) which is same with callobjeck kernal process ID. | ||||||
XT4311Z1 | F4311FSBeginDoc | whenever b4302180 adds cache, same information is to be added into XT4311Z1C+JobNumber | This function gets called when Begin Doc is not called previously (or when Header Cache is missing) Validate header and call B4302180 to handle cache. This routine is different from Purchase Order creation through P4310 |
|||||
xxx | xxx | xxx | xxx | B4302180 | CacheProcessPOHeaderCache | szCacheActionCode_CACTN = 2 to add cache into B4302180F + PEID + TCID Continue cache action with codes, 1 - Cache Get 3 - Cache Update |
This routine is to create PO Header Cache. Since this gets called when user to add additional rows in Grid this cache is independent against existing order | |
B4302180 | CacheProcessPODetailCache | szCacheActionCode_CACTN = 1 to Get from B4302180G + PEID + TCID (FAIL -> Issue Error '078M' | ||||||
B4302180 | CacheProcessPODetailCache | szCacheActionCode_CACTN = 7 to add PO Detail Cache into B4302180G + PEID + TCID | ||||||
B4302180 | CacheProcessPODetailCache | szCacheActionCode_CACTN = 1 to Get from B4302180G + PEID + TCID (SUCCESS) | ||||||
B0400047 | F0411FSEditLine | Check existing cache from F04UI001 and F04UI002 and add cache for new line | Validate and create AP cache for newly added row | |||||
B4302450 | CacheProcessVoucherMatchCache | szCacheActionCode = 7 to add additinal line into cursor of cache name B4302450A + JobNumber | ||||||
XT4314ZN | F4314EditDoc | 1st check B4302450A whether there is any VM Cache or not 2nd check F04UI001 cache before get account number and call F0911FSEditLine 3rd read F04UI001 again because for this example there are 2 detail lines (SUCESS) |
Validate header/detail caches before End Doc routine gets called and create GL Cache because Edit Line routine did not handle this | |||||
B4000350 | RetrieveDistributionAAI | To get valid account information which is to be used F0911FSEditLine routine | ||||||
B0900049 | F0911FSEditLine | I09UI002 gets initialized through Begin Doc routine so there is a record in it Add cache for additiona AP line and update cache |
||||||
B4302450 | CacheProcessVoucherMatchCache | szCacheActionCode = 3 to update Cache B4302450A | This cache action need to take place before F0911FSEditLine gets called so depends on number of rows this routine is to be repeated | |||||
B4302450 | CacheProcessVoucherMatchCache | szCacheActionCode = 6 to read/get next cache from B4302450A (SUCESS) | ||||||
B0900049 | F0911FSEditLine | Look for cache for I09UI002 (SUCESS) Look for cache for I09UI003 (SUCESS) Add cache for I09UI003 Update cache for I09UI002 |
To validate/create GL Cache for 2nd row which is newly added | |||||
B0400047 | F0411FSEditDoc | Read Cache F04UI001 (SUCESS) Then update Cache F04UI001 |
||||||
B0900049 | F0911FSEditDoc | Read Cache I09UI002 then update it | ||||||
B4302450 | CacheProcessTempVoucherCache | szCacheActionCode = 5 to delete all the cache B4302450D because this is only meant for error handling | ||||||
XT4314ZN | F4314EndDoc | MANUAL COMMIT in your clicking OK button to handle commitment in Processing boundaries. Commit VM Cache to DB | ||||||
B4302450 | CacheProcessVoucherMatchCache | szCacheActionCode = 6 to check whether there is any available cache from B4302450A | then 1. Update F43121 2. insert a new record into F43121 to indicate Voucher is matched (MATC = 2) 3. Update F4311T . All these action is done by F4314EndDoc |
|||||
B4302450 | CacheProcessVoucherMatchCache | szCacheActionCode = 6 to continue to get cache from B4302450A (this routine is to handle newly added 2 way voucher match) | ||||||
XT4311Z1 | F4311EndDoc | Commit PO Detail Cache to DB | ||||||
B4302180 | CacheProcessPODetailCache | szCacheActionCode_CACTN = 6 to read cache from B4302180F | If it fails error will be appeared on screen "Fetch from Cache "APJobNumber + B4302180F + PEID + TCID" | |||||
B4302180 | CacheProcessPODetailCache | szCacheActionCode_CACTN = 6 to read cache from B4302180G | If it fails error will be appeared on screen "Fetch from Cache "APJobNumber + B4302180G + PEID + TCID" | |||||
B4302180 | CacheProcessPODetailCache | szCacheActionCode_CACTN = 1 to get Detail Cache from B4302180G, which issue error '078N' with cSuppressErrorMessages_EV01 = 1. So this is to indicate all the cache in B4302180G has been read | ||||||
B4302180 | CacheProcessPODetailCache | szCacheActionCode_CACTN = 1 with different index (SUCESS) | then 1. Insert a new record into F4311 based on PO Detail Cache from B4302180G 2. (Optional) Update F0902 3. Insert F43199 4. Process Job Cost Transaction (if needed) 5. (Optional) Insert F4311T if Job Cost has to be updated |
|||||
B4302180 | CacheProcessPODetailCache | szCacheActionCode_CACTN = 6 to fetch cache from B4302180G against Line Number 2.000 if failes issue 078N with cSuppressErrorMessage_EV01 = 1 and exit from routine to check PO Detail Cache | ||||||
B4302180 | CacheProcessPOHeaderCache | szCacheActionCode_CACTN = 1 to get PO Header cache from B4302180F | Repeat this action till end of cache | |||||
B4302180 | CacheProcessPOHeaderCache | szCacheActionCode_CACTN = 3 to update PO header cache B4302180G | then update F4301 based on PO Header cache B4302180F | |||||
XT4311Z1 | F4311ClearWorkFiles | Delete XT4311Z1C cache if any | Terminte Cache created through PO Creation XT4311Z1C B4302180F B4302180G |
|||||
B4302180 | CacheProcessPOHeaderCache | 1. CacheAction 1 to determine the existence of PO Header Cache (if sucess then) 2. Cache Action 5 to delete all PO Header Cache |
||||||
B4302180 | CacheProcessCostTypeCache | Cache Name B4302180H but this cache is not utilized (exit) | ||||||
B4302180 | CacheProcessPODetailCache | 1. CacheAction 1 to determine the existence of PO Detail Cache (if sucess then) 2. Cache Action 5 to delete all PO Detail Cache |
||||||
B4302180 | CacheProcessPOHeaderCache | szCacheActionCode_CACTN = 6 to Fetch a record from cache B4302180G, which is to be failed because all the cache are deleted above return error '078N' with cSuppressErrorMessage_EV01 1 | ||||||
XT4311Z1 | F4311ClearWorkFiles | This has been called by F4311EndDoc routine so this code is redundant but underneath routine is worth while to review how it handled | ||||||
B4302180 | CacheProcessPOHeaderCache | Cache Action 6 -> Fail (exit) because B4302180F has been deleted above | ||||||
B4302180 | CacheProcessPOHeaderCache | Cache Action 9 -> To terminate all the cache used in routine (fail) because no cache to terminate | ||||||
B4302450 | CacheProcessVoucherMatchCache | 1st., szCacheActionCode = 6 to fetch cache from B4302450A (there are 2 records) | ||||||
XT4314ZN | F4314ClearWorkFile | To terminate voucher match cache B4302450A | ||||||
B4302450 | CacheProcessVoucherMatchCache | 2nd., szCacheActionCode = 5 to delete all the cache from B4302450A | ||||||
B4302450 | CacheProcessVoucherMatchErrorMsg | szCacheActionCode = 5 to delete all the caches from B4302450B | ||||||
B0400047 | F0411FSEndDoc | Read F04UI001 Read F04UI002 Insert F0411 based on F04UI001/F04UI002 Update F0401 |
||||||
B0400047 | F0411FSClearStack | Clear Cache F04UI001 and F04UI002 | ||||||
B0400047 | F0411FSClearStack | This is redundant routine because all the AP cache were deleted in F0411FSEndDoc routine | ||||||
B0900049 | F0911FSEndDoc | 1. Read I09UI002 (1 record) 2. Insert F0901 (2 times for credit/debit) 3. Read I09UI003 (2 records) |
||||||
B0900049 | F0911FSClearStack | I09UI002 and I09UI003 | Terminate all caches from I09UI002 and I09UI003 |
For this example,
Note: Refer to NOTE:1265902.1 - E1: BSFN: Master Business Function in EnterpriseOne
There are two major business functions to store data temporarily as below,
A. Functions within B4302180 (Purchase Order Cache Server)
: This function is to store information in a certain routine needs to store Purchase Order Information temporarily. Currently B4302180 is made up of below functions,
Function Name | Description | Template Name | Cache Name | Used For |
---|---|---|---|---|
CacheProcessPurchaseOrderCache | Purchase Order Cache Server Function | D4302180A | PO_CACHE_NAME | |
SerialNumberCacheProcess | Serial Number Cache | D4302180B | SERIALNUMBER_NAME | |
RealtimeEventCacheProcess | EventID Cache Server Function | D4302180C | EVENT_CACHE | |
VocherRealtimeEventCacheProcess | Voucher EventID Cache Server | D4302180D | VOUCHER_EVENT_CACHE | |
CacheProcessPOHeaderCache | Purchase Order Header Cache Function | D4302180F | PO_HEADER_CACHE | In adding new lines in W4314A PO Header is to be stored |
CacheProcessPODetailCache | Purchase Order Detail Cache Function | D4302180G | PO_DETAIL_CACHE | In adding new lines PO Detail Information is to be stored |
CacheProcessBlanketCache | Purchase Order Blanket Cache Function | D4302180H | PO_BLANKET_CACHE | |
CacheProcessOrderProcOptions | Cache Process Order Processing Options | D4302180I | PO_PROCOPT_CACHE | xxxxxxxxxxxxxxxxxxx |
CacheProcessAccountCache | Purchase Order Account Cache Function | D4302180J | PO_ACCOUNT_CACHE | |
CacheProcessCostTypeCache | Purchase Order Cost Type Cache Function | D4302180K | PO_COSTTYPE_CACHE |
B. Functions within B4302450 (Voucher Match Cache Processing)
Function Name | Description | Template Name | Cache Name | Used From |
---|---|---|---|---|
CacheProcessVoucherMatchCache | Process Voucher Match Cache | D4302450A | VoucherMatchCacheProcessing | This is tempoary repository to store VM Cache |
CacheProcessVoucherMatchErrorMsg | Process Voucher Match Error Msg | D4302450B | CacheProcessVoucherMatchErrorMsg | In checking tolerance, this cache stores it |
CacheProcessDetailVoucherCache | Process Detail Voucher Cache | D4302450C | CacheProcessDetailVoucherCache | |
CacheProcessTempVoucherCache | Process Temp Voucher Cache | D4302450D | CacheProcessTempVoucherCache | |
CacheProcessSummaryVoucherCache | Process Summary Voucher Cache | D4302450E | CacheProcessSummaryVoucherCache | |
ProgressPaymentWorkWithCache | Progress Payment Work With Cache | D4302450F | ProgressPaymentWorkWithCache | |
CreateInvoiceCache | Create Invoice for Order or receipt | D4302450G | ||
CacheProcessMultipleVoucherCache | Process Multiple Acount Cache | D4302450H | VM_MULTIPLE_CACHE | |
CacheProcessVoucherMatchCacheExt | Process Voucher Match CacheExt | D4302450I |
As we can see above, the same business function can be called multiple times with different cache action codes. The way it handles cache is same with what you can implement through Table I/O,
Cache Action | Input Mode |
---|---|
CACHE_GET | 1 |
CACHE_ADD | 2 |
CACHE_UPDATE | 3 |
CACHE_DELETE | 4 |
CACHE_DELETE_ALL | 5 |
CACHE_GET_NEXT | 6 |
CACHE_ADD_UPDATE | 7 |
CACHE_END | 8 |
CACHE_CLOSE_CURSOR | 9 |
CACHE_RESET_CURSOR | 10 |
Note: code defined above is specific to B4302180. In case you are working on a different business function, review header file or source file with macro.
Error | Error Code |
---|---|
ERR_NULL_POINTER | 4363 |
ERR_INIT_BEHAVIORAL | 078S |
ERR_INIT_CACHE | 078L |
ERR_FETCH_RECORD | 078N |
ERR_ADD_RECORD | 078O |
ERR_UPDATE_RECORD | 078P |
ERR_DELETE_RECORD | 078Q |
ERR_END_CACHE | 032E |
ERR_CACHE_ACTION | 032E |
ERR_OPEN_CURSOR | 078M |
Through JDE API jdeCacheInit() it creates unique cache. For the header/detail PO cache the way it creates cache name is different from other business function. In general cache name is,
Case study on Error against B4302180G
Below example is to explain the possible cause of error '078N' in modifying uncommitted PO Detail Cache (B4302180G).
Issue: When attempting to change the amount or quantity, of a line added(option 4) in P4314 the following error occurs.
ERROR
-----------------------
Fetch from cache B4302180G3744126 failed
Issue is caused by data: Muti-currency Conversion = 'N' where F0010.CRCD is not Blank (contains 'USD' for example)
Issue can be simulated by populating specific currency for Non-Currency environment.
To fix this issue,
<Internal_Only>this note is created based on SR 3-4713187871 (if needed for reference)
</Internal_Only>