Skip to Content

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

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.

/wp-content/uploads/2013/10/sup1_309215.jpg

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.

/wp-content/uploads/2013/10/sup3_309216.jpg

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.

/wp-content/uploads/2013/10/sup4_309218.jpg

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.

/wp-content/uploads/2013/10/sup6_309219.jpg

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.

/wp-content/uploads/2013/10/sup8_309220.jpg

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

/wp-content/uploads/2013/10/sup9_309221.jpg

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

/wp-content/uploads/2013/10/sup10_309222.jpg

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.

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

    1. Vladimir Erakovic Post author

      Thanks Vijay!

      About software: at my workplace I have SAP system and had trial SUP server. Before that I use virtual platform on Cloudshare (there is on Amazon also). Links are in:

      http://scn.sap.com/docs/DOC-42237

      Now I wait for our partner to install SUP server…

      Link for SUP SDK is in document, but here you go again:

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

      Happy work! 🙂

      Regards,

      Vladimir

      (0) 

Leave a Reply