JD Edwards

JD Edwards
Lokesh Reddy Blog

Monday, December 14, 2015

NER To Read the Work Center Error Messages

=======================================================================
     NAMED ER: - Get Batch Error Messages From Work Center
=======================================================================
     evt_szPPATBriefMassage_MSGP
     evt_szSubstitutionValues_TSV
     evt_szErrorID_TMPI
     evt_szFunctionName_FCTNM
     evt_idF01131MHandle_HF01131M
     evt_mnSecondKey_SERK
     evt_szErrorMessage_TSV
     evt_szSourceLineNumber_LNBR
     evt_cErrorFlag_ERR
     OPT: Using Defaults
0001 //
0002 VA evt_cErrorFlag_ERR = "Y"
0003 If BF mnParentKeyValue_PPSRK is equal to <Zero>
0004    Get PPAT Messages By Work Field
           BF idMessagePointer_GENLNG -> BF idPPATWorkField
           BF mnParentKeyValue_PPSRK <- BF mnKeyValueSerialNumber
0005 End If
0006 F01131M(VA evt_idF01131MHandle_HF01131).Select
        BF mnSerialNumber_SERK <  TK Key Value Serial Number
        BF mnParentKeyValue_PPSRK =  TK ParentKeyValueSerialNumberA
0007 F01131M(VA evt_idF01131MHandle_HF01131).Fetch Next
        BF mnSerialNumber_SERK <- TK Key Value Serial Number
0008 While SV File_IO_Status is equal to CO SUCCESS
0009    VA evt_idF01131MHandle_HF01131 = F01131M.Open Handle
0010    F01131M(VA evt_idF01131MHandle_HF01131).Select
           BF mnSerialNumber_SERK =  TK Key Value Serial Number
           BF mnMessageLevel_LV =  TK Level of Indention
0011    F01131M(VA evt_idF01131MHandle_HF01131).Fetch Next
           VA evt_mnSecondKey_SERK <- TK Key Value Serial Number
           VA evt_szPPATBriefMassage_MSGP <- TK PPAT - Brief Message
           VA evt_szSubstitutionValues_TSV <- TK Template Substitution Values
           VA evt_szErrorID_TMPI <- TK Template ID
           VA evt_szFunctionName_FCTNM <- TK Name - Function
           VA evt_szSourceLineNumber_LNBR <- TK Source Line Number
0012    While SV File_IO_Status is equal to CO SUCCESS
0013       If VA evt_szPPATBriefMassage_MSGP is equal to <Null> Or VA evt_szPPATBriefMassage_MSGP is equal to <Blank>
0014          VA evt_szErrorMessage_TSV = VA evt_szSubstitutionValues_TSV
0015       Else
0016          VA evt_szErrorMessage_TSV = VA evt_szPPATBriefMassage_MSGP
0017       End If
0018       // Insert into Custom Error Table
0019       F55WCMSG.Insert
              BF szEdiBatchNumber -> TK EDI - Batch Number
              BF mnLineNumberID -> TK Who's Who Line Number - ID
              BF mnSerialNumber_SERK -> TK Key Value Serial Number
              VA evt_mnSecondKey_SERK -> TK Key Value Serial Number
              VA evt_szErrorID_TMPI -> TK Data Item
              VA evt_szErrorMessage_TSV -> TK Template Substitution Values
              VA evt_szFunctionName_FCTNM -> TK Name - Function
              VA evt_szSourceLineNumber_LNBR -> TK Source Line Number
              BF mnEdiDocumentNumber -> TK EDI - Document Number
              VA evt_cErrorFlag_ERR -> TK Data Field Error Code
0020       F01131M(VA evt_idF01131MHandle_HF01131).Fetch Next
              VA evt_mnSecondKey_SERK <- TK Key Value Serial Number
              VA evt_szPPATBriefMassage_MSGP <- TK PPAT - Brief Message
              VA evt_szSubstitutionValues_TSV <- TK Template Substitution Values
              VA evt_szErrorID_TMPI <- TK Template ID
              VA evt_szFunctionName_FCTNM <- TK Name - Function
              VA evt_szSourceLineNumber_LNBR <- TK Source Line Number
0021    End While
0022    F01131M(VA evt_idF01131MHandle_HF01131).Close
0023    F01131M.Fetch Next
           BF mnSerialNumber_SERK <- TK Key Value Serial Number
0024 End While