findInSource
Locate text or regex in ABAP source and get matching line numbers with context, without loading the full object. Searches source on the server, including INCLUDEd programs, to find FORM, MODULE, or any statement.
Instructions
Find text or a regular expression in the source of an ABAP object and get the matching line numbers with context - without pulling the source through the caller. This is how to locate a FORM, a MODULE or any statement in a report: there is no ADT fragment type for those, and asking fragmentMappings for one is answered with 400. For a report, searchIncludes follows its INCLUDE statements too.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regex | No | Treat pattern as a regular expression (default false). | |
| pattern | Yes | What to look for. Plain text by default; set regex to treat it as a JavaScript regular expression. | |
| version | No | Which version to read: "active", "inactive" or "workingArea". Omit for the ADT default, which is the inactive one. | |
| ignoreCase | No | Case-insensitive search (default true - ABAP source mixes cases freely). | |
| maxMatches | No | Stop collecting after this many matches (default 200). The total count is reported either way. | |
| contextLines | No | Lines of context to return around each match (default 0). | |
| skipComments | No | Ignore commented-out code: * in the first column, and anything after a " (default false). | |
| searchIncludes | No | Also search the includes the program pulls in with INCLUDE (default false). One extra read per include. | |
| objectSourceUrl | Yes | Source URL, e.g. /sap/bc/adt/programs/programs/zr_app_foo/source/main |