Code for the same:
public void lookup()
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
SysTableLookup sysTableLookup =
SysTableLookup::newParameters(tableNum(ProjHourSalesPrice), this);
sysTableLookup.addLookupfield(fieldnum(ProjHourSalesPrice, ProjSalesPricing));
queryBuildDataSource = query.addDataSource(tableNum(ProjHourSalesPrice));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}