Author Topic: System Variables - _title/_user  (Read 4685 times)

Sai Siddhartha

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 47
    • View Profile
System Variables - _title/_user
« on: January 18, 2018, 07:41:30 AM »
_title
This variable retrieves the screen title where the user currently resides.
It is useful in Scenario where the script needs to be conditionalized based on the title of the current screen.
println("Screen title is>>"+_title);

_user
This variable specifies the current user. To find the user information and output it to console.
This variable is very useful in cases where you need to conditionalize scripts based on username.
println("User>>"+_user);

Liquid UI Code:
////////////////////////////////// SAPLCRA0.E4000 /////////////////////////////////////

// conditionalizing script based on "_title" system variable
if(_title=="Change Work Center: Basic Data"){
   del("G[General Data]");
}   
else if(_title=="Change Work Center: Default Values"){
   del("G[Units of Measurement of Standard Values]");
}


//////////////////////////// SAPLSMTR_NAVIGATION.E0100.sjs /////////////////////////////
// conditionalizing script based on "_user" system variable
if(_user=="JOHN"){
   pushbutton([5,15], "Create Sales Order","/nVA01");
   pushbutton([7,15], "Create Sales Order","/nVA02");
   pushbutton([9,15], "Create Sales Order","/nVA03");
}   
else if(_user=="SHANE"){
   pushbutton([5,15], "Create Material","/nMM01");
   pushbutton([7,15], "Change Material","/nMM02");
   pushbutton([9,15], "Display Material","/nMM03");
}


« Last Edit: February 02, 2018, 04:19:49 AM by sarvani.kusuri@guixt.com »