Application Development 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: 

How to connect to SAP from C program?

former_member182426
Active Contributor
0 Kudos

Hi,

I have to connect to SAP from C program. I want to know what are the files we need to connect SAP from C program.

I searched in SDN, but i didnt find any information for my requirement.

Plz any documents or examples available on this.

Regards,

Shree.

6 REPLIES 6

former_member194416
Contributor
0 Kudos

What you want to make connecting SAP using C ? (I can't imagine any usefull scenario It's very low- level ). To connect using .net or java there are .net connector and java connector which maybe usefull.

Edited by: Gungor Ozcelebi on Jul 17, 2009 2:10 PM

anuj_srivastava
Active Participant
0 Kudos

Hi Shankar ,

I guess u will be using the exe file and want to run that exe file through your ABAP code.

In this case you can create the RFC destination in SM59 .

If this is your case and you want more let me know.

Regards,

Anuj

0 Kudos

Hi,

Thanks for your reply. First, i need to connect to SAP from my C program. I know how to connect from VB to SAP.

Regards,

Shree

0 Kudos

Hi ,

I have tried calling a c exe from my ABAP program but never used the C progarm to connect to SAP.

Try this [url|http://www.erpgenie.com/sap/abap/abaprfc.htm]

Maybe this will help u a bit.

Regards,

Anuj

former_member194416
Contributor
0 Kudos

If your aim is to run an .exe on frontend machine you can also use CL_GUI_FRONTEND_SERVICES execute method.

Former Member
0 Kudos

have a look at the RFCSDK. it is available in different languages and platforms.

[http://help.sap.com/saphelp_nw04/helpdata/EN/22/04287a488911d189490000e829fbbd/content.htm]

[http://help.sap.com/saphelp_nw04/helpdata/en/22/042887488911d189490000e829fbbd/content.htm]

[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/standards-and-open-source/mining%20r3%20with%20the%20rfcsdk%20what%20is%20rfc]

hope thes elinks help. the last one looks very promising