Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Need to connection abap with python.

Rewati_Raman
Product and Topic Expert
Product and Topic Expert
0 Likes
1,632

Hello People,

Is there any way I can connect python with abap.

I need to fire SQL query in abap from Python.

1 ACCEPTED SOLUTION
Read only

SimoneMilesi
Active Contributor
1,265

You can use PyRFC

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,265

HTTP, RFC, inbound emails, sapevt, ... (+ need to write ABAP code to trigger SQL)

Or direct access to the database used by SAP

Read only

SimoneMilesi
Active Contributor
1,266

You can use PyRFC

Read only

Rewati_Raman
Product and Topic Expert
Product and Topic Expert
0 Likes
1,265

Hello Simone,

Thanks for the help .

I am doing it for window 10, but it seem it require lots of other tools and plugin.

It require VS Code C++ tools.

I download and followed the instruction but I am stuck with below error.

C:\Users...\PycharmProjects\OData\PyRFC>python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
running build_ext
skipping 'src/pyrfc_pyrfc.cpp' Cython extension (up-to-date)
building 'pyrfc._pyrfc' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D_LARGEFILE_SOURCE -DSAPwithUNICODE -D_CONSOLE -DWIN32 -DSAPonNT -DSAP_PLATFORM_MAKENAME=ntintel -DUNICODE -D_UNICODE -
IC:\Users...\AppData\Local\Continuum\anaconda3\envs\OData\include -IC:\Users...\AppData\Local\Continuum\anaconda3\envs\OData\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include" /EHsc /Tpsrc/pyrfc_pyrf
c.cpp /Fobuild\temp.win-amd64-3.7\Release\src/pyrfc_pyrfc.obj -IC:\nwrfcsdk\lib;\include "-IC:\Program Files (x86)\Python37-32\Scripts\Include" "-IC:\Program Files (x86)\Python37-32\Scripts\Include\PC"
_pyrfc.cpp
C:\Users....\AppData\Local\Continuum\anaconda3\envs\OData\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe' failed with exit status 2



It appear when I doing "build the package from source" step.

Regards,

Rewati Raman