Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
karthikarjun
Active Contributor
Hi All,

As I faced few issues while implement my project in SAP system. I had noted down it here, I hope it may be useful to you.

Scenario:

1. I am using Server login page to access my SAP GW service
2. I need username to display it in my next screen

Solution:

 
var oUserData = "";

var usernameService = "/sap/bc/ui2/start_up"; //Standard service

var HttpRequest = "";

HttpRequest = new XMLHttpRequest();

HttpRequest.onreadystatechange = function() {

if (HttpRequest.readyState == 4 && HttpRequest.status == 200) {

oUserData = JSON.parse(xmlHttp.responseText);

}

};

HttpRequest.open( "GET", usernameService, false );

var usernameFinal = oUserData.id

Thanks, Karthik A
4 Comments
Labels in this area