Liquid UI - WS Reference Library

returnvalues()


Purpose

The returnvalues() command is used to return values or messages from a new mode, opened with "/O" to the old mode.


Syntax

returnvalues("string");


Example

This example demonstrates the usage of returnvalues() by passing values to the new session.


Script

// SAP Easy Access Screen 
pos('X[IMAGE_CONTAINER]',[10,0]); 
pushbutton([2,1],"Opening Session from Functions",{"process":openSession,"size":[2,20]}); 
function openSession(){ 
  onscreen '*' 
  enter("/omm01",{"process":executeMM01NewSession,"using":{"l_mm01":"Values Passed"}}); 
} 
// Executed once for each session 
function executeMM01NewSession(param){ 
  println(param.l_mm01); 
  onscreen '*' 
  set('F[Material Type]','FERT'); 
  set('F[Industry sector]','M'); 
  // Executes the specified fcode in session from which a new session was initiated
  returnvalues({"fcode":"?"}); 
  // Continues Execution in New Session enter("/5"); 
  onerror  
  message(_message); 
  enter('?'); 
}


Tips and Tricks

  • returnvalues

    To read data by opening a new session and continue processing in the old session using the data read from the new session.

    returnvalues({'fcode':'?','process':processOldSession,'using':{'l_ponum':z_va02_ponum}});

    Learn more about returnvalues and how to process the data in old session by passing the values from new session.