Liquid UI - WS Reference Library

Get last executed function code.


Prerequisites


Purpose

_last_fcode is a system variable. Its purpose is to return the last executed function code for which the client has processed.

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!


User Interface

Log into SAP and on the SAP Easy Access Screen click on the “_last_fcode’ – Test” TOOLBAR pushbutton.



Liquid UI Script

//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');

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

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

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

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

    // Change Sales Order: Initial Screen
    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('?');    
}


Was this information helpful? Send Feedback