How to - Show user and system name on top of WebUi page

Alternative to this  solution check out Welcome User Message in Web Ui.

Info and Preview
Step by Step + Screenshots following SDN Thread:
http://forums.sdn.sap.com/thread.jspa?threadID=1209639&tstart=1410
+ Added Link to SDN WebUi Forum
+ Color and title tag for the <span>








1. Open Transaction BSP_WD_CMPWD


2. Open component CRMCMP_NAVBAR


3. Select Picture View (CRMCMP_NAVBAR/Picture) and Double-click to see the details on the right side.


4. Open the HTM File (Double-click on Picture.htm)




5. Insert the following Code...

<p><%= sy-uname %> - <%= sy-sysid %> - <%= sy-mandt %></p>

...like displayed in this Screenshot. (Line 19; inside the first <div>)

6. Activate and Restart WebUI

7. This is how it will look like in Signature...

...and Serenity Layout.


 

Additional Stuff and Troubleshooting:

- You can play around with colors and positions.

- You can play around with special cases - Example: show "bold red color" in Productive System. etc...

Use this Demo Code...

DATA: lv_mytext type string.
if sy-uname = 'TESTU'"Select here if the Text should only be visible for some users...
  CASE sy-sysid.
    WHEN 'DEV'"Dev
      CONCATENATE
      '<span style="background-color: yellow; color: black;" title="'
      sy-uname '-' sy-sysid '-' sy-mandt '-' sy-uzeit
      '">'
      '<a href="https://forums.sdn.sap.com/search.jspa?threadID=&q=wiki&objID=f292&dateRange=all&numResults=30&rankBy=9"  target="_new">'
      sy-uname ' - ' sy-uzeit 
      '</a>'
      '</span>'
*   '<br>' 
      into lv_mytext.
*    WHEN 'TST'. "Test
*      '<span style="background-color: green; color: yellow;" title="'
*    WHEN 'PRD'. "Prod
*      '<span style="background-color: red; color: yellow;" title="'
  ENDCASE.
***Other Style Options: (Span)
************************************  
*  color:brown;
*  font-weight:900;
*  font-size:100%;
*  font-family:sans-serif;
*  background-color: #ffff00;
*  title = "This is the tool tip box"  
endif"Syuname
%>
<%= lv_mytext %>
<div class="th-l-closeSlider th-displayNone" id="th-l-closeSlider"> ß ORIGINAL Line

...for different colors in DEV / TEST / PROD System. There is also additional Space for Sy-Variables in the Tooltip and

>>THE KILLER FEATURE<<:  A direct Link to SAP CRM WebUi Forum Search... You have to add the code like described in (5).

- In Serenity there is a problem with the collapse Navbar since we are influencing the <p> tag

- If you can't see the new Texts - check the position of your coding in (5) and follow (6).

- If your breakpoint is not working - check that you have used an external breakpoint and try to choose another (Standard) Layout.

Note From Carsten Kasper in the original Thread:

- You can modify the .htm page without any hassles, but be aware that your changes might be overwritten with the next service pack.

Have Fun...

Labels

crm crm Delete
webui webui Delete
web web Delete
ui ui Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.