on 02-04-2015 5:24 PM
Hello,
I would like to know if it's possible to pass values from fields that are in a screen, to another fields that are in another screen ?
My need is that i have to save the values from the fields in the screen 1, then press Enter key to enter the second screen, and then, apply the saved values to the new fields.
The problem is that i can save the values in a script, using variables, in the first screen, but then, when i press the Enter key, to enter the next screen, i have to create another script for this new screen, and retrieve the values of my variables in this new script.
But doing this way seems not work.
The only possible way would be to create a custom button, affect a script that contain :
- Variables with the value of the fields of my first screen
- Press Enter key
- Affect variables to my new fields for the second screen.
All in the same script.
I can do that, but if the user press the Enter key, this script is not executed, so the user access the second screen without the needed values in the fields.
I tried to find a way to apply a script to the Enter key (or the standard SAP button associated) but didn't find it.
Do you know how i can do to fill the fields from a screen, with the values of fields in another one, without doing it in the same script ?
I don't know if my explanations are understandable. Let me know if not.
Thanks in advance.
If you restrict yourself only to Personas running in the browser then you can create objects in the global "Window" object that will persist until the browser page is refreshed. In particular you can access them from any flavour in any subsequent transaction.
This works in both Personas 2 and Personas 3.
Be aware, though, that this trick does not work in Personas 3 when run in the Windows or Java GUIs since they do not have a global Window object in their scripting environment.
Steve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi steve,
I would discourage to use windows object for reasons you have put.
I would recommend to use
session.utils.put("key","value")
session.utils.get("key")
This way, the "key" value is saved for entire session irrespective of which screen you are in.
Check here:
Scripting Utility Methods - SAP Imagineering - SCN Wiki
@Olivier..There are some screen events which you can use to execute a script when user press ENTER rather than clicking on the button.
You can find more about it over here:
Available Events for Scripting - SAP Imagineering - SCN Wiki
Let me know if you need example for this.
Regards,
Sushant
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.