Author Topic: Purchase Order Screens Determination  (Read 5188 times)

Benjamin Dasari

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 95
    • View Profile
Purchase Order Screens Determination
« on: March 07, 2016, 02:35:48 PM »
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.

Liquid UI Code:

//***********************************************
// SAPLSMTR_NAVIGATION.E0100.sjs
// User Interface
//***********************************************
del('X[IMAGE_CONTAINER]');      // Delete AxtiveX Container on SAP Easy Access screen
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
   }
}


See attachments for code samples!
« Last Edit: March 30, 2016, 05:13:39 PM by Benjamin Dasari »