cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI and RFC

Former Member
0 Kudos

can any one explain the different between bapi and rfc?

Message was edited by:

Ravichandran Kanagasabai

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi Ravichandran,

BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.

Also have a look at the following link....

http://www.sap-img.com/abap/interview-question-on-bapi-rfc-abap-objects-tables.htm

Regards,

Abhy Thomas

Former Member
0 Kudos

Hi Ravichandran,

Adding to above points..

---> BAPI is also an RFC.Basically for RFC and BAPI, the configuration steps are the same.

Configuration required in XI for RFC/BAPI communication-

1) SM59 - of type TCP/IP connection poinintg to R/3 system . to Send the RFC message from XI to R/3

2) Import the RFC/BAPI in the IR

3) Do the Mapping and Interface Mapping. As RFC/BAPI itself acts as a Message interface, it is not required to have any explicit message interface created for that

4) In Integration Directory - create Configuration scenario, Sender Agreement, Reciever Agreement, Reciever Determination /Interface Determination etc

5) Assumption Business System is created in the SLD pointing to R/3 system

6) Create a communication channel of type RFC adapter type for both sender/reciever

In R/3 - create a SM59 entry of TCP/IP connection pointing to XI system with Program Id for sending RFC/BAPI message from R.3 to XI.

To configure RFC sender -

/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step

you can expose RFC/BAPI as a WebService i.e all RFC enabled function modules are also accessible as Web Services.

IR:

Make sure that the import of RFC/ IDocs is enabled in SWC.

Import the RFC(BAPI).

This imported content is used as MT.

Now you need not be created any DTs or MTs as long as u use the imported content.

RFC itself acts as Message interface and u need define one.

ID:

Make sure while defining the comm channel, make sure that u have req log on details to make the RFC call.

Other attributes such as Program ID, RFC destination...

Basis guys should be able to help you in this reg.

Regards,

Ramesh.

Former Member
0 Kudos

Dear Ramesh,

Thanks. I have done the all the step. How to excute? (pull the date from SAP?)

I tried to execute through (r3) se37 and using test function module. it was giving the mapping error. there is any way to execute.

Regards

Ravichandran K

prabhu_s2
Active Contributor
0 Kudos

<b>pull the date from SAP</b>

first check if ur rfc is working fie by debuggin in se37...and if yes then check for the repsonse mapping in IR. maight be somehting is missing here

Former Member
0 Kudos

Dear Prabhu,

Ok. I mapped COMPANY (request ) RFC . i will try to map the response mapping.

1. How to execute? Whether i have to run from R/3 through se37 or i have do some scheduleing programeing .. if it is please give steps.

Ravi

Former Member
0 Kudos

run it from R/3 you get response back to R/3

Former Member
0 Kudos

Hi Ravi,

You can just go through the below blogs which will give u a fair amount of idea on how to trigger the RFC...

/people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous

[original link is broken]

Regards,

Abhy Thomas

prateek
Active Contributor
0 Kudos

Hi Ravichandran,

BAPI stands for Business Application Programming Interface. It is a library of functions that are released to the public as an interface into an existing SAP system from an external system.

1) The advantage of using BAPIs over using RFCs is that using BAPIs requires no ABAP programming knowledge. You use BAPIs from standard programming languages such as C++ and Java.

2) The difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.

RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system. Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench. They are then called RFC function modules. BAPIs are complete sets of (BAPI) function modules that model a business application.

RFC is the protocol used by SAP for remote communication, that is, for communications between remote independent systems.RFC is used for communications between two independent SAP systems, or for communications between an SAP system and a non-SAP system, such as an external application. It can also be used for communications between modules on the same system.Using the RFC interfaces you can extend the functionality of R/3 applications from an external program.

An R/3 system also contains Business Application Programming Interfaces (also called Business APIs, or BAPIs), which provide a programming interface to business objects. BAPIs are a set of methods for working with and manipulating SAP business objects.Internally, BAPIs are implemented as function modules stored in the R/3 Function Builder. Each BAPI has an equivalent internally-named function module. However, you should use the BAPI and not the function module behind it, because the BAPI provides a stable, object-oriented view of R/3 applications and data. The internal function modules or even the fact that the BAPIs are implemented as function modules are not guaranteed to remain the same in future releases of R/3.

Regards,

Prateek

Former Member
0 Kudos

Ravi,

BAPI methods are RFC enabled function modules. The difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call.Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs.BAPI is having all Key fields, methods, interfaces etc.

RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system. Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench. They ...

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

Hi Ravi,

RFC(Remote Function Call) is a protocol to transfer data between two systems.

BAPI is a function module which is RFC enabled......means BAPI is a function module which a second system can call via RFC conn to SAP system to get data from SAP system.

Thanks,

Rajeev Gupta

Message was edited by:

RAJEEV GUPTA

bhavesh_kantilal
Active Contributor
0 Kudos

From XI perspective , a BAPI does not have a COMMIT in it and so , you need to give the commit explicilty from your RFC adapter.This is possible only Sp14 and above.

RFC's have commit in them and so this need not be done from the RFC adapter.

Also look into this thread,

Regards

Bhavesh

Former Member
0 Kudos

Hi

. <b>RFC</b> makes direct and synchronous calls of a program in the remote system. If the caller is an external program it will call an RFC-enabled function in R/3 and if the calling program is the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3 program through a gateway-proxy (usually rfcexec.exe). <b>BAPIs</b> are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.

regards

--- prasad