Liquid UI - WS Reference Library

Extract Numbers from a SAP Message


Runs On

  SAP GUI Android iOS WM Web
Direct Connect          
Liquid UI Server Connect        


To strip numbers from a Standard SAP message and use it as required.

User Interface

Log into SAP and on the SAP Easy Access Screen click on the ‘Execute’ toolbar pushbutton and the numbers will be displayed in the inputfields:

 Liquid UI Script


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++){
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