Quantity on hand will not update when writing cardex transaction


Active Member

I have a business function built to simply perform some PI (cycle count) transactions using the master business function XT4114Z1. The process performs the begin doc, edit line and end doc statements without errors occurring and I even end up with my cardex transaction being written, however, my quantity on hand never sees any update (up or down). My ER is below and i've been debugging this thing for a few days at this point. I'm sure I am missing something very simple but another set of eyes is always what spots that type of thing. Anyways, any ideas?

Listing of ER for Named ER: N554114

NAMED ER: Perform Inventory Adjustment
0001 VA evt_DateUpdated = SL DateToday
0002 F4114 Begin Document
BF szActionType -> BF cDocumentAction
BF szComputerID <> BF szComputerID
BF szCostCenter <> BF szBranchPlant
VA evt_DateUpdated -> BF jdBatchDate
VA evt_JournalEntryLineNo <> BF mnLastJELineNumber
BF szCompany -> BF szDocumentKeyCompany
BF szDocType -> BF szDocumentType
VA evt_DateUpdated -> BF jdGLDate
VA evt_DateUpdated -> BF jdTransactionDate
VA evt_ExplanationTransaction <- BF szGLExplanation
0003 If BF mnUnitsTransactionQty is greater than <Zero>
0004 VA evt_FromTo = "T"
0005 Else
0006 VA evt_FromTo = "F"
0007 End If
0008 F4114 Edit Line
BF szComputerID <> BF szComputerID
BF cErrorConditions <- BF cErrorConditions
VA evt_DateUpdated -> BF jdGLDate
VA evt_ExplanationTransaction -> BF szGLExplanation
"1" -> BF cUpdateQuantityOnHand
"1" -> BF cAllowQtyOverAvailable
VA evt_FromTo <> BF cFromTo
"1" -> BF cDefaultFromPrimaryLocation
"1" -> BF cAllowHeldLots
VA evt_DateUpdated -> BF jdTransactionDate
BF szDocType -> BF szDocumentType
VA evt_DateUpdated -> BF jdBatchDate
VA evt_BatchNumber <- BF mnBatchNumber
BF szCostCenter -> BF szBranchPlant
BF szIdentifier2ndItem -> BF szItemNumber
BF szUnitOfMeasureAsInput -> BF szTransactionUOM
BF mnUnitsTransactionQty -> BF mnTransactionQty
"2.00" -> BF mnTransactionProcessType
BF szSupplierLot -> BF szSupplierLotNumber
VA evt_0911 <- BF mnF0911JobNumber
BF szCompany -> BF szKeyCompany
VA evt_InvJob <- BF mnInvJobNumber
"1" -> BF cProcessJE
0009 F4114 End Document
SL ReportName -> BF szProgramID
BF szComputerID -> BF szComputerID
"1" -> BF cWriteCardex
BF szDocType -> BF szDocumentType
"2.00" X BF mnTransactionProcessType
VA evt_0911 -> BF mnF0911Jobnumber
VA evt_BatchNumber -> BF mnBatchNumber
VA evt_InvJob -> BF mnInvJobNumber

Tuesday November 04, 2014 12:30
If you turn ON the jde debug log and then analyze the log after run would help you much to understand whats going wrong.

I think there is more to the inventory adjustment than just those calls to the MBF. If memory serves, you need to call a F41021 function. Use the interactive app, perform an IA and capture the debug log.

Hello czarcasm,
Have you tested with different items?

We had an issue with custom Manufacturing Interface (Inventory Issue) failing to update F41021 due to incorrect Primary Unit of Measure setup for an item.
While it was updating cardex properly it failed to update F41021 because primary unit of measure was not the smallest uom and transaction quantity was below possible precision for the Primary UOM.
+1 for criag. Anytime i try to "mimic" a JDE app using a single NER I turn on debugging and execute the transaction via the Web Client. I then turn around and analyze the logs. It should show you all the input and output values of all the BSFN used.

It will save you time guessing at values.

Also, try craigs object browser utility to execute the function in a standalone scenerio. use craigs JDE Trace program to debug objectbrowser and you'll see everything thats happening and any errors.
I had been using JDE Object Browser pretty extensively. Initially I had been using the DSI BSFN but there is an error with the last few lines of code when calling that NER from a JDE interactive app. The solution ended up being hidden away in the end doc. It's all functioning now. One other hurdle to cover with this sucker and then it's done. Thanks everyone for the help.

As for anyone viewing this entry, make sure you eliminate all of the possibilities listed above. We found that all of them are potentials. Easiest solution was\, as nkuebelbeck mentioned, just stepping through the code and assessing each variable at your begin, edit, end doc lines.
If you turn ON the jde debug log and then analyze the log after run would help you much to understand whats going wrong.


Hey Chan,

Any ideas why I can't get a zero balance PI transaction to hit the cardex? BSFN is working well at this point for any positive or negative transactions but a zero value transaction will not hit. I captured the debug output and it is not giving me the needed feedback. I have to assume that there is some internal check the EditLine is doing on some of the inputs. Think there would be any harm in just posting a line to the cardex? It'd be zero value and wouldn't hit the G/L