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

bapi doubt ...difference rfc and bapi

Former Member
0 Likes
1,212

Plese give me the following information.

1) wt is the difference between BAPIRETURN, BAPIRET1 and BAPIRET2?

2) wt is the diff. between an RFC-enabled fm and BAPI ?

1 ACCEPTED SOLUTION
Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,185

1.all the three are return paramter structures.

the difference is BAPIRET1 has 1 field ID more than BAPIRETURN and BAPIRET2 has some more fields like ROW, COLUMN etc. the purpose of all the three are same.

2.BAPI is an interface which uses RFC.

12 REPLIES 12
Read only

Former Member
0 Likes
1,185

Hi Christopher,

1. wt is the diff. between an RFC-enabled fm and BAPI ?

Not much.

BAPI is having a corresponding business object

which is REGISTERED in Sap Repository.

2. Where as RFC-enabled FM

is just a normal FM

which can be called from outside the SYSTEM

using RFC concept (DESTINATION )

(The confusion is created bcos

BAPI concept (business object conept)

are implemented in SAP

using FM Only (which are RFC Enabled)

and the name of the FM starts with BAPI_*.

)

regards,

amit m.

Read only

0 Likes
1,185

Hello Amit !

As u said, there is no differnce..if i select rfc-enabled and give a name as ztest(fm name) will it behave as BAPI ??(without giving BAPI_* as a name?)

Read only

0 Likes
1,185

Hi Christopher,

BAPI is an interface of a business object based on the OO (object oriented) concept. You can find all the Business objects using tran code SWO1.

Whereas remote function call could be any function module (non business object interfaces) defined in a remote system which you can call specifying the remote destination. For this you will have to define the destination name in the RFC definition (SM59).

Example: Function module to read a sales order from SAP system which can be called from CRM system

Read only

0 Likes
1,185

Hi again,

1. YES, Definitely it will behave like BAPI.

2. The sap concept of

naming function modules (related to business object)

and naming them as BAPI*

is JUST FOR IDENTIFIECATION PURPOSE,

and nothing else.

We can give ANY NAME.

regards,

amit m.

Message was edited by: Amit Mittal

Read only

0 Likes
1,185

Thanx chandrika.

can u tell wt is diff. between the 3 str.( BAPIRETURN, BAPIRET1 nd BAPIRET2 ) ?

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,186

1.all the three are return paramter structures.

the difference is BAPIRET1 has 1 field ID more than BAPIRETURN and BAPIRET2 has some more fields like ROW, COLUMN etc. the purpose of all the three are same.

2.BAPI is an interface which uses RFC.

Read only

0 Likes
1,185

Hi hymavathi,

can we use any of the three. How can we know, in what case we have to use BAPIRET1 or BAPIRET2?

Can u plz tell me difference other than the fields in these structures ?

Read only

0 Likes
1,185

u can use BAPIRET2 only as it also gives LOGICAL SYSTEM NAME, etc details.

so as BAPIRET2 satisfies more requirements u can always use BAPIRET2.

BAPIRET2 can be said as improvement of other two

Read only

0 Likes
1,185

Thank u so much Hymavathi,

can u please much more clear with RFC fm and BAPI ? I m still in confusion with this ?

Amit posted good answer but can u elaborate and explain me in detail !

Read only

0 Likes
1,185

hi,

The procedure to create BAPI

1.in se11 create a structure of type zbapi or ybapi.

2. se37 , create a fn module of type REMOTE and release

3. in SW01, CREATE AN OBJECT/INTERFACE TYPE AND ASSIGN THE FN MODULE

TO THE METHOD INSIDE (THIS IS THE BAPI)

4. NOW GO TO TCODE BAPI AND CHECK THE BAPI CRETAED.

now the second step can be replaced by METHODS TOO. but

as RFC is efficient, we are assigning RFC to the BAPI.

so BAPI uses RFC. BAPI is an interface which uses RFC .

Read only

0 Likes
1,185

hi hymavathi,

in step 3,

wt is diff. between object type and interface type?

Read only

0 Likes
1,185

hi Christopher,

OBJECTTYPE/ INTERFACE TYPE both are technical names give to BOR.

but category object type, is related to work flow.

interface type , we assign RFC.