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: 

Interfacing C++ application with SAP to call a BAPI through webservice

Former Member
0 Kudos

Hello Team,

Can you please suggest whether a BAPI exposed as webservices can be  used by C++ application to get the information from ECC ? If yes, then do we need to install any add-ons etc. in ECC and C++ application  ? Also, does it needs SOAP ?

Regards

Sam

15 REPLIES 15

mauro_blanc3
Active Participant
0 Kudos

You can either do it through PI using an outbound webservice or you can use a Connector.

Check these links:

https://websmp210.sap-ag.de/public/connectors

SAP Automation RFC and BAPI Interfaces

0 Kudos

Thanks for your reply Mauro.

I thought if we expose the BAPI as webservices then we don't need any connectors . C++ can use it consume this webservice through SOAP protocol . Isn't that the case ?

Regards

Sam

0 Kudos

It is correct.

You can use either a webservice or a connector.

I'm sorry if I wasn't clear enough in my previous answer.

0 Kudos

Thanks for your confirmation .

We have decided to expose the BAPI as web-service so that it can be referred by C++ application to get the order information from ECC to C++ application .

Can you please suggest the things we need to do from C++ side to ensure it can call the web-service (BAPI) and get the data from ECC ?  Like do we need to install anything in C++ application .

Regards

Sam

0 Kudos

Once you get the WSDL from PI you can acces it by C++.

Google for gSOAP.

0 Kudos

Customer doesn't have PI in place . I believe we can expose the BAPI as webservice in ECC without using PI .  Do we need to install anything in ECC or C++ so that C++ can use this web-service ?  Also, I believe we do not need any connectors as we have exposed the BAPI as web-service - please confirm .

Thanks for your guidance till now

Cheers

Sam

0 Kudos

If customer doesn't have PI then you can't create the webservice,  You'll have to use a connector.

0 Kudos

I thought we can create a web-service from BAPI transaction in ECC and then can use SOAMANAGER to create the URL .

Regards

Sam

0 Kudos

The web service is created with SPROXY transaction, then you need to open a channel to comunicate ECC with any external system using PI.

But in your case, you need to use a SAP Connector to be able to use any BAPI with C++.

0 Kudos

Ok, even though it is web-service we need a connector to access it from non-SAP like C++ based application  - this is bit strange based on my limited technical knowledge.

Developing a Web Service Based on Existing Functions (Inside-Out) - Creating and Configuring Service...

In this case do we need to use SAP business connector or NW RFC connector  - which is recommended for connecting with C++ ?

Regards

Sam

0 Kudos

I would go with a Connector.

0 Kudos

SAP business connector is almost obsolete as per me. So NW RFC connector I guess.


Also you might want to explore the option to call RFC C++ Class Library


Connect - RFC C++ Class Library (BC-FES-AIT) - SAP Library



0 Kudos

May I know the limitation of using Web Service based on Inside-Out mode over outside-in approach ( which I believe requires middle ware and/or connectors).

In this case do we need to use SAP business connector or NW RFC connector  - which is recommended for connecting with C++ ?


Regards

Sam

0 Kudos

Thanks Rundra for your reply . For using RFC C++ class library do we need to install anything in C++ and ECC  ?  Also, can it work in direct point to point communication without using any middleware ?

Cheers

Sam

0 Kudos

From ECC side you don't need to install anything. RFC is standard technique and available out of the box unless you are using R/2

From C++ side also I don't think you need logically as C++ is second generation language and itself is quite powerful.  I may be wrong because it is quite long time I wrote a program in C/C++

You may need to include the library that SAP is suggesting ( similar to  we use #INCLUDE <stdio.h> ), in your code . Please check with your C++ developer

R