Purpose:
To strip numbers from a Standard SAP message and use it as required.
Liquid UI Code:
function testFunction(){
myarr = [];
mymsg = 'The order 123021213 is saved and 542321 updated'; // Sample message
var res = mymsg.match(/[-+]?[0-9]*\.?[0-9]+/g);
myarr = res.toString().split(','); // Store the numbers in an array
for(var idx=0;idx<myarr.length;idx++){
set('V[z_num&V[idx]]',myarr[idx]);
}
}
del('X[IMAGE_CONTAINER]'); // Delete ActiveX control on SAP Easy Access
inputfield([1,1],"Order Number", [1,15], {"name":"z_num0", "size":"15", "readonly":true});
inputfield([2,1],"Deliv. Number", [2,15], {"name":"z_num1", "size":"15", "readonly":true});
pushbutton([TOOLBAR],'Execute','?',{'process':testFunction}); // Function Call
See attachments for code samples!