P4114 Master Business Functions

ppaunero

Member
I´ve developed a business service to simulate the P4114 Inventory Adjustment program.
The secuence of MBF called in my BS are:

1. F4114BeginDocument
2. F4114EditLine
3. F4114EndDocument
4. F4114ClearDetailStack

The first time I call the business function inventory adjustment works fine, new rows are inserted in F4111, F41021 and F0911 tables, all updates are executed, and seems there is no problem.

Problem appears the second time I call the business function. With the same input parameters, the response I get is the following error:

CAUSE . . . . A cursor was not able to be opened because the Cache Init was not successful or cache I09UI002 was empty.

RESOLUTION. . Verify that the Cache Init was successful and that records exist in your cache prior to the Open Cursor. Check the JDE.LOG and JDEDEBUG.LOG for additional information.

I´ve been debugging the call on JDE and JDeveloper, and exception is thrown in B0900049.C function in line 2635(method F0911FSEditDoc).

I´ve verified that restarting the server, problem goes away and allows me to make one adjustment. In short, I can only make one inventory adjustment.

The list of parameters passed to the business service are:

• CAllowHeldLots("1");
• CAllowQtyOverAvailable("1");
• CBatchStatus(" ");
• CCostEntered(" ");
• CDefaultFromPrimaryLocation(" ");
• CDocumentAction("A");
• CDualCycleCountGLOffset(" ");
• CFromTo("T");
• CProcessCloseBatch("2");
• CProcessJE("1");
• CSummarizeF0911("1");
• CUpdateQuantityOnHand("1");
• CWriteCardex("1");
• JdBatchDate(new Date());
• JdGLDate(new Date());
• JdLotEffectivityDate(new Date());
• JdLotExpirationDate(new Date());
• JdTransactionDate(new Date());
• MnAgreementSequence(new MathNumeric(0));
• MnAgreementSupplement(new MathNumeric(0));
• MnBatchNumber(new MathNumeric(0));
• MnCycleCountNumber(new MathNumeric(0));
• MnDocumentNumber(new MathNumeric(164));
• MnExtendedAmount(new MathNumeric(0));
• MnF0911JobNumber(new MathNumeric(0));
• MnF0911Jobnumber(new MathNumeric(2));
• MnInvJobNumber(new MathNumeric(0));
• MnLastJELine(new MathNumeric(0));
• MnLastJELineNumber(new MathNumeric(0));
• MnLineNumber(new MathNumeric(0));
• MnLotPotency(new MathNumeric(0));
• MnParentShortItemNumber(new MathNumeric(0));
• MnPreviousLinenumber(new MathNumeric(0));
• MnSecondaryQty(new MathNumeric(0));
• MnShortItemNumber(new MathNumeric(0));
• MnTagNumber(new MathNumeric(0));
• MnTransactionLineNumber(new MathNumeric(0));
• MnTransactionProcessType(new MathNumeric(2));
• MnTransactionQty(new MathNumeric(120));
• MnTransactionUnitCost(new MathNumeric(0));
• MnWMSLineNumber(new MathNumeric(0));
• SzBranchPlant(" 310");
• SzComputerID("OLMILLO");
• SzDisplayedLocation("LOC1");
• SzDocumentKeyCompany("00001");
• SzDocumentType("IA");
• SzEDITransactionType(" ");
• SzGLExplanation("Inventory Adjustments ");
• SzGLMBFVersion("ZJDE0001");
• SzItemNumber("1001");
• SzKeyCompany("00001");
• SzLotGroup(" ");
• SzLotNumber("LOT1");
• SzProgramID("P4114");
• SzTransactionUOM("EA");
• MnFromLineNumber(new MathNumeric (0));
• MnThruLineNumber(new MathNumeric (0));
I can not find the solution to this problem. Perhaps it is necessary to apply a esu or input parameters were incorrect.

Thank you in advance.

Regards.
Pablo
 
Hi Pablo,

In your parameters list I see the job number being passed in. Have you tried clearing this after each call e.g after the F4114ClearStack. It is possible that the function upon encountering a job number passed in is trying to get a cursor after a cache init. Maybe that is why when you restart the server it works as all field will be cleared again.

Hope the above helps.
 
Back
Top