Hi
you have some problem in the query:
1. in the select query (after insert INTO @COUNTRY ) you have to define
left JOIN DLN1 T10 ON T10.BaseEntry= T0.DocEntry
instate of left JOIN DLN1 T10 ON 10.BaseEntry= T0.DocEntry
you wrote only 10 and you need T10 in the alias
2. table with @ in the start need [ ] - you have to write [@COUNTRY]
3 it is better to define UDT within the SAP instead of in query - it will prevent future problem wile upgrading the software
shachar