SAP-Forum.ORG
   
This web site isn't affiliated with, sponsored by, or approved by SAP AG. Is only a SAP users community.

Go Back   SAP-Forum.ORG > SAP Forums > SAP ABAP

Similar Threads
Thread Thread Starter Forum Replies Last Post
Communication error occurred when trying to connect to source CMS Rampa SAP Business Objects 2 01-24-2012 07:13 PM
Q: Except agg counter using replacement path variable SAPMM SAP BW/BI 2 08-22-2011 08:16 PM
How to make Tax Code on A/P Invoice have EXEMPT code for Foreign BP SAPMM SBO - SAP Business One 2 06-28-2011 09:19 PM
WebElements: HTML not rendering when using Bex Query as Source Pepa SAP Business Objects 1 02-06-2011 12:12 AM
ABAP Code Optimization. ERP SAP ABAP 2 05-24-2010 06:00 PM

Aprenda SAP!
Reply
 
Thread Tools Display Modes
  #1  
Old 02-02-2012, 08:58 PM
Rampa Rampa is offline
Senior Member
 
Join Date: May 2010
Location: Utah
Posts: 197
Default Procedural ABAP refactoring or mass source code replacement

Hello experts,

I am trying to change hard coded values from multiple source codes with respective constant names. Is there a tool to find and replace them according to a rules table. I wouldn't mind even if this tool was not in SAP (eg. Eclipse).

Thank you in advance,
Rampa
Reply With Quote
Sponsors
  #2  
Old 02-02-2012, 09:00 PM
Portal Portal is offline
Senior Member
 
Join Date: May 2010
Location: Miami
Posts: 791
Default Re: Procedural ABAP refactoring or mass source code replacement

Hello Rampa,

I don't think this can be fully automated, you need a human brain to decide for example whether 'MWST' is to be replaced by a constant or just a harmless column heading abbreviation.
If you know what literals to look for, you can use program RS_ABAP_SOURCE_SCAN to quickly find related code snippets across packages.

Regards,
Portal
Reply With Quote
  #3  
Old 02-02-2012, 09:03 PM
Rampa Rampa is offline
Senior Member
 
Join Date: May 2010
Location: Utah
Posts: 197
Default Re: Procedural ABAP refactoring or mass source code replacement

Hello Portal,

Thank you for your prompt response.

My idea was (and is) that since the ABAP compiler is embedded in Netweaver, it would be smart to get the compiler functionality together with regular expressions declaration in order to do what unix like systems do for years, replace strings with other strings. The program you suggest is well known for finding literals (substrings) in source, but when it does you never know what is the role of the literal on the source code line (in the particular code statement).

Of course I agree with you regarding the term refactoring, that a human eye is needed, if I was to do real source code pattern recognition and replacement, but my driving need is more simple and way far from that (at least for now).

Please keep me posted in case you have any news on the subject.

Regards,
Rampa
Reply With Quote
Entre a los Links relacionados
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 09:18 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Forum Design By inferno