Hi,
With a few components (resistor, transistor and ...) it is possible to make a current source that can be switched on and of with a digital output.
But it depends on what you exactly want, precision, voltages, etc.
Can you tell a bit more about the application ?