on 2020 Dec 02 7:27 PM
Hi Personas Experts,
Is it possible to access browser URL parameters in my personas flavor script? Screenshot attached.
Requirement:
User clicks on "F.On Order" in IW32. Order number to prepopulate when user navigates from user navigates from IW32 screen to IW31 screen to create "Follow on order" via browser.
Behavior:
I created a custom flavor and OnLoad of the screen, I want to access browser URL parameters and get "EAMS_REF_AUFNR" value (for example: 90000183) and set Order field's value (on the screen) via scripting.
I have played around with document.location & window.location.search objects, but didn't help.
Does someone know if Is it possible?
Thanks in advance!
Hi All,
Implementing OSS note 2849051 resolved the issue. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If you want to get URL parameters from Personas I have with success used this function
you will need to add your parameter to the URL in order for the next "onload" event to read the value
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value;
});
return vars; }
var mytext = getUrlVars()["text"];
and if the URL = HTTPS:/servername/..../index.html?text=hello_again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bjarne,
Thanks for your reply.
I am trying to read the browser URL parameters in the OnLoad event.
As shown in screenshot above, the browser URL already has the parameters (key/value pairs) i need. So, i don't need to add a 'new' parameter to the URL (i suppose?).
I am unable to leverage the getUrlVars() code snippet as window.location.href object doesn't have browser URL parameters (see below).
window.location.href:
https://hostname:8443/sap/bc/gui/sap/its/webgui;~sysid=ED1;~loginGroup=SPACE;~messageServer=XXXX?%7e...
-Thanks/Sai
Hello Sai,
You can try using the syntax from the WEBGUI service to prefill fields, by following this wiki page.
Regards,
Cris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
65 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
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.