callMethod
Invoke a static ABAP method with parameter values and get its returning, exporting, and changing parameters plus any exception text. Executes on the system, rolling back changes unless commit is set.
Instructions
Call a static method of a class with values and get what it returned, as data. The signature is read from the class source, because classComponents lists methods without their parameters. Returns the returning parameter, the exporting and changing ones by name, and any exception with its text. Static methods only: an instance method needs a constructor call, and runSnippet is the way to do that. IMPORTANT: this executes the method on the target system as the connected user. Nothing it changed is kept - the call is followed by ROLLBACK WORK - unless commit is set. It counts as a writing tool and is refused in read-only mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commit | No | Keep what the call did: COMMIT WORK AND WAIT instead of ROLLBACK WORK. Default false. | |
| dryRun | No | Return the generated class source without touching the system. | |
| values | No | Values by parameter name, same shapes as callFunction takes. Only importing and changing parameters can be supplied. | |
| maxRows | No | Rows of each table kept in the answer, default 20. | |
| className | Yes | Class holding the method, e.g. ZCL_APP. | |
| keepClass | No | Leave the generated class on the system instead of deleting it. Default false. | |
| methodName | Yes | Static method to call, e.g. GET_STAWN. | |
| snippetClass | No | Name for the throwaway class. Default ZMCP_CALL_<timestamp in base 36>. |