Python - how to get the attributes/methods of SAP GUI application?

Dear Experts,

Could you please advise in Python how to get all the attributes/methods of an object?

Actually I need to write a Python code which works together with SAP application and it took almost a week to find in separate Python codes through Google, that there are 'Info' and 'SystemName' attributes for the "SAPGui" object.

This code so works already with showing the system name of that connection in SysName variable:

import win32com.client

SapGui = win32com.client.GetObject("SAPGUI")
print(SapGui)
Appl = SapGui.GetScriptingEngine
print(Appl)
Connection = Appl.Children(0)
print(Connection)
Session = Connection.Children(0)
print(Session)
CollCon = SapGui.GetScriptingEngine.Children(0)
print(CollCon)

SysName = Connection.Children(0).Info.SystemName
print(SysName)

Open in new window


Now it can be even in one line:

FullAttr = win32com.client.GetObject("SAPGUI").GetScriptingEngine.Children(0).Children(0).Info.SystemName
print(FullAttr)

Open in new window


And here comes my question concretely - what is the way to find these attributes like Info and SystemName in Python for such outside application? I am using Spyder for writing Python code and the default tool which brings a list after pressing '.' for the object, it does not work for such outside application
Attribute finder in Spyder
Thanks in advance,
LVL 1
csehzIT consultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle SantosCustomer RelationsCommented:
Hi,

I am here to help you with your open question.  Do you still need help?  I have the ability to alert more experts if you still need help.

If you solved the problem on your own, would you please post the solution here in case others have the same problem?

If you need me to delete this question just say "Delete."

Thank you for using Experts Exchange.

Regards,

Kyle Santos
Customer Relations
0
csehzIT consultantAuthor Commented:
I found the solution by myself and it is much easier than thought, the SAP application itself has a help menu on the below printscreens, which then lists all the objects attributes for SAP Scripting

Printscreen where to find the Help menu in SAP application
Example showing that which kind of objects can be found in details with even concrete code
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kyle SantosCustomer RelationsCommented:
Thank you for letting us know!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.