Liquid UI - WS Reference Library

new Reebok


Prerequisites


Runs On

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

Purpose

In this scenario, we need to do an action on a popup depending on which type of popup is showing. All the pop-ups have the same title, screen name, and screen number. We cannot use a “set” command to retrieve a value and do an action based on it. The solution is to use a new Reebok to retrieve the value in the popup as a normal “set” command would not work.


User Interface

Log into SAP and on the SAP Easy Access Screen navigate to VA21 Create Quote Transaction.
On the initial screen, we enter “ZSI” as the quotation type and hit enter.


On Enter, a function will run that goes to the next screen and sets Sold-to Party to 1000. The function will then hit enter and wait for user to choose Sales Area data.

Choose a Sales Area data. The following popup will wait for user input because it is the Shipping Party selection; however the following pop-ups after with the same popup box will be bypassed.

You will end up on the following screen

//SAPMV45A.E0101.sjs

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Author: Synactive, Inc. [1065 E. Hillsdale Blvd, Foster City, CA, 94404, USA]
// Email: support@guixt.com; sales@guixt.com;
// Contact: 650.341.3310
// Version: 1.0.0.0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

onUIEvents['Enter'] = {"process":va21OnEnter};

function va21OnEnter(){
    onscreen 'SAPMV45A.0101'
        enter();
    onscreen 'SAPMV45A.4001'
        set("F[Sold-to party]", "97001529");
        enter();
// Create a label to loop back
POP_UPS:;
    onscreen 'SAPLGRWU_SEL.0120'
        // wait for user input
        goto POP_UPS;
    onscreen 'SAPLV09C.0120'
        // New Reebok used to determine what happens on Popup
        rb = new Reebok([4,4]);
        if(rb.name.trim() == "SH"){
            // This popup pertains to the Shipping
            // Wait for user input
            goto POP_UPS;
        }
        else{
            // By pass this popup
            enter();
            goto POP_UPS;
        }
        goto POP_UPS;
    onscreen 'SAPLSLVC_FULLSCREEN.0700'
        enter('/12');
        goto POP_UPS;
    onscreen 'SAPLV45C.0100'
        enter('/12');
        goto POP_UPS;
    onscreen 'SAPMSDYP.0010'
        goto POP_UPS;
    onscreen 'SAPMV45A.4001'
        enter("?");
        
}