I tested this here with a simple record layout for an indexed file and it worked fine.
There is an entry under Restrictions in the Help that says the following:
"When creating a structure file, you cannot use an .idy file from a project compiled with the ODOSLIDE Compiler directive"
Are you setting the ODOSLIDE directive on when compiling your program?
If not then I will need some more details or a simple demo containing your select and fd for your file along with the directives that you are compiling with so I can test this here.
Thanks.