createFunctionModule
Create an active function module in an existing group from data-defined parameters and body. The ABAP interface is built automatically, then written, activated, and verified in one call.
Instructions
Create a function module in an existing group and give it its signature and body in one call: create, write, activate, verify. The signature is passed as data and the ABAP interface is built here - which is how it is set at all, since ADT keeps the interface in the source text. The group has to exist (create one with createAndWrite for FUGR/F) and a group outside $TMP needs a transport request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the new module, e.g. Z_APP_DO_THING. | |
| dryRun | No | Return the source that would be written, without creating anything. | |
| tables | No | Tables parameters as data: [{name, type, byValue?, optional?, default?}]. byValue writes VALUE(NAME); the default is by reference, which is what ADT writes for a bare name. | |
| changing | No | Changing parameters as data: [{name, type, byValue?, optional?, default?}]. byValue writes VALUE(NAME); the default is by reference, which is what ADT writes for a bare name. | |
| exporting | No | Exporting parameters as data: [{name, type, byValue?, optional?, default?}]. byValue writes VALUE(NAME); the default is by reference, which is what ADT writes for a bare name. | |
| importing | No | Importing parameters as data: [{name, type, byValue?, optional?, default?}]. byValue writes VALUE(NAME); the default is by reference, which is what ADT writes for a bare name. | |
| transport | No | Transport request - the REQUEST, not a task inside it. Not needed for a group in $TMP. | |
| exceptions | No | Classic exceptions, e.g. ["NOT_FOUND","NO_AUTHORITY"]. | |
| description | Yes | Short text for the module. | |
| functionGroup | Yes | The group it goes into. Must exist. | |
| implementation | No | Body lines, without FUNCTION/ENDFUNCTION. Omit and a TODO comment is left in their place. |