When using the search option with the set command, users can use the different syntaxes to search different sources. In all cases, the search will return the text immediately following the search term. An example is shown below, where we will enter the following code into the VA01 script file:
pushbutton([TOOLBAR] , "test" , "/nva01" ,{"process":va01_test});
function va01_test(){
onscreen 'SAPMV45A.0101'
set("F[Order Type]" , "OR");
enter();
onscreen 'SAPMV45A.4001'
set("F[Sold-to party]" , "1460");
enter();
onscreen 'SAPMV45A.4001'
println("----After entering sold-to party----");
enter("/11");
onscreen 'SAPMV45A.4001'
if(_message){
set("V[z_message]","&V[_message]",{"search":"Order"});
println("After z_message>>>" +z_message);
}
enter("/nva01");
message(z_message);
}
We have created a toolbar pushbutton. When you press the pushbutton, it will call a process that actually does the search.