cancel
Showing results for 
Search instead for 
Did you mean: 

How to create javascript file containing UI for OData MBO's

Former Member
0 Kudos

Hi,

I am using SUP2.2 SP02 and perform following steps:-

1.Create MBO using OData service.

2.Deploy the project.

3.Generate Hybrid app

4.Trying to create html file

Now when I am trying to make an html file which contains UI for  OData MBO and I  am calling findAll query define on

MBO through a button click event its not giving any output on ios device after generating hybrid package using hybrid package tool.

I want to create a javascript  file for HWC app which contains UI for  MBO build using ODataservices.

So,If  you have any suggestion regarding this please reply it would be helpful.

Thanks & Regards,

Anjali Agrawal

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you select your MBO in the Mobile Application Diagram > Attributes > Definition > Preview, do you get back data?

If it does not work at design time, it will not work at runtime.

It may help if you provide a few screen shots showing how you have configured your MBO to access an OData back end.

Typically when accessing an OData backend, the data is accessed directly from within the JavaScript code using the data-js library.  In this scenario, MBO's are not used.  This means that the application is an online only app since the offline support provided by MBO's and the Hybrid Web Container is not available.

Former Member
0 Kudos

Hi Daniel,

Yes I am getting the preview of data from backend.Even I am able to run my application by making a workflow for MBO made using OData URL.It is successful in fetching the data from the backend.Even workflow made for it is also working fine.

Now I just wanted to do something different is that rather than creating a workflow for my app I have to make an UI for it.

My reffered link:-http://scn.sap.com/docs/DOC-33172

So,If u have any suggestion that how can we create synchronized native applications that reads data from an OData datasource  then plz reply.

Will be waiting.

Thanks & Regards,

Anjali Agrawal

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you wish to create a native UI, I believe you will need to use xCode for creating native iOS apps.

If you wish to create an HTML based UI using the Hybrid App Designer, the following samples are a good place to start when learning about the Hybrid App Designer and the Hybrid Web Container.

Expense Tracking Sample https://cw.sdn.sap.com/cw/docs/DOC-148193

and

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01212.0213/doc/html/title...

The following sample may be helpful for debugging a Hybrid App

Debugging a Mobile Workflow https://cw.sdn.sap.com/cw/docs/DOC-150957

Former Member
0 Kudos

Hi Daniel,

I need to create an HTML based UI for MBO's that have been build by using  OData URL at the time of creation of mobile business object.

The link you provided is not using OData as backend.

Actually my priority is to design an html file which can extract data from that build OData MBO by making a call to  js files build after using the option for Generate Hybrid App  and also to run it has hybrid web app.

So,If you have any suggestion regarding this then please reply.

Thanks & Regards,

Anjali Agrawal

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

An MBO is an abstraction layer from the backend data source, so it does not matter if the MBO is bound to OData, a database, or an SAP backend using JCO.  Your interaction with the MBO is the same since it hides the details of how the MBO connects and communicates with the backend data source.

The samples I linked to demonstrate how you can create HTML or hybrid apps that can invoke the methods of the MBO's using the Hybrid App designer.

Former Member
0 Kudos

Ok .Thanks a lot for your reply.Will see to it.

Regards,

Anjali Agrawal