Say we have a sheafs $\mathcal{F}$ and $\mathcal{G}$ (of rings) on an affine scheme $X=\operatorname{Spec} A$, and we can define for all principal opens $D(s)$ in $X$ a map $\varphi_{D(s)}:\mathcal{F}(D(s))\rightarrow \mathcal{G}(D(s))$, which satiesfies the condition that for each $s\in A$ we have $\rho^{X}_{D(s)}\circ \varphi_{X}=\varphi_{D(s)}\circ \rho^{X}_{D(s)}$, where $\rho$ denotes the restriction map for $\mathcal{F}$ and $\mathcal{G}$, respectively. Do we have a sheaf map already, so does $\varphi$ commute with all restriction maps? Or what extra condition would be needed to make this true?
This question arose because I'm trying to understand the bijection $$\operatorname{Hom}(X,Y)\rightarrow\operatorname{Hom}(A,\Gamma(X,\mathcal{O}_X),$$ where $(X,\mathcal{O}_X)$ is a locally ringed space and $Y=\operatorname{Spec} A$, by the proof given in Goertz/Wedhorn. Giving a map $\varphi$ in the right set, we define a map $f:X\rightarrow Y$ of sets by setting $$f(x)=\ker(A\stackrel{\varphi}{\rightarrow}\Gamma(X,\mathcal{O}_X)\rightarrow \kappa(x)).$$For an $s\in A$ we have $$f^{-1}(D(s))=\{x\in X\mid s\notin f(x)\}=\{x\in X\mid \varphi(s)(x)\neq0\in \kappa(x)\}=X_{\varphi(s)}$$ is open, so $f$ is continuous. I also understand that $\varphi(s)_{|X_{\varphi(s)}}\in\Gamma(X_{\varphi(s)},\mathcal{O}_X)$ is a unit, and for defining the sheaf map $\mathcal{O}_X\rightarrow f_*\mathcal{O}_Y$ it is enough to consider principal opens, so we need maps $$\Gamma(D(s),\mathcal{O}_Y)=A_s\rightarrow \Gamma(X_{\varphi(s)},\mathcal{O}_X),$$ and because $\varphi(s)_{|X_{\varphi(s)}}\in\Gamma(X_{\varphi(s)},\mathcal{O}_X)$ is a unit, there is one unique such for which we are compatible with $\varphi$, that is, compatible with restriction maps of the global sections to any principal open. Why does it follow that we are compatible with all restriction maps then to have a sheaf map? I'm thankful for any help.
I think I came up with the answer myself, at least for my second question. I tried to write out the details: the map $\Gamma(D(s),\mathcal{O}_Y)=A_s\rightarrow \Gamma(X_{\varphi(s)},\mathcal{O}_X)$ is given by $a/s^m\mapsto \varphi(a)_{|X_{\varphi(s)}}\varphi(s)^{-m}_{|X_{\varphi(s))}}$. Assume now we have an inclusion $D(s)\subseteq D(t)$, say $s^n=rt$ for some $n\in\mathbb{N}$ and $r\in A$. Starting with an element $a/t^m$ in $\Gamma(D(t),\mathcal{O}_Y)$, applying first the restriction and then the sheaf map we get $$\frac{a}{t^m}\mapsto \frac{ar^m}{s^{nm}}\mapsto\varphi(ar^m)\varphi(s)^{-nm}_{|X_{\varphi(s)}},$$ while vice versa it is $$\frac{a}{t^m}\mapsto \varphi(a)_{|X_{\varphi(t)}}\varphi(t)^{-m}_{|X_{\varphi(t)}}\mapsto\varphi(a)_{|X_{\varphi(s)}}\varphi(t)^{-m}_{|X_{\varphi(s)}}.$$ We have $\varphi(s)=\varphi(r)\varphi(t),$ and when restricted to $X_{\varphi(s)}$ both $\varphi(s)$ and $\varphi(t)$ are invertible - hence also $\varphi(r)$ - and we can write validly $$\varphi(t)^{-m}_{|X_{\varphi(s)}}=\varphi(r^m)_{X_{\varphi(s)}}\varphi(s)_{|X_{\varphi(s)}}^{-nm},$$ and this shows the claim.
So I think the answer to my first question in no, because I see no reason why this should work more generally.