Author Topic: _last_fcode Command  (Read 6711 times)

Benjamin Dasari

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 96
    • View Profile
_last_fcode Command
« on: October 13, 2016, 11:10:50 AM »
Purpose:
This command is used to capture the last executed function code in the '_last_fcode' system variable.
In the below example, the value of the '_last_fcode' is printed on the Cornelius Output window.

NOTE - Available from WS Version 1.2.295.0 and Liquid UI Server Version 3.5.522.0 onwards!

Liquid UI Code:

// SAPLSMTR_NAVIGATION.E0100.sjs
pushbutton([TOOLBAR], "'_last_fcode' - Test", '/nVA02', {"process":lastFcode});      

function lastFcode(){
   onscreen 'SAPMV45A.0102'
      set('F[Order]','5004');
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter();
   
   onscreen 'SAPMSDYP.0010'
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter();
      
   onscreen 'SAPMV45A.4001'
      set('V[z_va02_ponum]','&F[PO Number]');
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter('=T\\03');

   onscreen 'SAPMV45A.4001'
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter('/6');

   onscreen 'SAPMF02D.7000'
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter('=TAB04');

   onscreen 'SAPMF02D.7000'
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter('/3');

   onscreen 'SAPMV45A.4001'
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter('/3');

   onscreen 'SAPMV45A.0102'
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter('/n');
      
   onscreen 'SAPLSMTR_NAVIGATION.0100'
      println('\nThe last fcode is:'+_last_fcode+':\n');
      enter('?');   
}


See attachments for code samples!
« Last Edit: October 13, 2016, 11:42:26 AM by Benjamin Dasari »