Both would need to be done. You should perform a trench and treat around the perimeter of the screened porch, but you also need to be concerned about the seam where the porch is attached to the house….where the beam is that you described. Any time you have an “add on” to the house, in this case the screen porch, it is possible for termites to enter between the porch and the house. Therefore, you should drill along that seam and treat with a termiticide along the house foundation as well as around the perimeter.
To treat subterranean termites we always recommend to trench where you can and also treat the crawlspace. Termidor SC can be used in crawlspaces. There are complete instructions on the Termidor SC product label (page 5) on how to use the product in the crawlspace, so if a bit inadvertently goes into the crawlspace it should not pose a problem.