cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Personas 3.0: URL-Parameters can't be read via JavaScript

Carifaine
Active Participant
0 Kudos

Hi all,

i'm trying to read URL parameters in Screen Personas 3.0 via JavaScript. I passed a parameter "matnr=..." to the URL and want to read it via script to skip my first screen by automatically filling the fields and execute.

I tried several things until i found out that the javascript object  location  does not contain any of the parameters. location.host and location.pathname both look good, but they don' contain any parameter of course. But neither location.search nor location.hash are filled.

I printed out "location" on my flavor and found out that the URL ends with a "#" where normally the parameter section would have begun starting with "?". Did anyone find a solution for this right now? Are there any other objects i could use to get the URL parameters in Screen Personas?

Appreciate any help.

Best regards,

Christoph

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

hi christoph,

I guess the solution provided here will be beter:

Filling Fields through URL Parameters - SAP Imagineering - SCN Wiki

Regards,

Sushant

Answers (2)

Answers (2)

Carifaine
Active Participant
0 Kudos

Thanks for your replies! The guide from the wiki worked fine for me, i didn't test to reference the parent url so far.

0 Kudos

Hi Christoph,

Hope you are safe & well.

I am working on a similar requirement (posted my Q here). Could you please let me know (the code snippet) how you were able to access url parameters?

-Thanks/ Sai

0 Kudos

Hi Christoph,

The flavor itself is running inside of an iFrame. Thus, the script is reading the URL of the iFrame and not the URL that is in the browser's URL bar. So, target the parent in order to read URL parameters.

I hope this helps,

Daniel Sanchez

Consultant

SAP America, Inc.