Purpose:
Some of the error messages will be displayed in a log. These messages should be displayed on status bar
Liquid UI Code:
//SAPLMIGO.E0001.sjs
//User interface
pushbutton([1,72], "Display log message",{ "process":logs_message});
// Function to display message on status bar
function logs_message(){
onscreen 'SAPLMIGO.0001'
set('F[Material]', '100-300');
enter();
// Function prototype to trim blank characters from a string
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g, "");
}
// Goods Issue Other
onscreen 'SAPLMIGO.0001'
enter('/7'); //Check
// Goods Issue Other
onscreen 'SAPLSBAL_DISPLAY.0120'
for(j=0; j<3; j++){
rb = new Reebok([2+j,1]);
if(rb.name.toString().indexOf("Warning")>-1){
if(isBlank(msg_type)){
msg_type = 'W:';
rb2 = new Reebok([2+j,10]);
msg_content = rb2.name.substring(rb2.name.indexOf("@",2)+1, rb2.name.length).trim();
}
} else if(rb.name.toString().indexOf("Error")>-1){
msg_type = 'E:';
rb2 = new Reebok([2+j,10]);
msg_content = rb2.name.substring(rb2.name.indexOf("@",2)+1, rb2.name.length).trim();
break;
}
}
enter();
onscreen 'SAPLMIGO.0001'
if(msg_type == 'E:'){
message("E:"+msg_content);
}
enter('?');
}
See attachments for code samples!