09-29-2008 2:52 PM
Hello,
I want to edit several css-files with an ABAP-programm, which are saved in the mime-repository. I want to use it, to do some changes on my stylesheets which I cant archive with the eclipse theme editor plugin. So I have do edit all selfmade css-changes, each time I generate the stylesheets with the themeEditor.
Because of this, i want a programm which do this changes for me ....
How can I open a .css-File, search for a string in this file and replace it with another string?
For example:
.....a}.urFontStd{font-size:small;font-style:normal;font-weight:normal}.urGrpBdyBox{background-color:#D7DBD2;border-color:#B5BBAD;border-style:solid;border-width:1px}.urGrpBdyBoxBgColor{background-color:#D7DBD2}.urGrpBdyBoxNoBorder{background-color:#D7DBD2}.urGrpBdyBoxPd.urGrpBdyBoxBgColorPd.urGrpBdyBoxNoBorderPd"
and replace it with
.urGrpBdyBox{background-color:#FFFFFF;border-color:#000000;border-style:solid;border-width:1px}
It should be possible, to replace strings with a different length....(in two ways...) ....
I'm new in ABAP, so I hope that somebody can help me
09-29-2008 2:59 PM
It's possible to load the contents of a file and to search and replace a string (regardless of the length). So basically that should be possible with a CSS file as well.
The only thing is: do you really want that? Isn't it much easier to open up the CSS with for instnace notepad and simply search and replace?
09-29-2008 3:20 PM
Can you post a short example, please? Or can you tell me the name of the Fuba/Method ....?
I did it with notepad a lot of times But now I'm sick of editing all the css' each time i changed something in the themeeditor....