Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
ThFiedler
Product and Topic Expert
Product and Topic Expert
Hi folks,

maybe you know that situation: You want to find/replace content within your ABAP code but you want to restrict the search operation only to a specific area of the code, e.g. a method or a local class.

The solution is quite simple because on the Find/Replace dialog there is the option to restrict the search scope on the selected lines:

 



 

 

Have Fun.

Thomas.

 

 

 
8 Comments
Jelena
Active Contributor
Is "All" the default scope even if something is selected? That would be rather counter-intuitive IMHO...

In SE38, I use Ctrl-F and the Replace works only for the selected area. If I want to run it for the whole thing then I just don't select anything. I believe it's the same way in MS Office, for example.

 
dilorenzo
Participant
I don‘t have an adt installation here at the moment to verify it, but for 99.9999999999% I am sure it‘s the same logical default setting in ADT as you say it is in se38 and ms office.

It would have driven me insane if it would be the other way 🙂
m_unger
Employee
Employee

Hi Thomas,

a bit off-topic, but still search-related ?
Any idea how to find all occurrences of certain string within whole function group or module pool, i.e. in compound source code trees comprising includes? Even ADT’s improved ABAP Source Search (Ctrl-H), (where complex queries with AND/OR cannot be used in Search Filter, unfortunately) does not serve this task well.
I still need to open the module pool or function group source code in SE80 and use binoculars icon (Ctrl-F) in the toolbar (i.e. ‘global’ find) to get the complete list – and then also the result list can be searched thru with another Ctrl-F to narrow down the lookup… So here SE80 search is still much more powerful. Any tip how to achieve the same in AiE?

 

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Michael,

yes, we have the HANA-based Sourcecode search:

https://blogs.sap.com/2014/01/23/abap-sourcecode-search/

Here you can also limit the search result for specific reports, function groups or module pools.

 

Regards,

Thomas.

 
lars-ole
Member
0 Kudos
Which leads me to the next question: How can I select an entire method within ADT?

Best regard,
Lars-Ole
ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Kudos
28f4b37a40894f18a22abc696b8154f4 Do you have an idea how to select the code of a method in ADT?
ŁukaszPęgiel
Contributor

Selection of Enclosed Element is not implemented for ABAP Editors, but you can use trick with folding. Means Ctrl+NumPad- will collapse method or element. If element use it again. Then select the collapsed method and Ctrl+C

ThFiedler
Product and Topic Expert
Product and Topic Expert
Good one. Thanks.