Purpose: Mark entry fields with a small red cross to either prompt for user input or highlight the field, etc.
A small red cross is displayed in front of the entry field. This can be achieved by calling the "cmdMark" function and passing parameters to it.
Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: SAPMV45A.E0101.sjs
----------------------------------------------------------------------------------------------------------------------------------------------
// Function to trim blank spaces at the end of the string
String.prototype.trim = function(){return this.replace(/^\s+|\s+$/g,'');}
function getString(strInput) {
return (typeof(strInput) == 'undefined') ? "" : strInput.toString().trim();
}
function isBlank(strInput) {
var strVal = getString(strInput);
var blank = strVal == "";
return blank;
}
// Function to mark entry fields with a small red cross
function cmdMark(fldName,nOffset,strIcon) {
if(isBlank(nOffset) || nOffset < 2) {
nOffset = 3;
}
if(isBlank(strIcon)) {
strIcon = '02';
}
var nRow = <'F['+fldName+']'>.row;
var nCol = <'F['+fldName+']'>.column;
text([nRow,nCol-nOffset],'@'+strIcon+'@');
}
// Liquid UI Interface
cmdMark("VBAK-AUART"); // Order Type