Why do you need to hard-code the screen width in the first place? Where does it come from?
In most real applications, it comes from some system API,which tells you which resolution you're currently running, or which resolutions the system is capable of displaying.
Then you just take that value and pass it to wherever it is needed.
In short, on this line: doSomethingWithValue(SCREEN_WIDTH);
you're already doing it. SCREEN_WIDTH
might be a global in this particular example, but it doesn't have to be, because the function isn't accessing it as a global. You're passing the value to the function at runtime, so what the function sees isn't a global variable, it's just a plain function argument.
Another important point is that there's typically nothing wrong with immutable global data.
Global constants are typically fine. The problem occurs when you have mutable global state: objects that can be accessed throughout all of the application, and which might have a different value depending on when you look. That makes it hard to reason about, and causes a number of problems.
But global constants are safe. Take for example pi. It is a mathematical constant, and there's no harm in letting every function see that pi is 3.1415..... because that's what it is, and it's not going to change.
if the screen width is a hard-coded constant (as in your example), then it too can be a global without causing havoc. (although for obvious reasons, it probably shouldn't be a constant in the first place9