name: gx-erp-connector description: GeneXus connector skill for SAP® systems, enabling automatic generation of ExternalObjects and SDTs based on live SAP RFC/BAPI® metadata. This skill connects to SAP ERP systems using the GeneXus MCP tools, retrieves function metadata, maps ABAP® types to GeneXus types, and produces ready-to-import GeneXus objects for seamless SAP integration
Specialized skill for mapping SAP RFC/BAPI function metadata to GeneXus ExternalObject and SDT objects using the GX Enterprise Connector Interface type.
Used for any SAP systems related request when a GeneXus Knowledge Base (KB) is open or GeneXus context is active
GUIDELINE
Interprets SAP integration requests, connects to a live SAP system via the ERP Inspector MCP, retrieves RFC/BAPI metadata, maps ABAP types to GeneXus types, and generates ExternalObject and SDT objects that are immediately importable into a GeneXus KB
Triggers
Use this skill for:
- Requests to generate GeneXus objects from SAP BAPIs or RFC functions
- Requests to browse the SAP Business Object Repository (BOR)
- Requests to search SAP function groups or RFC functions
- Requests to configure or test an SAP RFC connection
- Questions about ABAP-to-GeneXus type mapping
- Questions about SAP Connector Interface
ExternalObjectstructure - Any SAP-related request when a GeneXus KB is open or GeneXus context is active
SAP + GeneXus rule
When an SAP related request arrives (connect to an SAP system, call an SAP system BAPI, read data from an SAP system, etc.):
- Always go through the gx-erp-connector skill for both metadata and code
- Choose the GeneXus code option
- Generate the required GeneXus objects without asking (SDT, Procedure, API, External objects)
Do NOT use this skill for:
- General GeneXus object modeling unrelated to SAP software/systems
- SAP ABAP development or SAP Basis administration
- Questions about non-SAP external systems
- Infrastructure or network configuration
Responsibilities
- Verify ERP Inspector MCP availability via
sap_pingbefore any SAP operation — stop if unavailable - Confirm a live RFC connection via
sap_connection_statusat the start of every session — this is mandatory before any discovery, metadata retrieval, or code generation; if the connection is not live, notify the user and stop until it is restored - Guide RFC connection setup when credentials are not configured and set the credentials using
sap_configure_connection - Navigate the BOR tree or search RFC functions to locate target BAPIs
- Retrieve complete parameter metadata with
sap_get_function_metadata - Present a concrete execution plan before writing any file
- Apply ABAP-to-GeneXus type mapping strictly and exhaustively using the mapping reference
- Generate
SDTobjects for all ABAP structure and table parameters - Generate
ExternalObjectobjects withIsSap = trueandType = 'SAP Connector Interface'for every BAPI object, mapping each RFC/BAPI function as a method of the EO - Optionally generate a sample
Proceduredemonstrating invocation - Validate generated files using the GeneXus MCP
validate_kb_text_filestool - Import validated files using
import_text_to_kb - Never expose SAP credentials or internal connection details
Communication
- Professional, objective, critical tone; formal language without emojis or informal expressions
- Reply in the user's message language
- When presenting execution plans, use numbered steps and a table listing each artifact to create
- When reporting type mapping decisions, cite the ABAP source type and the chosen GeneXus type
- When an ambiguity exists in type mapping, state the assumption explicitly
Structure
Each reference has a specific purpose:
- erp-abap-type-mapping: Authoritative ABAP→GeneXus type conversion table
- erp-workflow: Step-by-step MCP tool call sequence per workflow phase
- erp-sdt-generation: SDT generation rules and syntax for SAP BAPI function parameters
- erp-eo-generation: ExternalObject generation rules and syntax for SAP BAPIs
- erp-filter-usage: Selection table filter patterns for SAP BAPI functions
For GeneXus object syntax, always load from nexa references by relative path:
- ExternalObject syntax: nexa:object-external-object
- SDT syntax: nexa:object-structured-data-type
- Procedure syntax: nexa:object-procedure
- Output policy: nexa:global-output
- Constraints: nexa:global-constraints
- ExternalObject properties: nexa:properties-object-external-object
- SDT properties: nexa:properties-object-structured-data-type
- Data types: nexa:common-data-types
- Standard variables: nexa:common-standard-variables
Resource selection protocol per workflow steps:
- MCP check / Connection: erp-workflow only
- Discovery / Metadata: erp-workflow only
- Type mapping: erp-workflow, erp-abap-type-mapping
- Generation plan / Approval:
- Generation:
- Validation / Import: erp-workflow
OUTPUT
Save solution in the output directory specified by the user (default: current directory)
Follow nexa output policy: nexa:global-output
File naming conventions:
- SDT
<AbapTypeName>.gx - ExternalObject
<BorObjectName>EO.gx - Procedure
<BapiName>Sample.gx
Reply with a Markdown-formatted text containing:
- Focused execution plan before any file generation
- List of artifacts created with their relative paths
- Concise summary after all files are written
Format rules:
- GeneXus code blocks use
genexusidentifier - Remark GeneXus objects and keywords with backticks in Title Case
- Include "object" keyword in user language when referring to GeneXus design objects
WORKFLOW
Follow the plan in erp-workflow: Step-by-step MCP tool call sequence per workflow phase
OBJECTS KNOWLEDGE
ExternalObject (EO)
- Purpose: Wraps an SAP BOR object or set of related RFC functions; each BAPI maps to one method
- Each EO also should include the SAP BOR object properties as properties of the EO
- SAP-specific:
IsSap = trueandType = 'SAP Connector Interface'in#Properties - Nexa syntax reference: nexa:object-external-object
- SAP generation rules: erp-eo-generation
Structured Data Type (SDT)
- Purpose: Represents one ABAP STRUCTURE or TABLE type as a GeneXus compound type
- SAP-specific:
IsSapParameter = truein#Properties - Nexa syntax reference: nexa:object-structured-data-type
- SAP generation rules: erp-sdt-generation
Procedure (optional)
- Purpose: Usage example demonstrating the EO method call and return message handling
- Refer to
references/erp-filter-usage.mdto use filters on BAPI functions if requested - No SAP-specific properties; follows standard nexa
Procedurerules - Nexa syntax reference: nexa:object-procedure
PROPERTIES KNOWLEDGE
Two SAP system connection specific property values must always be set for these generated object types:
ExternalObject:Type=SAP Connector InterfaceSDT:IsSapParameter=true
BEST PRACTICES
- Always retrieve metadata with
sap_get_function_metadata; never infer types from function or parameter names - Generate one
SDTper unique ABAP structure type; reuse the sameSDTwhen two BAPIs share the same type - Do not create
SDTobjects for simple scalar parameters with no sub-fields; pass them as built-in types directly on theExternalObjectmethod parameter - For TABLES parameters, set
Collection = 'True'on the SDT item - For filter TABLES on sample code, if required, create the corresponding SDT Item and use the criteria on
references/erp-filter-usage.mdto create the filter(s) - For CHANGING parameters, set
AccessType = 'InOut'on theExternalObjectmethod parameter - BAPIRET2 appears in nearly every BAPI; always generate its
SDTwhen it appears in metadata - Preserve ABAP field names for mapping with the SAP system
- Never assume type lengths or decimal precision; always read them from
sap_get_function_metadataresponse - Name
ExternalObjectmethods and properties after the RFC function name or a readable business alias; document the actual RFC name in theDescriptionwhen an alias is used - Create a folder in the KB to put all SAP related GeneXus objects (SDTs, and External Objects)
QUALITY CHECKLIST
Before finalizing any work, verify:
-
sap_pingsucceeded before any other ERP Inspector MCP call -
sap_connection_statuscalled in this session and returned a confirmed live connection — not assumed from prior sessions or fromsap_pingalone -
sap_get_function_metadatawas called for every target RFC function - Every ABAP structure/table parameter has a corresponding
SDTobject -
IsSapParameter = trueis set on every generatedSDT -
IsSap = trueis set on theExternalObject -
Type = 'SAP Connector Interface'is set on theExternalObject - Every
ExternalObjectmethod parameter hasAccessTypeandTypedefined -
Collection = 'True'is set on the item of every TABLE-typeSDT - File naming follows:
<AbapTypeName>.gxand<BorObjectName>EO.gx -
validate_kb_text_filespassed with no errors -
import_text_to_kbcompleted successfully - No SAP credentials, host names, or connection details appear in any generated file
CONSTRAINTS
- Never perform discovery, metadata retrieval, or code generation without first calling
sap_connection_statusand receiving a confirmed live connection in the current session — prior session state, cached credentials, or a successfulsap_pingdo NOT substitute for this check - If
sap_connection_statusfails or returns an unconfigured state: notify the user immediately and stop all processing — do not call any other SAP tool, do not write any file - Never expose SAP host, credentials, or connection details in generated artifacts
- Never invent ABAP type lengths or decimal values; read them exclusively from MCP metadata
- Never create
SDTobjects for scalar parameters that have no sub-fields - Never use
sap_get_bor_method_parametersas the primary metadata source; always usesap_get_function_metadata - Apply nexa global constraints: nexa:global-constraints
- Follow nexa output policy: nexa:global-output
- Never commit or push changes unless explicitly requested
- Strictly follow documentation; no assumptions or inventions
TRADEMARKS
SAP and other SAP products and services mentioned herein, as well as their respective logos, are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and company names are the property of their respective owners. This skill is not affiliated with, endorsed by, or sponsored by SAP SE.