cancel
Showing results for 
Search instead for 
Did you mean: 

Question about BAPI and BAPI wrappers for MI

florianbus
Contributor
0 Kudos

Hi,

another question regarding BAPI and BAPI wrappers for MI. Can someone explain me more in detail?

SAP uses BAPI to retreive data from database tables and create business objects. Now MI uses these BAPIs but wrapped.

What does this exactly mean and what happens further?

Thank you and regards,

Florian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Florian,

MI client works on some assumptionsa bout the backend development objects.

To meet the assumptions some standard interface should be in place.

So Bapi's are wrapped to become BAPI wrappers.

By using BAPI Wrapper Wizard we can create BAPI wrappers which meet all the requirements and assumptions.

Kindly go through the rules from the below blog:

/people/vivek.joshi/blog/2006/12/26/dos-and-donts-for-perfect-bapi-wrappers

Cheers,

Karthick

Former Member
0 Kudos

Hi Karthick,

There is one limitation with this wizard. You cannot create the BAPI in the remote system as it creates in the local system. You may have to move it using transports to remoted system that is any r3 backend.

Thanks...

Preetham S

Former Member
0 Kudos

Hi Preetham,

What do you mean by remote system?

Do you mean by separate Middleware/server and Backend.

We created BAPI using Wizard using different backend system and different server.

Cheers,

Karthick

Answers (8)

Answers (8)

florianbus
Contributor
0 Kudos

Thank you all for the whole bunch of information about BAPI wrappers!

Thank you and regards,

Florian

Former Member
0 Kudos

Hey Florian,

The dicussion held here regarding BAPI Wrappers are really good. Hope this is enough to close the thread...are start exploring more on BAPI Wrappers..

do refer the below link for much more information on BAPI Wrappers...

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eba3a7-0601-0010-b982-92f1fca3258a">Goto BAPI Wrappers in Smart Synchronization</a>

PS: U can reward points the replies..!!!

Thanks,

kumarR

Former Member
0 Kudos

Hi Florian,

1) We have the BAPIs wrapped and so called BAPI WRAPPERS....why?

A) First is We include these BAPIwrappers in Syncbos and design the syncbo (mapping, filtering etc).

Next is we Generate the Syncbos..when we generate the Syncbo we get the automated code generated for SYNCHRONIZER [REPLICATOR,DOWNLODER,UPLOADER.]

So during the call of replicator these BAPI wrappers are called..so

<b>

Generated coding needs to make certain assumptions about BAPI Wrapper interfaces and behavior

BAPI Wrappers need to comply to certain rules </b>

Even the genarated code is used for all calls from client.

Cheers,

Karthick

Former Member
0 Kudos

Hey Florian,

As mentioned in the above post....regarding Rules pls check the below:

<b>Rules for BAPI Wrappers:</b>

- Processing type of a function module must be remote-enabled module.

- Parameter named “RETURN” where the type is BAPIRET2 structure needs to be defined as either Export or Tables parameter

- Parameters can only refer to either a structure or a field of a structure (<structure>-<field>)

- Changing parameter can NOT be used

- Exceptions can NOT be used

- Parameters can NOT refer to structures that include other structures within: the reference structure needs to be a flat structure, and fields in the structure can NOT refer to types

- Consistency within the business object must be ensured by defining Export/Import/Tables parameters of 5 types of BAPI wrappers appropriately

- *Commit Work and Wait” needs to be executed in the update BAPI wrappers (Create/Change/Delete)

<a href="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/mimes/smartsync/bapi_wrapper_interface_requirements.gif">"...Check this Image..."</a>

Cheers,

kumarR

Former Member
0 Kudos

Hi Florian,

<u><i>BAPI Wrapper goes like this :</i></u>

BAPI wrapper is called as such, because it typically wraps an existing standard BAPI. BAPI Wrapper is similar to BAPI but follow some rules. what and why are these rules... should be the next question...right??

<i>

SyncBO</i> in Smart Sync calls the BAPI wrapper based on the request from a mobile device.Hence, it is important that each BAPI wrapper has the parameters expected by <b>Smart Synchronization</b> and behave as expected by Smart sync.

And to behave as expected by the Smart Sync the BAPI wrapper should follow these rules strictly.

Cheers,

kumarR

Former Member
0 Kudos

Hi Florian,

As i mentioned in the above post..If we use Wizard all the interface and the rules are met automatically in the BAPI WRAPPERS.

Manually also we can create BAPI wrappers but need to follow the rules mentioned in the blog.

/people/vivek.joshi/blog/2006/12/26/dos-and-donts-for-perfect-bapi-wrappers

Cheers,

Karthick

Former Member
0 Kudos

Hi Florian,

Bapi wrapper is a functional module in the backend system that wraps an existing standard

BAPI. There are 5 types of BAPI wrappers.

1) GetList : This Returns the header data

2) Getdetail: Returns the header data with the list of items entries associated with that

header data

3)create : Creates a single business object

4)Change/Modify: Modifies the header and item of the specified business object

5) Delete:Delets the specified business object.

Bapi wrapper business logic needs to be coded manually using ABAP workbench.

SyncBO in Smart Synchronization calls the BAPI wrapper based on the request from the mobile device. To know more about BAPI wrappers. please refer this link

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eba3a7-0601-0010-b982-92f...

Go to Smart Synchronization--> what is BAPI wrapper.

Hope this helps to some extent

Best Regards,

Lakshmi

Former Member
0 Kudos

Hi Florian,

For creation of SyncBOs we need BAPIs which is present in the backend or in the same system. There are certain rules that needs to be followed for creation of BAPIs. These rules are more to do with the Signature of the bapi (export, import and tables), behaviour of the BAPI during error scenarios etc etc. In standard R/3 the BAPIs that conform to these rules are less or non existent. In such scenarios, there will be another BAPI created which conforms to MI rules and this BAPI internally calls the standard BAPI. This is called BAPI wrapping and this BAPI is known as BAPI wrapper.

You can also visit and read abt BAPI wrappers in details under smart sync:

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eba3a7-0601-0010-b982-92f1fca3258a">MDK Documentation</a>

Thanks...

Preetham S