How to Debug Flex Accounting issue in Sales Update

Purpose of Document

This troubleshooting document is provided to assist in debugging a specific issue. When possible, diagnostic tools are included in the document to assist in troubleshooting. This document is to explain how Flex Accounting takes effects (Technical) with detailed routines in it. Though this document is written based on Sales Update (R42800) it can be applied to any other Flex Accounting routine if needed.

Prerequisite

<Document 625475.1> - E1: 40: Automatic Accounting Instructions for Distribution (AAI / DMAAI)
<Document 756543.1> - E1: 42: P40296: Flexible Accounting for Distribution (R42800/P4112/P4113/P4114/P4312/P4314)
<Document 625421.1> - E1: 42: R42800: Sales Update

This note presume that you are familiar with what is Automatic Accounting Instruction (AAI) and business functions and it's debugging.


Related objects and Call Stack:

To deal with Flex Accounting, a number of objects are related with as below,

R42800 - Sales Update: So long as cGLInterface flag (F40205.GLI) from line type based on Sales Order Detail Line (F4211) or it's summary

(Initialize/store Flex Sales Accounting Cache - Sales Order Specific)
    1. B4201150 - ProcessFlexSalesAcctngCache (cAction = 2 - Add cache): If the sales flex accounting processing option is ON, write an empty record to the sales flex accounting cache. The cache will be keyed by sales update job number.
    1. B4201150 - ProcessFlexSalesAcctngCache (Ref #1) (cAction = 3 - Update cache): This function is to update empty cache created above to use during Building up Flex Account

(Get/build account store it into cache)
    1. B4200520 - GetSalesAAIsAndCallF0911EditLine: This function sets AAI Number and calling RetrieveDistributionAAICacheDB (if no error then) F0911FSEditLine. This function will load F0911 fields, retrieve the AAI for each journal entry required for a sales order, call Tax Calculator, and call the F0911 Edit Line to write the journal entries.
        2. B4204190 - RetrieveDistributionAAICacheDB: (Ref #2) This function is responsible to return Account Information (account number and MCU.OBJ.SUB set)
            3. B4000351 - RetrieveDistAAIwF4095Cache: This function gets Account Information based on setup made in F4095 either by DB or by Cache
                4. B4000352 - RetrieveF4095Cache: To deal with Flex Accounting this function handled AAI information returned by RetrieveDistAAIwF4095Cache
                4. N4002371 - BuildFlexibleAccountwithCache: Check whether to override Flex Account information as defined from F4096 and stored it into Cache
                    5. B4000341 - RetrieveF4096Cache: This function is to validate flex account and if any, it replaces Account  Information constructed by RetrieveDistAAIwF4095Cache
                    5. B4201150 - ProcessFlexSalesAcctngCache: (refer Ref #1) Validate/replace cache with components of Account Information
                    5. B4002420 - GetTableColValue: (Optional) This function validates setup made in F4096
            3. XX0901 - ValidateAccountNumber: This function validate Account Information which is returned by RetrieveDistAAIwF4095Cache
        2. B0900049 - F0911FSEditLine: This Master Business Function defaults/validates account information and makes use of Account Information returned by RetrieveDistributionAAICacheDB

(Terminate Cache)
    1. B4204190 - ProcessDistributionAAICache (Refer Ref #2) (After all the GL transactions have performed this function is to be called to terminate all the cached used during process with Cache Action 8 to Terminate all the caches)
        2. B4000352 - RetrieveF4095Cache (To terminate cache with Cache Action Code 8)
        2. B4000341 - RetrieveF4096Cache (To terminate cache with Cache Action Code 8)
          (Same routine will be repeating whenever one GL transaction takes place)


Cache Action in Flex Accounting Routine:

Note that below Cache Action Code is used during Flex Account transaction however this action code can be used for different purpose in different business functions. Most commonly cache action takes places as below sequence,

  1. Cache Get (or Cache Fetch Next): No cache -> Error
  2. (Read related tables F4095/F4096)
  3. Cache Add: To store data which is retrieved by 2
  4. Cache Get (Cache Fetch Next): To verify cache is added properly
  5. Make use of cache during transaction
  6. (At the end of transaction) Cache Terminate All: To release memory used during transaction
Cache ActionInputUsage and APIs called
Cache Get 1 To get/verity existing cache
  1. jdeCacheInit ()
  2. jdeCacheOpenCursor ()
  3. jdeCacheFetchPosition ()
  4. jdeCacheCloseCursor
Cache Add 2 If no cache found then add it
  1. jdeCacheInit ()
  2. jdeCacheAdd ()
Cache Fetch Next 3 Same with Cache Get
Note: In B4201150 cAction 3 is to be used to update Flex Cache
Cache Terminate All 8 Terminate cache used
  1. jdeCacheInit ()
  2. jdeCacheTerminateAll ()
Cache Close Cursor 9 No implementation

 


DMAAI set by GetSalesAAIsAndCallF0911EditLine

Below DMAAI is hard coded in B4200520 and each AAI can be called conditionally. For example, in most common transaction 4230, (4270, 4280), 4220 and 4240 will be called.
Sequence of validation/assignment:

  1. 4245 -   Account Receivable Trade (SOR)
  2. 4230 -   Revenue (SOS)
  3. 4233 - Allocated Revenue
  4. 4270  -  Price Adjustment
  5. 4280 -   Rebate Payable
  6. 4250 -   Tax Liability (SOT)
  7. 4231 -   Deferred Revenue
  8. 4232 -   Unbilled A/R
  9. 4281 -   Temperature Gain/Loss Offset
  10. 4282 -  Temperature Gain/Loss
  11. 4220 -  Cost of Goods Sold (SOC)
  12. 4240/4241 -   Inventory/Inventory in Transit (ST Batch)
  13. 4242 - Accommodations
  14. 4240 -   Inventory (SOI)
  15. 4221 -  Defferred Cost of Goods Sold
  16. 4223 - Deferred COGS - Accomodations
  17. 4260 -   Inter Branch Revenue
  18. 4240 -   Inventory (interbranch to offset)
  19. 4242 - Accomodations (interbranch order to offset)
  20. 4240 -   Inventory (interbranch order to offset)
  21. 4141 -   Inventory or Expense/COGS
  22. 4220 -   Cost of Goods Sold
  23. 4240 -   Inventory
  24. 4250 -   Tax Liability

Note: Description is coming from F4090 (Distribution/Manufacturing - AAI Record Type)


To have better understanding in GL transaction during Sales Update, possibly some of business function listed above can be written in detail as below: In EntepriseOne to minimize Global or Static variable, each business function contains complete sets of parameters which are required within a routine.





Information on Business Functions related

B4200520 - GetSalesAAIsAndCallF0911EditLine (Sales Update, Get AAIs and Edit F0911 Entries)


Reference: <Document 1307156.1> - E1: 40: How F0911.GLU (Units) Gets Written in Distribution


B4204190 - RetrieveDistributionAAICacheDB (Retrieve Distribution AAI From Cache or DB)

Parameter NameData TypeData Alias ReqI/OExample/Notes
mnAAITableNumber MATH_NUMERIC ANUM   I This value is hard coded before this fuction gets called via B4200520. For example, 4220
szCompanyNumber[6] JCHAR CO   I 00001
szOrderType[3]   JCHAR DCTO   I/O (Blank)
szDocumentType[3]  JCHAR DCTO   I SO
szGLCategory[5]  JCHAR GLPT   I IN30
szCostType[4]    JCHAR COST   I (Blank)
szBranchPlant[13]  JCHAR MCU   I "           30"
szObjectAccount[7] JCHAR OBJ   O 6020
szSubsidiary[9]  JCHAR SUB   O (Optional)
szCostCenter[13] JCHAR MMCU   O  
cSuppressErrorMessage JCHAR EV01   I 0 is default value
(1 to suppress error)
szErrorMessageID[11]  JCHAR DTAI   O  
cVoidAccountValidation JCHAR EV02   I (Blank)
1 = Concatenate but do not validate
2 = Do not validate and do not cancatenate
mnJobNumber      MATH_NUMERIC JOBS   I 99999999
cSalesFlexAccountingFlag JCHAR EV03   I When Processing Option is ON for flex accouting this value has to be 1 (eles Blank)
szSubledger[9]   JCHAR SBL   I/O (Optional) Blank. When Flex is ON this value can be Output
cSubledgerType   JCHAR SBLT   I/O (Optional) Blank. When Flex is ON this value can be output
szApplicationGroup[11] JCHAR EAP   I/O R42800. When Flex is ON this value has to be indicated
szManagerialAnalysisCode1[13] JCHAR ABR1   O Meant for Flex only
szManagerialAnalysisCode2[13] JCHAR ABR2   O Meant for Flex only
szManagerialAnalysisCode3[13] JCHAR ABR3   O Meant for Flex only
szManagerialAnalysisCode4[13] JCHAR ABR4   O Meant for Flex only
cManagerialAnalysisType1 JCHAR ABT1   O Meant for Flex only
cManagerialAnalysisType2 JCHAR ABT2   O Meant for Flex only
cManagerialAnalysisType3 JCHAR ABT3   O Meant for Flex only
cManagerialAnalysisType4 JCHAR ABT4   O Meant for Flex only
mnIdentifierShortItem MATH_NUMERIC ITM   I 0
szPriceAdjustmentType[9] JCHAR AST   I (Blank) only for AAI Table Number 4270 and 4280
szAccountUnitOfMeasure[3]     JCHAR UM      
szProjectBusinessUnit[13]     JCHAR MCU   O  
szProjectSubsidiary[9] JCHAR SUB   O  
szAccountId[9]   JCHAR ANI   O 000123456
szAccountNumber[30]   JCHAR AID   O           R30.6020

 


B4000351 - RetrieveDistAAIwF4095Cache (Retrieve Dis AAI w F4095 Cache)

The hierarchy of object account components:
ComponentsValue from
OBJ Strictly from Table F4095
MCU 1. Table
2. Project MCU (when this value is not blank)
3. F4095 Flex
4. Input(passed in) Branch/Plant
SUB 1. Input (passed in) parameter
2. F4095 Table
3. Project SUB
4. Flex

 

Parameter NameData TypeData Alias ReqI/OExample/Notes
mnAAITableNumber MATH_NUMERIC ANUM   I 4220. Used for Flex Account
szCompanyNumber[6] JCHAR CO   I 00001. Used for Flex Account
szOrderType[3] JCHAR DCTO     (Blank)
szDocumentType[3] JCHAR DCTO   I SO. Used for Flex Account after assigning it to szOrderType
szGLCategory[5] JCHAR GLPT   I IN30
szCostType[4] JCHAR COST      
szBranchPlant[13] JCHAR MCU   I/O "           30". When Flex is On and BuildFlexiableAccountwithCache returns, which value is to be output value
szObjectAccount[7] JCHAR OBJ   O Used for Flex Account
szSubsidiary[9] JCHAR SUB   O  
szCostCenter[13] JCHAR MMCU   O  
szAccountNumber[30] JCHAR ANI   O  
cSuppressErrorMessage JCHAR EV01   I 0 - Do not suppress error
szErrorMessageID[11] JCHAR DTAI   O Refer detail Error
cVoidAccountValidation JCHAR EV02   I (Blank)
1 = Cancatenate but do not validate
2 = Do not validate and do not cancatenate
mnJobNumber MATH_NUMERIC JOBS   I 999999999
cSalesFlexAccountingFlag JCHAR EV03   I Based on processing option value
szSubledger[9] JCHAR SBL   I/O  
cSubledgerType JCHAR SBLT   I/O  
szApplicationGroup[11] JCHAR EAP   I/O R42800. Used for Flex Account
szManagerialAnalysisCode1[13] JCHAR ABR1   O Only when Flex is ON
szManagerialAnalysisCode2[13] JCHAR ABR2   O Only when Flex is ON
szManagerialAnalysisCode3[13] JCHAR ABR3   O Only when Flex is ON
szManagerialAnalysisCode4[13] JCHAR ABR4   O Only when Flex is ON
cManagerialAnalysisType1 JCHAR ABT1   O Only when Flex is ON
cManagerialAnalysisType2 JCHAR ABT2   O Only when Flex is ON
cManagerialAnalysisType3 JCHAR ABT3   O Only when Flex is ON
cManagerialAnalysisType4 JCHAR ABT4   O Only when Flex is ON
mnIdentifierShortItem MATH_NUMERIC ITM   I/O Flex is ON and when CSMS is ON
szAccountUnitOfMeasure[3] JCHAR AST   O From F0901 based on szAccountNumber
szPriceAdjustmentType[9] JCHAR UM   I/O This value is to be utilized only for AAI Table 4270 and 4280 (and 4515 and 4520). Otherwise this value has to be set Blank
szProjectBusinessUnit[13] JCHAR MCU   I If these values are assigned this has higher precedence
szProjectSubsidiary[9] JCHAR SUB   I  
mnTransactionID MATH_NUMERIC TSID   I/O 0
szComputerID[16] JCHAR CTID      

 


B4000352 - RetrieveF4095Cache (Retrieve F4095 Cache)

Parameter NameData TypeData Alias ReqI/OExample/Notes
szCacheActionCode[9] JCHAR CATN   I To indicate what kind of cache action it has to take. Valid values are,
1 - Cache Get
2 - Cache Add
9 - Close Cursor
8 - Cache Terminate All
mnJobNumber MATH_NUMERIC JOBS   I 99999999. This is to make transaction specific cache
szErrorId[11] JCHAR DTAI      
mnAaiTableNumber MATH_NUMERIC ANUM   I 4220
szOrderType[3] JCHAR DCTO      
szDocumentType[3] JCHAR DCTO   I SO
szCostType[4] JCHAR COST      
szCompany[6] JCHAR COST   I 00001
szGlCategory[5] JCHAR GLPT   I IN30
szCostCenter[13] JCHAR MCU      
szObjectAccount[7] JCHAR OBJ      
szSubsidiary[9] JCHAR SUB      
idCacheCursor ID GENLNG   I/O 0
mnTransactionID MATH_NUMERIC TCID   I/O 0
szComputerID[16] JCHAR CTID      

 

Entering jdeCacheInit                     Name:[B40003521197940]
   Found existing cache, total references:[5]
   hCache:[0A4A1CC0] Nm:[0B40003521197940] Recs:2 Curs:0 Hnds:5 Cchs:14 INIT exist
Entering jdeCacheOpenCursor (Called by: b4000352.c line 263)
   Open Cursor Success                     hCursor:[09310268] hCache:[0A4A1CC0]
    hCache:[0A4A1CC0] Nm:[0B40003521197940] Recs:2 Curs:1 Hnds:5 Cchs:14 CURS open
Entering jdeCacheFetchPosition                     hCursor:[09310268]
Entering jdeCacheCloseCursor                     hCursor:[09310268] hCache:[0A4A1CC0]
   hCache:[0A4A1CC0] Nm:[0B40003521197940] Recs:2 Curs:0 Hnds:5 Cchs:14 CURS close

 


 

N4002371 - BuildFlexibleAccountwithCache (Build Flexible Account with Cache)

Parameter NameData TypeData Alias ReqI/OExample/Notes
mnAaiTableNumber MATH_NUMERIC ANUM   I 4220
szCompany[6] JCHAR CO   I 00001
szPriceAdjustmentType[9] JCHAR AST      
szAAIFinancials[7] JCHAR ITEM      
szObjectAccount[7] JCHAR OBJ   I 6020
szOrderType[3] JCHAR DCTO   I SO
szApplicationID[11] JCHAR EAP   I R42800
cBuildBusinessUnit JCHAR EV01   I 1
cBuildSubsidiary JCHAR EV02   I 1
cBuildSubledger JCHAR EV03   I 1
mnJobnumberA MATH_NUMERIC JOBS   I 99999999
szCostCenter[13] JCHAR MCU      
szSubsidiary[9] JCHAR SUB      
szSubledger[9] JCHAR SBL      
cSubledgerType JCHAR SBLT      
mnIdentifierShortItem MATH_NUMERIC ITM   I 0
szManagerialAnalysisCode1[13] JCHAR ABR1      
szManagerialAnalysisCode2[13] JCHAR ABR2      
szManagerialAnalysisCode3[13] JCHAR ABR3      
szManagerialAnalysisCode4[13] JCHAR ABR4      
cManagerialAnalysisType1 JCHAR ABT1      
cManagerialAnalysisType2 JCHAR ABT2      
cManagerialAnalysisType3 JCHAR ABT3      
cManagerialAnalysisType4 JCHAR ABT4      
szErrorMessage[11] JCHAR DTAI      
mnTransactionID MATH_NUMERIC TCID   I 0
szComputerID[16] JCHAR CTID      
F4096.FILEColumnsNote
F0101 (Address Book) When szApplication ID is B4200520,R42800,R4981
Case (SFDT = 1) Sold To
Case (SFDT = 2) Ship To
Case (SFDT = 3) Parent Address
The Address Book number can be either '1' = Sold To  '2' = Ship To or '3' = Parent if SOP was the calling application. For all other applications, there is only one Address Book Number passed in the cache
  When szApplicationID is P4312, P4314
SFDT = 2 then get SHAN from F4301
SFDT = 3 get Parent Address Number of AN8 from F0150
Set error 3783
Add logic to enable flex datatypes of 2 and 3 when flex accounting is used in conjunction with P4312 and P4314. For datatype of 3, the parent address numbe is the value specified in the supplier master record. This parent address number is stored in F0150 with an organization type equal to blank. If the user has specified a datatype of 3, but there is no corresponding record in the F0150, VA evt_WorkAddressNumber is set to blank and an error is subsequently set. For datatype of 2 the ship-to is fetched from the F4301 record.
F4211 (Sales Order Detail) When Application ID is B4200520, R42800
Based on return value of BSFN B4201150 (Process Flex Sales Accounting Cache)
(Case SFIT = SRP1) F4211.SRP1
(Case SFIT = SRP2) F4211.SRP2
(Case SFIT = SRP3) F4211.SRP3
(Case SFIT = SRP4) F4211.SRP4
(Case SFIT = DOCO) F4211.DOCO
(Case SFIT = DOC) F4211.DOC
(Case SFIT = SLSM) F4211.SLSM
(Case SFIT = SLM2) F4211.SLM2
(Case SFIT = AN8) F4211.AN8
(Case SFIT = ITM) F4211.ITM
(Case SFIT = MCU) F4211.MCU
(Case SFIT = EMCU)
  If szApplicationID IN ('R4200520', 'R42800')
       F4211.MCU
  Else
       F4201.MCU (=F4211.EMCU)
(Case SFIT = KCOO) F4211.KCOO

If DTAI IN ('CO', 'KCO', 'OKCO', RKCO') then ltrim zero
If the field is one of the fields passed in the SOP cache, use that value. Otherwise, we need to retrieve the value from the S/O Detail record.
F4071 (Adjustment Master) If returned AST is Blank, then AST = (Input) szPriceAdjustmentType
(Case SFIT = AST), returned AST
(Case Others: call Get Table Column Value) to get szWorkString

(Case SFIT = PA01 and szWorkString = "1"), returned Parent Address Number and exit from routine.

(Case SFIT = PA01 and szWorkString = "2"), assign SIFT = AN82
(Case SFIT = PA01 and szWorkString = "3"), assign SIFT = AN83
(Case SFIT = PA01 and szWorkString = "4"), assign SIFT = AN84
(Case SFIT = PA01 and szWorkString = "5"), assign SIFT = AN85
(Case SFIT = PA01 and szWorkString = "6"), assign SIFT = AN86
(Case SFIT = PA01 and szWorkString = "7"), assign SIFT = AN87
(Case SFIT = PA01 and szWorkString = "2"), assign SIFT = AN82
(Case SFIT = PA01 and szWorkString = "2"), assign SIFT = AN82
If  SFIT is not "AST" then call bsfn B4002420 - GetTableColValue (Get Table Column Value) to get szWorkString from it. Depends on this value it identified which column values to assign into SFIT.
F4111 (Item Ledger) SFIT = ITM, then F4111.ITM
SFIT = LITM, then F4111.LITM
SFIT = AITM, then F4111.AITM
SFIT = KIT, then F4111.KIT
SFIT = MMCU, then F4211.MMCU
SFIT = MCU, then F4211.MCU
SFIT = DMCT, then F4211.DMCT
SFIT = DOCO, then F4211.DOCO
SFIT = TREF, then F4111.TREF
SFIT = RCD, then F4211.RCD
All permissable F4111 fields are in the inventory cache
F1201 (Asset Master) SFIT = NUMB, then F1201.NUMB
SFIT = CO, then F4211.CO
SFIT = APID, then F1201.APID
SFIT = ASID, then F1201.ASID
SFIT = ACL1, then F1201.ACL1
SFIT = ACL2, then F1201.ACL2
SFIT = ACL3, then F1201.ACL3
SFIT = ACL4, then F1201.ACL4
SFIT = ACL5, then F1201.ACL5
SFIT = MCU, then F4211.MCU
SFIT = TXJS, then F1201.TXJS
SFIT = INSP, then F1201.INSP
SFIT = INSC, then F1201.INSC
SFIT = LOC, then F1201.LOC
SFIT = AN8, then F4211.AN8
SFIT = LANO, then F1201.LANO
SFIT = ACL6, then F1201.ACL6
SFIT = ACL7, then F1201.ACL7
SFIT = ACL8, then F1201.ACL8
SFIT = ACL9, then F1201.ACL9
SFIT = ACL0, then F1201.ACL0
SFIT = KIT, then F4211.KIT
SFIT = JBCD, then F1201.JBCD
SFIT = JBST, then F1201.JBST
SFIT = FA0, then F1201.FA0
SFIT = FA1, then F1201.FA1
SFIT = FA2, then F1201.FA2
SFIT = FA3, then F1201.FA3
SFIT = FA4, then F1201.FA4
SFIT = FA5, then F1201.FA5
SFIT = FA6, then F1201.FA6
SFIT = FA7, then F1201.FA7
SFIT = FA8, then F1201.FA8
SFIT = FA9, then F1201.FA9
SFIT = FA21, then F1201.FA21
SFIT = FA22, then F1201.FA22
SFIT = FA23, then F1201.FA23
SFIT = TXA1, then F4211.TXA1
SFIT = MMCU, then F4211.MMCU
SFIT = WRFL, then F1201.WRFL
SFIT = NORU, then F1201.NORU
 
F1202 (Asset Balance) SFIT = ADM, then F1202.ADM
SFIT = ADSN, then F1202.ADSN
SFIT = DIR1, then F1202.DIR1
SFIT = CHCD, then F1202.CHCD
SFIT = ITAC, then F1202.ITAC
 
the other supported files (F0006, F03B11, F0411, F30006, F3009, F3111, F3112, F41001, F4101, F4102, F4311, F4801, F4215, F4941, F4942, F03B13, F03B14, F0413, F0414) If (szApplicationID is B4200520 or R42800) and FILE = 'F42160' then KCOO = F4211.KCOO

If (szApplicationID is B4200520 or R42800) and (FILE = 'F42160' or 'F4102') and Processing Option (#5. G/L Account Business Unit = 1) then MCU = F4211.MCU

If (szApplicationID is B4200520 or R42800) and (FILE = 'F42160' or 'F4102') and Processing Option (#5. G/L Account Business Unit = 2) then MCU = MCU of F4211.AN8

If (szApplicationID is B4200520 or R42800) and (FILE = 'F42160' or 'F4102') and Processing Option (#5. G/L Account Business Unit = 3) then MCU = F4201.MCU

If (szApplicationID is B4200520 or R42800) and (FILE = 'F42160' or 'F4102') and Processing Option (#5. G/L Account Business Unit = I) then MCU = MCU of F4211.EMCU

If FILE = F4311 AND SFIT = CO, then ltrim company

If FILE = F4801 AND SFIT = CO, then ltrim company
 

 


 

B4000341 - RetrieveF4096Cache (Retrieve F4096 Cache)

Parameter NameData TypeData Alias ReqI/OExample/Notes
szCacheActionCode[9] JCHAR CATN   I 1st 3 - Cache Fetch Next
2nd 2 - Cache Add
3rd 3 - Cache Fetch Next

szCacheActionCode,
1 - Cashe Get
2 - Cache Add
3 - Cache Get Next
9 - Close Cursor
8 - Cache Terminate All
mnJobNumber MATH_NUMERIC JOBS   I 99999999
szErrorMessageId[11] JCHAR DTAI      
cCostObjectSetupMethod JCHAR CO02   I A - AAI Number method (F1690.CO02)
szPriceAdjustmentType[9] JCHAR AST      
szCompany[6] JCHAR CO02   I 00001
szOrderType[3] JCHAR DCTO   I SO
szObjectAccount[7] JCHAR OBJ   I 6020, RetrieveF4095Cache.szObjectAccounts
mnAaiTableNumber MATH_NUMERIC ANUM   I 4220
szItemNumber[7] JCHAR ITEM      
cRecordTypeCCSUBSBLFlexFO JCHAR @RT   I F4096.@RT
cSubledgerType JCHAR SBLT   I F4096.SBLT
szDataItem[11] JCHAR SFIT   I F4096.SFIT (Data Item) * Column Name
cDataType JCHAR SFDT   I (Optional)
cManagerialAnalysisType1 JCHAR ABT1   I (Optional)
szFileName[11] JCHAR FILE   I F4096.FILE (File Name) * Table Name
idCacheCursor ID GENLNG   I/O (3rd) returns idCacheCursor
mnElementNumber MATH_NUMERIC EL   I/O 0
cNoRowsExist JCHAR EV01      
mnTransactionID MATH_NUMERIC TCID   I 0
szComputerID[16] JCHAR CTID      
Entering jdeCacheInit                     Name:[B4000341119794]
   Found existing cache, total references:[8]
   hCache:[0A4A2038] Nm:[0B4000341119794] Recs:2 Curs:0 Hnds:8 Cchs:14 INIT exist
Entering jdeCacheOpenCursor (Called by: b4000341.c line 495)
   Open Cursor Success                     hCursor:[09310268] hCache:[0A4A2038]
   hCache:[0A4A2038] Nm:[0B4000341119794] Recs:2 Curs:1 Hnds:8 Cchs:14 CURS open
Entering jdeCacheFetchPosition                     hCursor:[09310268]
Entering jdeCacheCloseCursor                     hCursor:[09310268] hCache:[0A4A2038]
   hCache:[0A4A2038] Nm:[0B4000341119794] Recs:2 Curs:0 Hnds:8 Cchs:14 CURS close

 

 


 

B4201150 - ProcessFlexSalesAcctngCache (Process Flex Sales Accounting Cache)

Parameter NameData TypeData Alias ReqI/OExample/Notes
cSuppressErrorMessage JCHAR SUPPS   I 1 - Suppress Error Message (Hard Coded). So though this routine ends in error this does not affect calling routine
szErrorMessageID[11] JCHAR DTAI     Refer Error Codes below
cAction JCHAR EV01   I 1 - Retrieve Record

Available cAction,
1 - Retrieve Record
2 - Add new record
3 - Update record
4 - Delete record
8 - Terminate Cache
others - Invalid action (Error)
mnJobNumber MATH_NUMERIC JOBS   I 99999999, based on JobNumber it creates unique transaction cache 'B4201150 + JobNumber'
mnSoldTo MATH_NUMERIC AN8   I/O F4211.AN8
mnShipTo MATH_NUMERIC SHAN   I/O F4211.SHAN
mnAddressNumberParent MATH_NUMERIC PA8   I/O F4211.PA8
mnItem MATH_NUMERIC ITM   I/O F4211.ITM
szSO_RevenueBranch[13] JCHAR MCU   I/O F4211.EMCU
mnSO_Number MATH_NUMERIC DOCO   I/O F4211.DOCO
szSO_Type[3] JCHAR DCTO   I/O F4211.DCTO
szCO_Company[6] JCHAR KCOO   I/O F4211.KCOO
mnSO_LineNumber MATH_NUMERIC LNID   I/O F4211.LNID
szSalesCategoryCode1[4] JCHAR SRP1   I/O F4211.SRP1
szSalesCategoryCode2[4] JCHAR SRP2   I/O F4211.SRP2
szSalesCategoryCode3[4] JCHAR SRP3   I/O F4211.SRP3
szSalesCategoryCode4[4] JCHAR SRP4   I/O F4211.SRP4
szSalesCategoryCode5[4] JCHAR SRP5   I/O F4211.SRP5
mnDocumentNumber MATH_NUMERIC DOC   I/O F4211.DOC
mnSO_Saleman1 MATH_NUMERIC SLSM   I/O (No Implementation)
mnSO_Saleman2 MATH_NUMERIC SLM2   I/O (No Implemenation)
szBusinessUnitHeader[13] JCHAR EMCU   I/O F4201.MCU
szPromotionID[13] JCHAR PMTN   I/O F4211.PMTN
mnProjectNumber MATH_NUMERIC PRJM   I/O F4211.PRJM
szBusinessUnitDetail[13] JCHAR MCU   I/O F4211.MCU
szCompanyDetail[6] JCHAR KCOO   I/O F4211.KCOO
cR42800GLAcctBusUnit JCHAR EV03   I/O cMCUProcOptionToUse_EV04
If this is an interbranch order, use the header branch for the G/L Account in Flex Accounting so pass an I (capital i), otherwise, use the PO GL Account Business Unit value.
If F4211.SO01 is 2 or 4 then cMCUProcOptionToUse_EV04 = 'I', Else cMCUProcOptionToUse_EV04 = PO cGLAcctBusinessUnit
szSoldToBusinessUnit[13] JCHAR MCU   I/O szSoldToBusUnit_MCU

If the GL Account Business Unit processing option is equal t o 2, get the Sold To Business Unit and pass to the Flex Sales Accounting Cache.

If PO cGLAcctBusinessUnit is equal to "2" then F0101.MCU where AN8 = F4211.AN8
Entering jdeCacheInit                     Name:[B4201150119794]
   Found existing cache, total references:[2]
   hCache:[0A4A14A8] Nm:[0B4201150119794] Recs:1 Curs:0 Hnds:2 Cchs:8 INIT exist
Entering jdeCacheOpenCursor (Called by: b4201150.c line 112)
   Open Cursor Success                     hCursor:[09310010] hCache:[0A4A14A8]
   hCache:[0A4A14A8] Nm:[0B4201150119794] Recs:1 Curs:1 Hnds:2 Cchs:8 CURS open
Entering jdeCacheFetchPosition                     hCursor:[09310010]
   hCache:[0A4A14A8] Nm:[0B4201150119794] Recs:1 Curs:1 Hnds:2 Cchs:8 FTCH pos
Entering jdeCacheUpdate                     hCursor:[09310010]
   hCache:[0A4A14A8] Nm:[0B4201150119794] Recs:1 Curs:1 Hnds:2 Cchs:8 UPD
Entering jdeCacheCloseCursor                     hCursor:[09310010] hCache:[0A4A14A8]
   hCache:[0A4A14A8] Nm:[0B4201150119794] Recs:1 Curs:0 Hnds:2 Cchs:8 CURS close
Entering jdeCacheTerminate
   hCache:[0A4A14A8] Nm:[0B4201150119794] Recs:1 Curs:0 Hnds:2 Cchs:8 TERM one

 


B4002420 - GetTableColValue (Get Table Column Value)

Parameter NameData TypeData Alias ReqI/OExample/Notes
mnAddressBookNumber MATH_NUMERIC AN8   I 4245
mnShortItemNumber MATH_NUMERIC ITM   I 60011
szBusinessUnit[13] JCHAR MCU   I           30
mnDocumentNumber MATH_NUMERIC DOCO   I 2660
szOrderType[3] JCHAR DCTO   I SO
szCompany[6] JCHAR KCOO   I 00001
mnLineNumber MATH_NUMERIC LNID   I 1.000
szAdjustmentName[9] JCHAR AST      
szCostCenterAlt[13] JCHAR MMCU      
mnSequenceNoOperations MATH_NUMERIC OPSQ      
szTypeOperationCode[3] JCHAR OPSC      
szOrderSuffix[4] JCHAR SFXO      
mnUniqueKeyIDInternal MATH_NUMERIC UKID      
szFileName[11] JCHAR FILE   I F03012
szDataItem[11] JCHAR SFIT   I AC10
szWorkString[31] JCHAR VC30A   O D30
szSSCCNumberTareLevel[19] JCHAR PLT      
szSSCCNumberPackLevel[19] JCHAR PAK      
szSCCNumber[15] JCHAR SCCN      
szUPCNumber[14] JCHAR UPCN      
mnShipmentNumber MATH_NUMERIC SHPN      
mnRoutingStepNumber MATH_NUMERIC RSSN      
mnPaymentID MATH_NUMERIC PYID      
mnFileLineIdentifier50 MATH_NUMERIC RC5      
mnPayrollTransactionNo MATH_NUMERIC PRTR      
mnUniqueKeyID01 MATH_NUMERIC UK01      
szPromotionID[13] JCHAR PMTN      
szPromotionDealID[13] JCHAR DIDP      
szCompanyKey[6] JCHAR KCO      
szDocumentType[3] JCHAR DCT      
mnDocVoucherInvoiceE MATH_NUMERIC DOC      
jdDateForGLandVoucherJULIA JDEDATE DGJ      
mnJournalEntryLineNo MATH_NUMERIC JELN      
szLineExtensionCode[3] JCHAR EXTL      
szLedgerType[3] JCHAR LT      
szDocumentPayItem[4] JCHAR SFXE      
mnPayItemExtensionNumber MATH_NUMERIC SFX      
szErrorID[11] JCHAR DTAI      
cSuppressErrorMessage JCHAR EV01      
cParentChildRelationshi JCHAR PART      
szCostType[4] JCHAR COST      

 


 

B4204190 - ProcessDistributionAAICache (Process Distribution AAI Cache)

Parameter NameData TypeData Alias ReqI/OExample/Notes
szCacheActionCode[9] JCHAR CATN   I This input parameter determines how to handle cache. Possible values are,
  • Cache Get 1
  • Cache Add 2
  • Cache End 8
  • Cache Close Cursor 9
In R42800 szCacheActionCode is always 8 which is to terminate all the caches created during process by calling API jdeCacheTerminateAll()
mnNumberOfKeys MATH_NUMERIC NKEYS      
cSuppressErrorMessage JCHAR EV01      
szErrorMessageID[11] JCHAR DTAI      
cRecordNotFoundFlag JCHAR EV01      
idCacheCursor ID GENLNG      
mnJobNumber MATH_NUMERIC JOBS   I Since all the caches are created based on Job Number this is key to delete cache
mnAAITableNumber MATH_NUMERIC ANUM      
szCompany[6] JCHAR CO      
szDocumentType[3] JCHAR DCT      
szGLCategory[5] JCHAR GLPT      
szCostType[4] JCHAR COST      
szBranchPlant[13] JCHAR MCU      
szOrderType[3] JCHAR DCTO      
szObjectAccount[7] JCHAR OBJ      
szSubsidiary[9] JCHAR SUB      
szCostCenterAlt[13] JCHAR MMCU      
szAccountNumber[30] JCHAR ANI      
szAccountUnitOfMeasure[3] JCHAR UM      
szProjectBusinessUnit[13] JCHAR MCU      
szProjectSubsidiary[9] JCHAR SUB      
szAccountId[9] JCHAR AID      
szAAIErrorMessage[11] JCHAR DTAI