Skip to main content

Python: Import TXT File

Hello, I would like to import a SAP table (txt file) into IDEA using Python.

When running the code I get the following error message:
IDEA.ImportDelimFile(importPath, dbName, False," ", rdfPath, True)
File "<COMObject Idea.IdeaClient>", line 3, in ImportDelimFile
pywintypes.com_error: (-2147352567, 'Ausnahmefehler aufgetreten.', (0, 'Idea.IdeaClient.1', 'Invalid record definition file', None, 0, -2147467259), None)
 
Can anyone help me?

klmi Wed, 04/27/2022 - 07:02

With regard to the error message it seems that there's something wrong with the rdf file. Is it possible to import the text file manually with that definition? 

chrissi97 Fri, 04/29/2022 - 05:11

Hi klmi, 
thank you for your answer. The manual import with the rdf-file is possible. I have also tried it with VBS. It works there too. Only with Python do I get this error message. Do you have any further ideas for me to solve this problem? 
Thank you!

klmi Tue, 05/03/2022 - 17:30

In reply to by chrissi97

Python works only like a remote controller so actually IDEA is doing the import. Is it possible that there's something wrong with your path of the rdf file? That's the only idea under these circumstances.