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

Why BAPI rather than RFC ?

Former Member
0 Likes
867

Hi.

I got an idea on BAPI and RFC but I am bit confused at this point.

BAPI can be used to access the SAP data from other technologies because we place the BAPI in BOR. But the same work can be done by RFC also.Both are same right.Then why should we use BAPI ? What can't be achieved by RFC and can be only by BAPI ?

Please don't share BAPI vs RFC. Provide why BAPI and why don't RFC ?

Thanks in advance.

Pradeepkumar Jayanthi

1 ACCEPTED SOLUTION
Read only

Ashg1402
Contributor
0 Likes
804

Hi,

If you ask about achievement by using BAPI , then i' will say that BAPI's contains a whole process   scenario, for example - BAPI_ALM_ORDER_MAINTAIN can do update, create and delete an order.

But if we try to do by RFC then we will need multiple.

As it is a whole Application scenario, i.e. iw31 and iw32 working in one BAPI.

Regards

Ashish

4 REPLIES 4
Read only

Ashg1402
Contributor
0 Likes
805

Hi,

If you ask about achievement by using BAPI , then i' will say that BAPI's contains a whole process   scenario, for example - BAPI_ALM_ORDER_MAINTAIN can do update, create and delete an order.

But if we try to do by RFC then we will need multiple.

As it is a whole Application scenario, i.e. iw31 and iw32 working in one BAPI.

Regards

Ashish

Read only

Former Member
0 Likes
804

The flaw in your thought is BAPI_SALESORDER_CREATE and BAPI_SALESORDER_CHANGE.

Read only

0 Likes
804

HI Martin,

     What flaw exactly.? I just gave example of the one which I have worked on.

  Can you have one rfc which can do the full functionality of BAPI_SALESORDER_CHANGE.? A standard RFC not custom.

I don't think there is any, I can be wrong but for BAPI_ALM_ORDER_MAINTAIN , I am sure there is none.

Till what I have used, i didn't find RFC's capable of doing full working like BAPI.

Read only

Patrick_vN
Active Contributor
0 Likes
804

I think Martin tries to point out that the process of creation and changing is handled in different BAPI's (cfr. most transactions that end with a 1 are for creation, 2 for changing and 3 for display only)

And besides of covering an 'entire' process, the interface of a bapi tends to be more readable (for example a variable that is named MATERIAL instead of MATNR, a return table/strucure typed bapiret2 vs a sy-subrc <> 0, ..etc). Which is a distinct advantage for a non-abap developer that needs to call function modules remotely.