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

Custom Bapi - Is it really useful?

Former Member
0 Likes
2,131

Hi Expert,

I need some revelation here concerning BAPI.

I'm curious on why we need to create custom BAPI by following step by step procedure and restriction (like naming convention should use ZBAPI for function and structure) while we can achieve the same thing by creating remote enabled function module. In a case we need to use it in workflow, we can always create BOR with method that call function module instead of API function. I can also create web service out of function group.

Please let me know if I'm missing something here.

Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,651

Hi,

BAPI are BOR objects which are used to create, update or display the data without using the transaction. so we use bapis. and according to requirements if we dont find any fields in the standard bapis or if we are creating any custom transaction and want to transfer the data or do any operation then we will go for custom BAPIS.

Regards,

Goutam Kolluru.

Hi Expert,

I need some revelation here concerning BAPI.

I'm curious on why we need to create custom BAPI by following step by step procedure and restriction (like naming convention should use ZBAPI for function and structure) while we can achieve the same thing by creating remote enabled function module. In a case we need to use it in workflow, we can always create BOR with method that call function module instead of API function. I can also create web service out of function group.

Please let me know if I'm missing something here.

Thank you.

7 REPLIES 7
Read only

Former Member
0 Likes
1,651

This message was moderated.

Read only

Former Member
0 Likes
1,651

Hi,

For starters, BAPIs are remote function modules can be also used in Non SAP environment like Java Applications.

Apart from that bapi ojects have interfaces, methods , events and attributes and the bapi function modules can be attached to these bapi objects.

A function module has a single functoiinality it is bound to while a bapi object can have many functionalities.

For programming in Bapi: please refer this link;

http://help.sap.com/printdocu/core/print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf

Thanks and regards

Read only

Former Member
0 Likes
1,652

Hi,

BAPI are BOR objects which are used to create, update or display the data without using the transaction. so we use bapis. and according to requirements if we dont find any fields in the standard bapis or if we are creating any custom transaction and want to transfer the data or do any operation then we will go for custom BAPIS.

Regards,

Goutam Kolluru.

Read only

0 Likes
1,651

Hi,

Thank you for all the responds, I hope it can be a useful discussion.

For those comments that raised on my question, i need to verify some of them.

1. My understanding is JCO connectivity does not required BAPI, I can have java connectivity by using remote enabled function module. However, my understanding might be wrong since the last time I use JCO is 2003 and I don't really follow the progress of JCO ever since because I always use ABAP web dynpro after that. In ABAP web dynpro itself, service call can be created for all remote enabled funtion module.

2. Connectivity with other system such as dot net application can also be achieved by using web service that can be created with remote enable function module.

Considering above fact, I still cannot see the benefit of using custom BAPI compare to web service or remote enable function module. Please highlight if I made some wrong conclusion.

Thank you.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,651

Hello Abraham,

All the points you've mentioned are valid & technically all BAPIs are RFCs. So there is no difference between them if you compare based on - connectivity, generating WebServices etc.

The difference lies in the way both are [programmed|http://help.sap.com/saphelp_nw04/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm]. For e.g.,

1. While programming BAPIs, the messages are returned in RETURN structures & can be handled more easily in the calling system. Whereas in normal RFMs the exception handling is not well-defined.

2. Enhancements in BAPIs are handled via the EXTENSIONIN & EXTENSIONOUT structures & you don't have to change the code inside the BAPI to accomodate this change!

You can read this extensive [documentation|http://help.sap.com/saphelp_nw04/helpdata/en/5c/f3f0371bc15d73e10000009b38f8cf/frameset.htm] on BAPIs if you want to know why they fare well compared to RFCs.

BR,

Suhas

Read only

0 Likes
1,651

Hi Suhas,

I think your explanation really clarify my doubts.

Now I know when to use BAPI and when is enough to use RFC function module as web service.

Thank you

Read only

0 Likes
1,651

hi suhas,

thanks for useful information...