General information
Category:
Coding, syntax & commands
>>>This works:
>>>
>>>lc_xls = "C:\myfile.xls"
>>>lc_fileldlist = "invno, invdte, invamt"
>>>COPY TO (lc_xls) FIELDS &lc_fieldlist TYPE xl5
>>>
>>>This gives a syntax error:
>>>lc_xls = "C:\myfile.xls"
>>>lc_fileldlist = "invno, invdte, invamt"
>>>COPY TO (lc_xls) FIELDS (lc_fieldlist) TYPE xl5
>>>
>>>Why?
>>
>>lc_fileldlist vs lc_Fieldlist ?
>
>&lc_fieldlist vs (Lc_fieldlist)
>
>& is a macro command and does an immediate replacement whereas () returns a "value", iirc, and "invno, invdte, invamt" is not a value
The two variables are not spelled the same way in your original message.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only