Normally the working directory of the ABL client is fixed when the session starts, either by setting the "Start in:" directory in the Windows shortcut, or by changing to the directory in a startup script.
Changing the working directory of a running process is considered bad practice as it is very likely to interfere with any file I/O that uses relative pathnames; the code above can be used as a workaround if some other component in the environment changes the working directory unexpectedly.
References to Written Documentation:
OpenEdge Development, chapter: Programming Interfaces
000022094, How to obtain the working directory via the 4GL?