Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Editing files in mime-repository (css) with abap

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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?

0 Kudos

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