...
Please note that USING statements have to follow the Error Handling statements.
USING Statements in AppBuilder .w Files
Do not place USING Statements (like BLOCK-LEVEL/ROUTINE-LEVEL) not in the definitions section.
Place them in a dedicated “Declarative Statements” section.
Otherwise the AppBuilder generated FRAME-Query Definition would be before the USING Statements in the source code. This would cause compile errors.
...