After the DEFINE BUTTON statements, the next statements define the two queries your procedure uses:

DEFINE QUERY OrderBrowse FOR 
      Order SCROLLING.

DEFINE QUERY CustQuery FOR 
      Customer SCROLLING.

These statements define the query objects that your code later opens using the specific WHERE clause you defined in the Query Builder. The Order query got its name by default from the browse that displays its data, which you see next. The Customer query got its name from the frame it is in. You learn more about queries in Use Queries.