The syntax exists:
*WHEN_REF_DATA = MASTER_DATA //loop all members including empty
To be placed before WHEN/ENDWHEN
But this statement affects all dimensions and the resulting performance will be terrible.
In most cases it's better to repeat WHEN/ENDWHEN loops.
Also, for DM package and simple sum of accounts you can use code in my second post (not for default.lgf)
Vadim