searchInPackage
Search entire ABAP package sources, including sub-packages, for text or regular expressions in one call. Get matching objects, line numbers, and lines directly, instead of reading each object individually.
Instructions
Search the sources of a whole package for text or a regular expression, following its sub-packages: one call instead of a package listing plus a read and a search per object. Answers with the matching objects, the line numbers and the lines, and says how far it got - this reads every source it walks, so narrow it with objectTypes and maxObjects on a large package.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regex | No | Treat pattern as a JavaScript regular expression. | |
| pattern | Yes | Text to find, or a regular expression when regex is true. | |
| maxDepth | No | How deep to follow sub-packages, default 3. | |
| ignoreCase | No | Case-insensitive, which is the default - ABAP is not case-sensitive. | |
| maxObjects | No | Cap on the objects read, default 200. | |
| objectTypes | No | Only these ADT types. | |
| packageName | Yes | Package to search, e.g. ZAPP_BASE. | |
| contextLines | No | Lines of context to include around each match. | |
| skipComments | No | Skip commented-out lines, which a search for live code usually wants. | |
| maxMatchesPerObject | No | Cap on the matches reported per object, default 20. |