on 04-03-2020 5:12 PM
Hi Persona Experts,
I have to switch to different flavors based on the value(equipment authorizaiton group/Floc Authorization group- got calling a RFC) on the first screen. The session.utils.changeFlavor is working. However I have added the script to event OnBeforeRefresh. It is invoked in each subsequent screen. can I avoid that?. Only call the script once for the transaction on the first screen(for performance and also the element name is different in second screen). onEnter preferably. First enter on the first screen. After that one call, the script should be "inactive'. I am doing this on IE03 and IL03 transactions. We are using personas 3, level(component) 9, Kernel 749 pathlevel 824 webgui patch level 823. Basis 750-0009.
You could use a flag via the session store (session.utils.put and session.utils.get) to indicate whether you already called the script in the transaction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Tamas & damean-bf.chen. It is a good suggestion from both of you. However, if user goes back to first screen and enter a different number (Without restarting the transaction), then it will recognize it as already called and will not call again and hence it may be a wrong flavor for the number entered.
One other thing which I thought it may work is to check the element is existing in the screen using session.idExists. Since my field name in first screen is different than second screen, it will call the rest of the script only in first screen(with an if statement), which is what i want. it is working in HTML Gui, but not in SAPGUI for windows.
Well, on the first screen, you'd obviously have an onLoad script that clears the flag... or on that screen, rearrange your logic so that the onBeforeRefresh script is not disturbing things.
At any case, this can be resolved with some logic reorganization at appropriate events.
session.idExists should work in the Windows GUI too.
User | Count |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.