Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert

Designing Mobile App User Interface and Running the App in Android Emulator


 

A Simple SUP Hybrid App to access Web Service: Part I

 

Next task is to design UI for mobile application.

 

  1. Right Click Project>New>Hybrid App Designer





    • Give some name to application i.e. Currency (extension should be .xbw)

    • select Can be started, on demand, from the client in the next screen.






 

 

 

2. By default, there is only one screen "Start", add a new screen "CurrentRate"

 

3. Go to screen design of Start screen,



    • Add 3 new edit boxes from the controls (right hand side) one by one and corresponding their keys

    • You may assign default values here itself i.e. USD for Source Currency




 



 

 



    • Add a new menu item "Get Value" to the start screen,

    • Under General tab, do these settings:

      • select Type as Online Request

      • respective MBO

      • select findByParameter object query under Invoke object query






 





    • Under Parameter mappingsmap keys respective to each parameter




 





    • After mapping, it should like this. save everything.




 



 



    • Under Success/Error tab, select newly created screen "CurrentRate" as Default success screen from the dropdown.




 



 

4.  Go to screen design of CurrentRate screen,

 

  • Add a new listview (from palette) to the CurrencyRate screen

  • Right click listview>properties>General

  • select CurrMBO key from the dropdown

  • Save all


 

 



 

  • Under Cell tab, Add 4 different Cell lines and corresponding its Fields


e.g. cell line 0 and its Field value as CurrMBO_SrcCurrency_attribKey

cell line 1 and its Field value as CurrMBO_TrgtCurrency_attribKey

cell line 2 and its Field value as CurrMBO_Prvdr_attribKey

cell line 3 and its Field value as CurrMBO_getCurrencyValueResult_attribKey

  • Save All      


 



 

5, Launch Android Emulator,

 

  • Before this, make sure you have registered a user in sybase control center

  • Provide all settings in HWC container and cross check if registered user has come online.


 

6. From the workspace, right click Currency.xbw, select Generate Hybrid App

 

 



 

7. In the Android Emulator you will see something like,

 

 



 

Same app is running fine in BlackeBerry simulator also:

 



 

Tried with other source currency and target currency values and getting a reasonable output.



 

 

I hope this blog would be helpful.

Your suggestion and comments are most welcome.

 

 

Rgrds,

Jitendra