Hi,
This is probably because you have a key figure with fixed currency, instead of having a reference currency for your key figure. The system tries to generate programs(subroutines/include program) and get the reference currency field but fails, so that syntax error happens for the generated program.
Haifeng