We prove a relationship between a general inhomogeneous discrete variational problem, positive semidefiniteness of its second variation, and a certain inhomogeneous boundary value problem. This result gives both necessary and sufficient conditions for the solvability of our discrete variational problem.