Liquid UI - WS Reference Library

Purchase Order Screens Determination


Prerequisites


Runs On

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

Purpose

To differentiate between the Purchase Order Create, Change and Display screens and Purchase Requisition screens since they can be accessed from 6 different transactions such as ME21N, ME22N, ME23N, ME51N, ME52N, ME53N.

User Interface

Log into SAP and on the SAP Easy Access Screen click on the pushbuttons listed for different transactions. The Liquid UI script will only be executed if you land on Create Purchase Order screens.


 

Liquid UI Script

//SAPLSMTR_NAVIGATION.E0100.sjs

// User Interface
del('X[IMAGE_CONTAINER]');
box([1,1],[7,36], "Purchase Order/Purchase Requisition");
pushbutton([2,3], "ME21N", '/nME21N', {'size':[1,15]});
pushbutton([4,3], "ME22N", '/nME22N', {'size':[1,15]});
pushbutton([6,3], "ME23N", '/nME23N', {'size':[1,15]});
pushbutton([2,20], "ME51N", '/nME51N', {'size':[1,15]});
pushbutton([4,20], "ME52N", '/nME52N', {'size':[1,15]});
pushbutton([6,20], "ME53N", '/nME53N', {'size':[1,15]});

// SAPLMEGUI.E0014.sjs

// User Interface
//***********************************************
if(   _transaction == 'ME21N' || _transaction == 'ME22N' || _transaction == 'ME23N' ||
   _transaction == 'ME51N' || _transaction == 'ME52N' || _transaction == 'ME53N' ) {

   // Differentiate between Purchase Order(PO) and Purchase Requisition(PR) screens
   if(<'F[Doc. date]'>.isValid) {                                 // PO Transaction
      if(!<'F[Doc. date]'>.isprotected) {                     // Create PO Transaction
            // Create PO Interface Code goes here
            title(_title + ' - Liquid UI Screen');
            del('P[Personal Setting]');   // Toolbar Pushbutton
            del('F[Vendor]');
      } else {                                       // Change or Display PO Transaction
         if(<'P[Check]'>.isValid) {                        // Change PO Transaction
            // Change PO Interface Code goes here
         } else {                                    // Display PO Transaction
            // Display PO Interface Code goes here
         }
      }
   } else {
            // PR Transaction
   }
}