如何修改SAP ABAP webdynpro的背景色

智码旅人
• 阅读 1764

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:

如何修改SAP ABAP webdynpro的背景色

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.

如何修改SAP ABAP webdynpro的背景色

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?

如何修改SAP ABAP webdynpro的背景色

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.

如何修改SAP ABAP webdynpro的背景色

With these information at hand now it is ready to change the CSS file ls_ie6.css, which is located in the folder below:

如何修改SAP ABAP webdynpro的背景色

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.

如何修改SAP ABAP webdynpro的背景色

The current rgb value is (234, 241, 246). I use an online toolhttp://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.

如何修改SAP ABAP webdynpro的背景色

I plan to change the default color to rgb value (86, 255, 170) which display as green colow below:

如何修改SAP ABAP webdynpro的背景色

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.

如何修改SAP ABAP webdynpro的背景色

Soon we can see the background color is changed to green as expected.

如何修改SAP ABAP webdynpro的背景色

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 ).

如何修改SAP ABAP webdynpro的背景色

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.

如何修改SAP ABAP webdynpro的背景色

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”:

如何修改SAP ABAP webdynpro的背景色

after successfully upload, double click on “Deploy MIMEs”:

如何修改SAP ABAP webdynpro的背景色

Step5: Invalidate client and server cache

in transaction code SMICM you could observe many server side cache for performance improvement:

如何修改SAP ABAP webdynpro的背景色

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.

如何修改SAP ABAP webdynpro的背景色

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:

如何修改SAP ABAP webdynpro的背景色

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:

如何修改SAP ABAP webdynpro的背景色

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
如何修改SAP ABAP webdynpro的背景色

点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
美凌格栋栋酱 美凌格栋栋酱
6个月前
Oracle 分组与拼接字符串同时使用
SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
Jacquelyn38 Jacquelyn38
4年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Stella981 Stella981
3年前
KVM调整cpu和内存
一.修改kvm虚拟机的配置1、virsheditcentos7找到“memory”和“vcpu”标签,将<namecentos7</name<uuid2220a6d1a36a4fbb8523e078b3dfe795</uuid
Wesley13 Wesley13
3年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
3年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
3年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Wesley13 Wesley13
3年前
34.TCP取样器
阅读文本大概需要3分钟。1、TCP取样器的作用   TCP取样器作用就是通过TCP/IP协议来连接服务器,然后发送数据和接收数据。2、TCP取样器详解!(https://oscimg.oschina.net/oscnet/32a9b19ba1db00f321d22a0f33bcfb68a0d.png)TCPClien
Python进阶者 Python进阶者
1年前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这
智码旅人
智码旅人
Lv1
其实人世间的挚爱,只有两件事情就可以表达。
文章
5
粉丝
0
获赞
0