There are a couple of possibilities. The best is to sign the functions with a certificate which exists in both databases. In the other database, you create user from the certificate which you grant permissions on the required tables.
I have a longer article on my web site where discuss this technique in detail and also discuss other solutions for cross-database access.
http://www.sommarskog.se/grantperm.html
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]