cancel
Showing results for 
Search instead for 
Did you mean: 

How to use BAPI wrappers

samantha_nez
Participant
0 Kudos

Hi,

We are developing our first mobile application for laptops with NWDS 7.1. Following the Developer's Guide, we have our application with a created data object model with data objects from DOE and its component (views, controller and so on).

The data object from the DOE has three BAPI wrappers.

How are these BAPI wrappers invoked from our application, for instance when a button is clicked into a view?

Thanks in advance,

Samantha.

Accepted Solutions (1)

Accepted Solutions (1)

muhammed_nishad
Participant
0 Kudos

Hi,

I think you have made your First SWCV, Distribution Model, and Dirstribution rules. Once this is over , you may used SDOE_LOAD transaction for getting all the data into CDS. Once the CDS is gets the data from R/3 , this means your data is fine in MIDDLEWARE.

Now you may create device by navigating into the "DeviceAdministration Portal" once the device is created then enable the device and check the "Pending Extracts" . If the pending extracts is having messages then do a "Trigger Extract".Once this is carried out , your data is ready in queue of the device and ready for synchronization.

Now the next step is to create UI for displaying the data in the device.

1. Create a DC for service component(Holding queries) , import the dataobjects

2. Create queries for getting the data from the Middleware( already in the outboundqueue).

3.Create a DC for UI (Layouts) and use the service component as the used model in this.

For better understanding check my blogs

[Building Queries in Netweaver Mobile 7.1 - Laptop Perspective|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16797] [original link is broken] [original link is broken] [original link is broken];

[Consuming Queries in Netweaver Mobile 7.1 - Laptop Perspective|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16991] [original link is broken] [original link is broken] [original link is broken];

Regards,

Muhammed Nishad J

+919846345682

samantha_nez
Participant
0 Kudos

Thanks for your help!!

Very useful your blogs.

Regards,

Samantha.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Samantha,

In very simple words , i would explain Bapi wrappers as an interface between the middleware (where data is present in CDS) and the backend(eg: ECC or CRM etc).

The complete cycle goes like this :

=> When a receiver(mobile device) create/updates/deletes a data object instance in its local store and does a synchronization,

a corresponding request is sent to the middleware.

=>Middleware processes the request i.e it checks for any conflicts detection to ensure that multiple receivers are not causing an inconsistency by parallel updates of the same instance .

=>If there is no conflict then it invokes the corresponding BAPI Wrapper to perform the required operation(create/update/delete) in the backend.

=> Backend then validates and confirms the create/update/delete and also updates the data as required.

=>Once confirmation of validation and update is received by the middleware it sends a confirmation back to the receiver(mobile device) which initiated the create/update/delete request.Also the data is persisted in the CDS.

=> The receiver then commits the create/update/delete permanently into its local data store.

=>If a rejection was received due to conflict or validation failure, then the

receiver has to rollback the create/update/delete.

=>In case the modification request leads to an update of backend data, middleware checks if the

Subscription state is modified and if it is needed then subscriptions will be recalculated so that other receivers subscribed to the data object also receive the updated data object Instance.

I hope this would clarify your query.

Thanks & Regards

Shweta Soni

Edited by: Shweta Soni on Mar 10, 2010 12:51 PM

0 Kudos

Hi,

In DOE, the backend adapter uses these BAPI Wrappers to fetch data from e.g. ECC or CRM .

The CDS stores this data.

Now after you create the Distribution Model based on the ACTIVATED rules the association table(AT) gets filled ( which is actually nothing but the data filtered from CDS)

When you create an application and after you enter the relevant attibutes

1) first a handshake happens between the physical device and the logical device

2) the data from your AT table gets distributed to all the devices according to the rule.

Thats how the BAPI wrappers are used in the application.

Thanks and Regards,

Narayani

Edited by: Narayani on Mar 10, 2010 4:57 PM