There are a few ways to do this (of course!)--
The way that is closest to what you are doing now is just a little hacky-- it requires that you know the auto-field names of the UPC and item number on the screen you are working with (like F_100_20 -- you can use the DevCenter to discover, or View Source in your browser when Screensurfer has delivered).
Assuming that UPC is F_100_20 and item number is F_500_10:
Then, define a new transaction in your template, like:
when tranpath_1 is "mykeytran">
<teaction putfield 2 21 web.UPC>
<teaction putfield 6 21 web.ItemNo>
<teaction enter "keystring that was in the sendkeys">