cancel
Showing results for 
Search instead for 
Did you mean: 

Pass data from Screen to Screen

Former Member
0 Kudos

Hi ,

    I am very new to SUP. I am trying to develop a sample example to navigate from one screen to other screen where the first screen has input fields: Name & Address.

I don't want to connect to any data source for this example. Just simple navigation. .

Created a local MBO with Attributes Name and Address.

In the start Screen Created to edit boxes Name and Address and two keys Kname and Kaddress.

Now when I enter the name and address I want to go to next screen with the values I have entered.

Please help.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi dear,

If you are trying with HWC approach,

create a second screen from right hand side palette, drag and drop.

give some name to this screen. lets say screen2

go to its screen design , create 2 new editbox you had created in screen1, and map these two with existing keys..Kname, Kaddress.

come back to 1st screen's flow design tab .

create a menu item.

go to its properties:

select type : Open

Screen:  from dropdown, select screen2.

i hope this will help you.

Regards,

Jitendra

Former Member
0 Kudos

Thank you Jitendra. I will try this.

Former Member
0 Kudos

Hi Jitender,

I tried exactly the same. But in the screen2  how to bind the existing key? The name and address key is not visible in screen2.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hie,

you should have got it yar.

1. create 2nd screen.

2. navigate to 2nd screen from 1st screen. by creating a menu item at 1st screen

   (if you havnt done this, and tried to search existing keys to be mapped, you wont get)

3. then create 2 editbox, and map accordingly

Regards,

Jitendra

Answers (1)

Answers (1)

midhun_vp
Active Contributor
0 Kudos

Please go through http://www.youtube.com/user/SUPDeveloperProgram to understand the basics of app development using SMP.

Former Member
0 Kudos

Hi Midhun,

     thank you for the link. I have already gone through some of those tutorials. Do you know where I can find some good documentation as what is the difference between onlinerequest/save/etc etc. Also trying to understand where can we store data(temporaily), what is the visibility of declared attributes(not comming from data source)  in an MBO etc etc. Where to declare local variables? How can we do validation? etc

Appreciate if you refer me to those links.

Thanks,

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

There are a series of samples that may be of some help.  The first one which contains links to all the others is available at the SUP Apps site https://cw.sdn.sap.com/cw/groups/sup-apps

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

I will attempt to comment on a few of your questions.

An online request is a synchronous request to the SUP server.  This requires that the device have network connectivity.  The result returned to the device is A success or failure.

A Submit operation closes the hybrid app and places the request on a queue on the device.  If there is no network connectivity at the time of the request, the operation will be sent to the SUP server the next time the device has connectivity.

A save operation commits the key values of a screen to the workflow message and returns to the previously opened screen.

A cancel operation returns to the previously opened screen but does not update the key value from the canceled screen to the workflow message.

In JavaScript a variable can be local to the scope it was declared in or global.  You can declare global variables at the top of Custom.js.  See http://sharkysoft.com/tutorials/jsa/content/031.html

Validation can be performed by setting properties in the designer.  Click on a control and examine its advanced tab.  Also see the validate controls as soon as focus changes option in the hybrid app packaging wizard.

Hope that helps,

Dan van Leeuwen