Recently, I've been working with Logging API errors using another custom M3 API (CRKR03) as a part of MEC development. Some API's had returned NOKs with additional white spaces i.e. TABS and Spaces exceeding the field (MESG) length of the CRKR03 that we have used to log errors.
First, let me explain how I've received the API NOK message by setting the ErrorHandling Property of the M3 API to Ignore M3 NOK.
Some API NOK messages are like the below (Note the additional white spaces)
First, let me explain how I've received the API NOK message by setting the ErrorHandling Property of the M3 API to Ignore M3 NOK.
if(!isLastAPICallOK() && getLastMIProgram().trim().equals("PDS001MI"))
{
g_ErrorMessage = getLastAPIMessage().trim().replaceAll("\\s+", " ");
........
}
'Item number 010411 does not exist
WIT0103 '