Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
vladimir_erakovic
Contributor

Prerequisites:

  1. SAP application server
  2. SUP server
  3. Sybase Mobile SDK 2.2 patched to SP04.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/webcontent/uuid/f00164c9-bcb7-2f10-d2b3-ac79a6...

In this blog post I will show how to build hybrid mobile application with Mobile Business Objects connected to SAP backend through RFC.

RFCs that I will use are the ones from this document that I provide earlier: http://scn.sap.com/docs/DOC-47992

Application is mobile Work order with four custom Z tables in SAP and requirements are that user can search for and read and update single work order.

I suppose that you have up and running Sybase Unwired Workspace 2.2 and that you are connected to SUP server and SAP server.

Ok, let’s make new Mobile Application Project and drag and drop MBO into Mobile Application Diagram. We choose the name of MBO and specify a data source that is SAP with your connection profile. Next, we search for our RFC for reading data from SAP and check all parameters and internal tables. I also fill runtime data source credentials and connection properties with my SAP ERP credentials.

We go next, and after declaring primary key for all four of our tables on the next screen we are asked if we want to create multiple mobile business object which share the same backend operation and we do.

If we doesn't choose like this but made all four MBOs one by one, then after connecting them with composite relationship an alert would appear that they don’t belong to the same load group and then we had to do online request for every MBO in our application. But this way, we do online request only once and call other screens with just open command.

Before we go to the next screen we need to left focus on our Header table that is ITABZ so that on the next screen we have right hierarchy.

Click finish and our MBOs are created. We just need to connect them with composite bi-directional relationships by primary keys and our middle layer is almost finished.

We should rename three MBOs that now are called like RFCs tables with some meaningful name (right click on MBO in the WorkSpace Navigator, Refactor->Rename). And then we are adding update operation on each MBO. Update operation will be using different RFC for every MBO.

We add operation and choose Update type of operation. Then we find appropriate RFC and select all input fields.

On the next screen we got to connect MBO values with remote operation arguments and then click finish.

We do this for all four MBOs and the final result should look like the next picture.

Alerts are showing because not all values from MBO are connected with remote operation arguments but it doesn't matter. Now we can deploy project to SUP server.

The first part of this tutorial ends here. Any suggestions for improvement is welcome.

In the second part, we will create application screens in Hybrid app designer.

Thank you for reading.

6 Comments
Labels in this area