Clarification on class $SPP$?
$\mathsf{SPP}$ is a class of languages, so we can ask whether a language is in $\mathsf{SPP}$, not some input in $\Sigma^*$. The function $f$ is fixed before seeing the inputs, as it defines the language. You don't look at the input and then ask if there exists some function. 

Think of it this way, $\mathsf{SPP}$ is the class of languages decidable by a certain class of nondeteministic polynomial time machines, namely those for which the difference between the number of accepting and rejecting paths takes values in $\{0,1\}$ (for all inputs). Note that for a general NP machine, given input $x$ this difference can take values in $\{0,1,...,2^{poly(|x|)}\}$. Given such a machine $M$, the associated $\mathsf{SPP}$ language is the set of all inputs for which the difference is $1$.