如何修改SAP ABAP webdynpro的背景色
Recently one local customer requires that they could like to change the background color from blue to others for example green.
Theme Editor related topics
I searched SCN and found there are many threads to recommend the usage of Theme Editor. Then I tried the download links contained in note 854870 – Netweaver 04 Web Dynpro Theme Editor Download and found none of them are valid any more. In thread I got information from Samuli Kaski that theme editor is no longer supported. So I plan to try another approach.
Manual change the CSS file
Then I find the document Custom themes for Web Dynpro ABAP applications without SAP Enterprise Portal integration. However when I try it in my CRM 7.0 EHP2 system, I found the instructions in that document could not directly work without some minor adaptations. In this document I will explain the step by step investigation to find all necessary adaptations.
The default background color changed before looks like below:
Step1: Download the standard theme from Mime repository
use tcode SE80, tab “MIME Repository”, follow the path /PUBLIC/BC/UR/ur_mines_nw7.zip, download it locally.
Unzip the zip file and we can observe several themes inside it. In the document Custom themes for Web Dynpro ABAP applications without SAP Enterprise Portal integration it contains the steps how to create a custom theme. However for the very case of my local customer, it is ok to directly change the standard theme. So the next task is which of the following themes is the currently being used one?
Step2: Identify the real theme currently being used
Launch the webdynpro application as usual, click F12 to open the development tool of IE. ( Of course you could also use Chrome ) Here we can find the working theme is “sap_tradeshow_plus” and css file is ls_ie6.css. The CSS class for body DOM element is urBdyStd.
With these information at hand now it is ready to change the CSS file ls_ie6.css, which is located in the folder below:
Step3: Manual change the css file
Before the change, we should identify which DOM node in the CSS file should be changed. In IE development tool, click on body node, and here we can find the element attribute “background-color” which controls the current background color.
The current rgb value is (234, 241, 246). I use an online tool http:// rgb.phpddt.com/ to verify whether this color is just the current default background color. In this online tool after I maintain the rgb value and click ok button, the right area of the tool is rendered with the specified color.
I plan to change the default color to rgb value (86, 255, 170) which display as green colow below:
It is very convenient to verify whether the change on CSS file could really take effect, since we could directly change the attribute in IE development tool.
Just click the attribute “background-color” and then it will switch to edit mode. Change the value to (86, 255,170) and click enter.
Soon we can see the background color is changed to green as expected.
However this change is not persisted, we should change the CSS file via text editor or any other CSS editor.
I just use the Notepad to change the color. Note that the development tool translates the HEX color to rgb color automatically for us, but in the CSS file, we should maintain the corresponding HEX color #56FFAA for rgb value( 86, 255, 170 ).
Save the css file after change.
Step4: Upload and deploy the modified theme
Zip the folder ur_mimes_nw7 again with modified css file. I just delete the original css file from zip file via context menu->Delete files, the drag the modified css file from my desktop to zip file.
Then run report WDG_MAINTAIN_UR_MIMES( not the report BSP_UPDATE_MIMEREPOS mentioned in the document Custom themes for Web Dynpro ABAP applications without SAP Enterprise Portal integration ). Double click on Menu “Upload MIME archive to server”:
after successfully upload, double click on “Deploy MIMEs”:
Step5: Invalidate client and server cache
in transaction code SMICM you could observe many server side cache for performance improvement:
Invalidate them via HTTP Plugin->Server Cache->Invalidate Globally to clear cache otherwise you might still see the color before the change.
Global invalidation could ensure the invalidation is distributed to all other application server instances.
Clear your browser cache in client side as well. Then launch webdynpro application, and you could see the background color is changed to green as expected:
How to change other UI styles
It is very convenient to change other UI styles as well via the same steps. When you expand the HTML dom node tree in the left part of the development tool, the corresponding UI element will be automatically highlighted in the browser so that you can know which UI element currently are being edited by you. Then you could try to change its CSS attribute value in the right part. The change is done via a “what you see is what you get” mode. For example I change the border color and borth width of the table tool bar below:
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2721606/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用SAP Transaction Launcher將ABAP Webdynpro嵌入到WebClient UI中WebclientUI
- 在SAP CRM WebClient UI裡開啟ABAP Webdynpro頁面WebclientUI
- SAP CRM WebClient UI和ABAP Webdynpro頁面的互相跳轉WebclientUI
- 把經典的ABAP webdynpro應用配置到SAP Fiori Launchpad裡Web
- SAP SRM ABAP Webdynpro和CFCA usb key整合的一個原型開發Web原型
- ABAP Webdynpro效能測試工具Web
- ABAP webdynpro的view navigation和WebUI的view navigationWebViewNavigationUI
- 如何修改 SAP ABAP OData 模型,使其支援 $expand 操作試讀版模型
- 在ABAP Webdynpro裡顯示PDF的一種辦法Web
- ABAP Webdynpro和WebClient UI不同的會話管理機制WebclientUI會話
- ABAP Webdynpro和CRM WebClient UI不同的UI表現機制WebclientUI
- 如何使用 ABAP 程式消費 SAP ABAP OData 服務
- 如何給 SAP ABAP ALV 報表的修改功能新增自定義校驗邏輯試讀版
- SAP ABAP Netweaver 裡的 ABAP 會話概念會話
- SAP ABAP CDS view裡的註解在ABAP後臺是如何被解析的?View
- 天地圖修改主題顏色修改背景色地圖
- SAP ABAP FOR ALL ENTRIES 的用法
- 如何使用ABAP程式碼建立SAP Product CategoryGo
- SAP ABAP Gateway Client 的 ABAP 實現,重用 HTTP ConnectionGatewayclientHTTP
- 如何在 SAP ABAP 系統中使用 Adobe FormORM
- SAP ABAP資料表的操作
- SAP ABAP 程式之間的呼叫
- SAP ABAP呼叫WEBAPI(一)WebAPI
- My suggestions on SAP ABAP transformationORM
- SAP ABAP的CI/CD解決方案
- SAP ABAP SQL的execution plan和cacheSQL
- 什麼是 SAP ABAP 的 include structureStruct
- SAP ABAP Application Log 的使用方法APP
- SAP SEGW 事物碼裡的 ABAP Editor
- SAP Hybris的build callback和SAP ABAP的SGEN事務碼UI
- 使用 HTTP PUT, PATCH 以及 MERGE 請求消費 SAP ABAP OData 服務修改操作HTTP
- SAP中如何檢視BOM的修改記錄呢?
- SAP ABAP Append structure 介紹APPStruct
- SAP ABAP RFC介面通用日誌工具:abap fm logger
- 如何使用Prometheus採集SAP ABAP Netweaver的應用日誌資料Prometheus應用日誌
- 如何處理消費SAP ABAP Web Service時遇到的Unauthorized錯誤WebZed
- 如何把一個ABAP檢視新增到SAP GUI的收藏夾裡GUI
- 如何匯入某網站的certificate證書到SAP ABAP系統網站