Blogroll

Get a website with Godaddy


Logo designer Fiverr Frelancer

Wednesday, October 8, 2014

JDE - How to trace work center message?

Work center or so-called WC in fast path, normally it can display the status of each job or activities your users are running....wondering how to trace from there?

F01311M Multi level  Message


AN8 (AddressNumber): Address Number of user ID who submits a certain UBE report. This information will come from F0092.AN8 where F0092.USER is the User ID who submits the job.

LV (LevelIndented): This contains the message level along with the table F01131 - PPAT Message Control File. In general an error from a business function will be 4 and from a system function 'Set UBE Error' will set this value as 3.

MSGP (PPATBriefMassage): This column will show the brief error message that appears in Work Center

TMPI (TemplateID): This column contains the error code (e.g., 0002, 088R).  The detailed description of the error code is stored at F9207. (Column Description will come from F9203)

FCTNM (FunctionName): This column stores the Business Function Name (F9862.SIFCTNM (Function Detail.FunctionName) then review F9862.SIOBNM to get the Object Name.  The same information can be accessed through P98652 which is accessing data from F9862 (Object Librarian - Function Detail) and F9860 (Object Libririan Master Table).

LNBR(SourceLineNumber): The source line number of F9862.OBNM based on function name of FCTNM. This line can be reached using short key Ctrl + G

Eg, To trouble-shoot Error record invalid where LV = 4 , TMPI= 0002, FCTNM=F0911FSBEGINDOC and LNBR=675 and OBNM=B0900049

Retrieve the *.c file Eg,B0900049.c and go to the line=675 and from there, ask your developer to check through the code if anything is wrong

*** Break In Code of B0900049 - F0911FSBeginDoc ***

if ((MathZeroTest(&lpDS->mnDocNumber)) &&
                               (lpDS->cDocAction == _J('A')))
{
/************************************************************************
* Validate Document Number
************************************************************************/
jdeStrncpy(dsD0900049F.szDocumentType, (const JCHAR *)(lpDS->szDocumentType), DIM(dsD0900049F.szDocumentType));
MathCopy(&dsD0900049F.mnDocumentNumber, &lpDS->mnDocNumber);
jdeStrncpy(dsD0900049F.szKeyCompany, (const JCHAR *)(lpDS->szCompanyKey), DIM(dsD0900049F.szKeyCompany));
memcpy((void *)(&dsD0900049F.jdGLDate), (const void *)(&lpDS->jdGLDate),
sizeof (dsD0900049F.jdGLDate));
jdeStrncpy(dsD0900049F.szLedgerType, (const JCHAR *)(lpDS->szLedgerType),
DIM(dsD0900049F.szLedgerType));
dsD0900049F.cModelFlag = lpDS->cModelFlag;
jdeCallObject(_J("F0911FSValidateDocNumber"), NULL, lpBhvrCom,
lpVoid, (void *)&dsD0900049F, (CALLMAP *)NULL, (int)0, (JCHAR *)NULL,
(JCHAR *)NULL, (int)0);
   if (dsD0900049F.cRecordExistsFlag == _J('1'))
   {
       jdeSetGBRError(lpBhvrCom, lpVoid, (ID)IDERRmnDocNumber_11, _J("0002"));
       lpDS->cErrorFlag = _J('2');
   }
} /* end if document number isn't zero and action is 'A' */

*** Break In Code ***


Notes:
  • Error routine: dsD0900049F.cRecordExistsFlag is '1'
  • Data Structure dsD0900049F is data structure for BSFN F0911FSValidateDocNumber
  • Error Code '0002' is hard coded
  • cErrorFlag will be set to '2'
  • lpDS is long pointer data structure for the first level BSFN B0900049 - F0911FSBeginDoc
  • So, for this example, refer to source of B0900049 - F0911FSValidateDocumentNumber

For this example, the called report R0911Z1 exit from routine as xxxBeginDoc ends in error. Keep in mind the Master Business Function flow as below:
  1. xxxBeginDoc: Validate header/initialize variables and store header cache (if any)
  2. xxxEditLine: Validate Detail and create cache for detail
  3. xxxEditDoc: Compare header cache with detail cache (e.g., summary of detail has to be header)
  4. xxxEndDoc: Commit cache to DB and clear cache used

*** Break In Code of B0900049 - F0911FSValidateDocNumber ***
jdeStrncpy(dsF0911Key15.glkco, (const JCHAR *)(lpDS->szKeyCompany),DIM(dsF0911Key15.glkco));
jdeStrncpy(dsF0911Key15.gldct, (const JCHAR *)(lpDS->szDocumentType),DIM(dsF0911Key15.gldct));
MathCopy(&dsF0911Key15.gldoc, &lpDS->mnDocumentNumber);
memcpy((void *)(&dsF0911Key15.gldgj), (const void *)(&lpDS->jdGLDate), sizeof (dsF0911Key15.gldgj));
MathCopy(&dsF0911Key15.gljeln, &lpDS->mnJELineNumber);
jdeStrncpy(dsF0911Key15.glextl, (const JCHAR *)(lpDS->szLineExtension),DIM(dsF0911Key15.glextl));
jdeStrncpy(dsF0911Key15.gllt, (const JCHAR *)(lpDS->szLedgerType),DIM(dsF0911Key15.gllt));
nNumKeysF0911 = 7;
lpDS->cRecordExistsFlag = _J('0'); /* Note: cRecordExistFlag is initialized */
/************************************************************************
* Do a fetch keyed for account ledger record
************************************************************************/
idJDBReturn = JDB_FetchKeyed(hRequestF0911, ID_F0911_DOC_TYPE__NUMBER___B,
(void *)&dsF0911Key15, nNumKeysF0911,
(void *)&dsColF0911, FALSE);

if(idJDBReturn == JDEDB_PASSED/* If a record is found then set cRecordExistsFlag to '1' */
{
    lpDS->cRecordExistsFlag = _J('1'); /* cRecordExistFlag is set 1 */
}
*** Break In Code ***




Notes:
  • Based on input parameters in calling F0911FSBeginDoc, it assigns/copies data or pointer into dsF0911Key15
  • It is looking for specific index file so JDB_FetchKeyed() API is issued
  • As long as it fetches a record, the function sets cRecordExistFlag to '1' to stop Database(or JDBC) from issuing a Duplicate Key error




Example of jdedebug:
ERROR INFO JDEERR - ID= 0, Error= 0002 - \\DeploymentServerName\E1Release\PathCode\PackageName\Source\b0900049.c, Line=675
Notes:
  • Do not focus on deployment server name here as this is just information that C components are sitting in deployment server (for this example, b0900049.obj shall contain this information during compilation)
  • The debug log shows Error ID '0002', Business Function ID 'b0900049.c' and Line Number '675' which is same as the message written in F01131M
  • By searching jdedebug.log or UBE log using keywords 'F01131M' and/or 'JDEERR' the same debugging technique can be applied




Error '0002' because F0911Z1.DOC (Document Number) is not zero whereas Action Code is 'A-Add'







No comments:

Post a Comment

Amazon store

alidropship plugin

alidropship plugin
alidropship plugin

Total Pageviews

About