cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI wraper

Former Member
0 Kudos

Hi All,

What is BAPI wraper,what is Difference between BAPI and BAPi wraper.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Srinivas,

To use BAPIs in MI for creation of SyncBOs, there are certain rules that needs to be followed. These rules are specify what should be the inputs and outputs, what should be the standard behaviour and how error should be handled.

So there are less or no Standard BAPIs in the backend that can be used outrightly in creation of syncBOs. Hence we need to write our BAPIs following the MI rules which will wrap around the standard BAPIs. Hence it is named as BAPI wrappers.

These BAPI wrappers are not actually a BAPI but remoted enabled function modules. The function modules that are visible in BAPI explorer are BAPIs.

Thanks...

Preetham S

Former Member
0 Kudos

Hi Pretham,

Thank u for Answer my question can u expain me How to create BAPI wraper for a BAPI.

Thanks&rwgds,

Srinivas.

Answers (3)

Answers (3)

neha_mahanty
Active Participant
0 Kudos

Hi Srinivas

This is a link which will give you a complete picture of what are BAPI Wrappers, its types & also how to develop BAPI Wrappers.

<a href="http://">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0baafd6-52fa-2910-c6a8-fbb9399cb4ab</a>

Hope this will help you

Neha

neha_mahanty
Active Participant
0 Kudos

BAPI is a function module which is remotely enabled & does not raise any exceptions. It is defined as business API’s for SAP objects. They play an important role in the technical integration & in the exchange of business data between SAP components & between SAP & non SAP components.

BAPI wrapper is a function module more or less like a BAPI & follows certain rules to be a BAPI. [following is the link to explain the rules for BAPI Wrapper]<a href="https://">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/bapi_wrapper_types.html#general_rules</a>

Conceptually, a BAPI wrapper has the role of a private method of a business object (SyncBO) and resides in a backend system. That is, a SyncBO in Smart Synchronization calls the BAPI wrapper based on the request from a mobile device.

BAPI wrapper is called as such, because it typically wraps an existing standard BAPI.

Neha

Former Member
0 Kudos

Hi Neha,

Thank u for Answer my question can u expain me How to create BAPI wraper for a BAPI.

Thanks&rwgds,

Srinivas.

Former Member
0 Kudos

Here you go:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrast...

In short, however, a BAPI wrapper is a Remote enabled Function Module in a backend system, that has a specific signature, so that it can be used in a mobile scenario.

Typically, it calls a BAPI in the backend system, so it 'wraps' a BAPI, hence the name.

However, as long as a Remote enabled FM follows the standard signature of a BAPI wrapper, it can be called a BAPI wrapper even if it doesnt actually call one.

AFAIK there is no such thing as a BAPi wrapper, so there is no difference as such

Former Member
0 Kudos

Hi Arjun,

Thank u for Answer my question can u expain me How to create BAPI wraper for a BAPI.

Thanks&rwgds,

Srinivas.

Former Member
0 Kudos

Well, basically, a BAPI Wrapper need not be made using a BAPI.

Let's say you want to mobilize a Sales Order scenario. You will need a set of BAPI wrappers (GETLIST, GETDETAIL etc) for distributing Sales Orders.

Now, if there already BAPIs in your backend that do this work, then all you need to do is write RFC FMs, which call the BAPIs on the backend instead of getting data directly from tables. If you don't have already BAPIs for a Sales Order, you can still make BAPI wrappers (since a BAPI wrapper is simply an RFC enabled FM), without using any BAPIs, but which get their data directly from the corresponding Sales Order table(s).

Then you can go ahead and use these BAPI wrappers.

The main thing is this:

1. To make a BAPI wrapper, you need to make a RFC FM with a particular signature (as given in the link I pasted). That FM can then be called a BAPI wrapper.

2. It does not matter how a BAPI wrapper does its work internally, as long as it's signature follows the standard. i.e. It may or may not call a BAPI.

Message was edited by: Arjun Shankar

Arjun Shankar