I understand IMPORT DOCUMENT to be a method to import a file from a data folder (hard drive) into an attribute of the type document or picture.
And not to import instances of a BO from an attribute of type document containing a file in csv format.
According to the editor, my understanding is correct:
ENTER NEW DataImportBO <-- This allows the user to upload the file
DISPLAY MESSAGE FILE_NAME(DataImportBO.DataFile) <--This works!
IMPORT DOCUMENT MyBO FROM DataImportBO.DataFile <-- This is invalid code and the editor won't save it.
DISPLAY MESSAGE 'End import' <-- this works
Although I did not want to do this - good habits die hard.(Don't mess with files on an application server, because somewhere in the future the sysadmin from hell is going to prevent access) I believe I have to implement it this way:
ENTER NEW DataImportBO <-- This allows the user to upload the file
DISPLAY MESSAGE FILE_NAME(DataImportBO.DataFile)
EXPORT DOCUMENT DataImportBO.DataFile TO FILE '/home/serversaccount/ATempFolderOnTheServer/ATempCSVFile.csv'
IMPORT MyBO FROM '/home/serversaccount/ATempFolderOnTheServer/ATempCSVFile.csv'
DISPLAY MESSAGE 'End import'