SAP provide Fiori Launchpad to launch all SAPUI5 application as a tile. But sometime Launchpad is not configured in the customer system, they don’t want to give access of Launchpad to some user, they don’t want to launch that application in Launchpad but still they want login screen and logout screen for that application.
_handleLogout:function(oEvent){
$.ajax({
type: "GET",
url: "/sap/public/bc/icf/logoff", //Clear SSO cookies: SAP Provided service to do that
}).done(function(data){ //Now clear the authentication header stored in the browser
if (!document.execCommand("ClearAuthenticationCache")) {
//"ClearAuthenticationCache" will work only for IE. Below code for other browsers
$.ajax({
type: "GET",
url: "/sap/public/bc/icf/logoff", //any URL to a Gateway service
username: '', //dummy credentials: when request fails, will clear the authentication header
password: '',
statusCode: { 401: function() {
//This empty handler function will prevent authentication pop-up in chrome/firefox
} },
error: function() {
//alert('reached error of wrong username password')
}
});
}
});
var myVar = setInterval(function(oEvent){
window.location.replace("/sap/bc/ui5_ui5/sap/zdemo/index.html");}, 100);
}
Now deploy application to server and test logout functionality. It will work.
Login Page:-
6. LOGIN SCREEN CUSTOMIZATION.
Tcode :SCIF->ServiceName
Create Z copy of that class and make changes in that class.
Now change that class name in SICF.
Now we will change login screen based on our company requirement.
TCODE ->SE80->Select MIME Repository->PUBLIC->BC->UI2->CUSTOM(Create Folder).
Save and activate.
6. DEMO AND TESTING.
After making all the changes and run that application. Now we customize login screen and changes SAP logo to company logo.
On press of Logout icon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |