cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI Wrappers

Former Member
0 Kudos

i want to know the use of BAPI Wrappers and how ME_WIZARD is used for the generation of BAPI Wrappers

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anusha,

<b>SAP</b> uses BAPI to retrieve data from database tables and create business objects.

<b>In MI</b> , We have<b> BAPI Wrappers</b> which is a functional module that wraps an existing standard BAPI.

And we have 5 kind of BAPI's :

GETLIST,GETDETAIL,CREATE,CHANGE/MODIFY,DELETE

Transaction ME_WIZARD(), which is used for the generation of BAPI Wrappers and to allows a BAPI Wrapper to Register a method associated with Function Module.

ME_WIZARD is nothing but Mobile Engine wizard which is used for generation and registration.

In this wizard, you have to give the following information...

- Function Module that is to be wrapped.

- Alias name for the wrapper, for furthur use in Mobile applications

- Function group name in which this function module holder (BAPI Wrapper)has to be generated.

Click <b>"Generate FM holder"</b> to generate the wrapper function module and an entry in the mapping table BWAFMAPP.

BWAFMAPP holds the mapping between the Java alias (alias name ) and the name of the generated function module.

The wrapper function module is now generated and can be examined in transaction SE37

Hope this is helpful.

Cheers,

kumarR

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Anusha,

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

Rules for BAPI Wrappers:

- 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 Anusha,

Hope this will be useful .

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??

SyncBO 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 Smart Synchronization 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 anusha,

If anything is not clear then do please raise your Queries.

Thanks,

kumarR

Former Member
0 Kudos

Hi Anusha,

I assume you are an ABAPer.

https://www.sdn.sap.com/irj/go/km/docs/library/mobile/mobile%20infrastructure/mobile%20development%2...

have a look at this, which gives explanation and code too. should you have further doubts please post back.

Regards

Divya

Former Member
0 Kudos

Hi Telaprolu,

Adding to above points said by kumar..

BAPI wrappers are functional module which resides in the backend system. SyncBO in Smart Synchronization calls these BAPI wrapper based on the request from a mobile device.

refer this link for more details

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

Go to Smart Synchronization in the above link.

Hope this helps.

Regards,

Lakshmi