on 12-12-2018 10:27 PM
I created a BSP that has HTML code that builds an HTML link and includes the users SAP global user Id as part of the link. I have done this by creating a "Page Attribute" with the following values:
Attribute USERNAME TYPE UNAME.
The "Event Handler" code is as follows:
USERNAME = SY-UNAME.
The Layout Code(HTML) is as follows:
_________________________________
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
var str1= "?name=" ;
var str3= "zzzz";
var str2 = "<%= username %>";
var url="http://google.com/";
var newurl=url+str1+str2+str3;
window.location.href(newurl);
</script>
</p> -->
</body>
</html>
________________________________________
The return value of str2 is not the value of the page attribute username. What is being returned is the literal "
"<%= username %>"
The full link being returned looks like this:
https://www.google.com/?name=%3C%=%20username%20%%3Ezzzz&gws_rd=ssl
I expect to see the literal user name which should be 'JSMITH', the SAP users name coming from the page attribute that is updated in the event handler.
Is the following syntax not correct????
var str2 = "<%= username %>";
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.