cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect SAP Mobile device with BADI?

Former Member
0 Kudos

Dear experts,

We have some functionality written in the BADI program for handling Stock movement . We want to bring the same functionality for SAP Mobile device.

Can you please provide your suggestions?

Thank you!

Saravanan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Could you explain your scenario in more detail?

NW Mobile is used for mobilizing entire applications. If you have implemented a BAdI somewhere in your backend system, then as long as it is triggered somewhere in your backend application, it will continue to function.

What you should probably be asking is, how to mobilize your backend application.

In any case, you'll find more helpful answers if you could explain your requirement in detail.

Edited by: Arjun Shankar on Nov 17, 2009 11:56 AM

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I think if you talk about Stock Movement, this should be an app for your warehouse?

The first decision you have to take: is it always online or occasionally connected app?

Most likely you will say: Always online! But be carefull! Only in dedicated area this is really the case. If you have engineers running around in the country, there are many situations where they need ability to prepare part booking, but have no connection to the system.

If it is really an always online app, then you can simple use the WD tools for PDA and connect them with your Badis. Pretty much like any other WD Online App.

If it is occasionally connected, then it is a little more work you need to go through. The design of the data model for the device, the BADIs with GETLIST and GETDETAIl handlers,......

But the first decision is: always online or just occasionally connected?

Hope this does not open to many new questions

Regards,

Oliver

Former Member
0 Kudos

Thank you very much Arjun and Oliver!

To answer Oliver's question: The application should be online always.

The scenario is:

Currently, we have implemented BAdI application within the SRS (Sap Retail Store) standard codes available, leveraging the use of standard BAdIu2019s provided by SAP for the SRS Goods Movement transaction

Now, what we are trying to accomplish here is to enable the handling of Stock movements over SAP Mobile devices in the same way that we have handled it over SRS.

Oliver, to understand your suggestion clearly, I am putting down my understanding here:

1. Create a WebDynpro ABAP UI Application to connect to existing BAdI.

2. Use WebDynpro tools to connect the mobile device to WD Application.

Former Member
0 Kudos

Forgive my complete lack of knowledge in SRS and the like!

So here's what this sounds like to me..

You have application 'A' (The goods movement transaction) which you enhanced/customized in some way by using an SAP provided exit. This application 'A' is not to be mobilized.

Now that being said:

You have application 'B' (Consignment stock movement) which you want to mobilize.

Here, you want to reuse the customization logic that you wrote for application 'A' (because the customization required is identical?).

Would that be correct?

Anyways, proceeding..

A BAdI exit cannot be executed directly in a mobile device. Since it exists in the ABAP world of your backend.

NW Mobile will enable exchange of data between your mobile device and the backend (wherever it is that your SRS is running).

Edited by: Arjun Shankar on Nov 17, 2009 1:20 PM

Former Member
0 Kudos

continuing...

How NW Mobile can achieve this is:

1. By creating BAPI Wrappers (these should follow the CRUD principle)

2. Then you import these BAPI Wrappers as 'Data Objects' into NW Mobile.

(In your case, I guess you would have a Data Object relating to instances of Consignment Stock Movements)

3. Then you create distribution rules (this will define which data object instances will flow to which devices)

4. You create and deploy an application on your device (you can write whatever business logic you want in your application, including taking inputs from a user, or doing manipulations to the data object instances)

When the user uses your application, changes will be done to the data object instances, either due to synchronizing data with NW Mobile (to get latest set of changes to the instances) or by creating, modifying or deleting the instances in the device.

Later, when the user synchronizes with NW Mobile, the changes made to the data in the device will be forwarded to the backend via the BAPI Wrappers which you created earlier.

This, in essence is how NW Mobile works.

If however, you want to replicate the logic that is being performed in your BAdI in your mobile device, there are only two ways to it:

1. You rewrite your logic in your mobile application (in Java, or whatever language it is that you wish to develop your application in)

OR

2. Say your BAPI Wrapper internally causes your backend to call certain BAdI's. But this is of no concern to the NW Mobile system itself.

An example of #2 would be:

Every time your user modifies a 'Consignment Stock Movement' in the device and syncs with NW Mobile, NW Mobile will call the MODIFY BAPI Wrapper in the backend (SRS system). The MODIFY BAPI Wrapper will trigger a workflow, or run an SAP shipped report or whatever it is that will lead your BAdI to be called... Finally, all this will cause some change to be done to your 'Consignment Stock Movement' in the backend. Which will get pushed to the NW Mobile system and the next time the device syncs with it, this change will be reflected in the device as well.

Former Member
0 Kudos

Thanks a lot Arjun!

If we decide to use Java (rewritting all the logic again) as you mentioned as one of your options, what should be my approach or list of tasks I should do?

Is there any way I can make use of this already existing BAdI from a NetWeaver J2EE Web application that I can access via browser?

Former Member
0 Kudos

Coming from a guy who knows zilch about SRS and all, I was not sure my posts would make much sense!

Anyways, for your first question, go to [http://help.sap.com/content/documentation/netweaver/docu_nw_71_design.htm#m71] and select the 'Developers Guide' from the 'Development' section. It will tell you all you need to do to develop an application in NW Mobile 7.1.

If you want a 'custom client' (not using the SAP shipped client framework), you could also look at this neat document: [http://www.sdn.sap.com/irj/sdn/nw-mobile?rid=/library/uuid/30e033a0-73ef-2b10-b291-b653c3b48385]

As to the second question of reusing, I do not have an answer.

All the best!