on 12-13-2017 6:49 AM
Hi Experts,
I want to use custom drop down instead of using F4 help. For this I am using script applied on onSelect event of drop down. I am copying the selected value from drop down and pasting it to standard F4 help input field. But every time I select value from drop down it gives me the previously selected value instead of new one.
I am using SAP Screen Personas 3.0 with SP04.
Help me out if anyone knows the solution.
Thanks in advance.
Regards
Parul garg
Hi,
when using the "onSelect event" you can get the new value with "newKey".
var thisismynewkey = newKey; 'save newKey in variable
session.findById("wnd[0]/usr/cmbPersonas_150520833899797").key = newKey; 'set newKey in your Dropdown
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Thanks for your answer. Now through this line of code I am getting the updated key but text is still not updated. As you suggested to use 'newKey' for key, is there anything for text.
Following is the script I am using:
//save newKey in variable coming from dropdown
var thisismynewkey = newKey;
//save text in variable coming from Dropdown
var text = session.findById("wnd[0]/usr/cmbPersonas_151124865221376").text;
//set text to standard F4 help field
session.findById("wnd[0]/usr/ctxtSTC_SCN_HDR-SCENARIO_ID").text = text;
Hi Parul,
I think this is a bug in SP04 in the "onSelect Event". The Screen doesn't refresh after the event is fired.
Try it like this.
//save newKey in variable coming from dropdown
var thisismynewkey = newKey;
// set newKey in Dropdown
session.findById("wnd[0]/usr/cmbPersonas_151124865221376").key = newKey;
// Screen Refresh
sap.personas.scripting.executeScriptInternal({src:""});
//save text in variable coming from Dropdown (Not necessary, it's the same than "thisismynewkey")
var text = session.findById("wnd[0]/usr/cmbPersonas_151124865221376").text;
//set text to standard F4 help field
session.findById("wnd[0]/usr/ctxtSTC_SCN_HDR-SCENARIO_ID").text = text;
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.