Python: Import TXT File

5 posts / 0 new
Last post
chrissi97
Offline
Joined: 03/23/2022 - 09:38
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?

chrissi97
Offline
Joined: 03/23/2022 - 09:38

Python

Images: 
klmi
Offline
Joined: 02/13/2019 - 08:41

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
Offline
Joined: 03/23/2022 - 09:38

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
Offline
Joined: 02/13/2019 - 08:41

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.