Create ABAP Repository Object
sap_create_objectCreate a new ABAP repository object (program, include, class, interface, or function group) in SAP S/4HANA. Specify type, name, description, and package, then add source and activate.
Instructions
Create a new ABAP repository object (program, include, class, interface, or function group). The object must not already exist. After creation, use sap_write_source to add source code and sap_activate to make it live.
Args:
object_type ('program'|'include'|'class'|'interface'|'function_group').
object_name (string): new object name.
description (string): short description (≤70 chars).
package (string): default '$TMP' (local, no transport). Use a Z-package for real development.
transport (string): required when package ≠ '$TMP'.
response_format.
Returns (json): { objectType, objectName, uri, transport?, message }.
Examples:
"Create program ZTEST in $TMP" -> object_type='program', object_name='ZTEST', description='Test', package='$TMP'.
"Create class ZCL_HANDLER in ZDEV package" -> object_type='class', object_name='ZCL_HANDLER', package='ZDEV', transport='DEVK900123'. Notes:
After creation the object is empty and inactive. Write source with sap_write_source then activate.
Function modules cannot be created directly — create the function_group first, then use SE37 or sap_write_source on the group.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | No | Package to create the object in. '$TMP' = local (no transport needed). Use a Z-package for transportable objects. | $TMP |
| transport | No | Transport request (e.g. 'DEVK900123'). Required for non-$TMP packages. | |
| description | Yes | Short description (shown in SE80 object list). | |
| object_name | Yes | Name for the new object (e.g. 'ZNEW_PROG', 'ZCL_FOO'). Must not already exist. | |
| object_type | Yes | Kind of object to create: 'program', 'include', 'class', 'interface', or 'function_group'. | |
| response_format | No | Output format: 'markdown' (human-readable, default) or 'json' (structured). | markdown |