INJECTION OF A SELF-CONSISTENT BEAM AT THE SPALLATION NEUTRON SOURCE