- Agentic AI on Eclipse ADT with ADT MCP and GitHub Copilot.
- Prerequisite
- MCP Setup in Eclipse ADT
- Testing
- Test Connection
- Create Test Program.
- Refactor created ABAP program into class structure.
Agentic AI on Eclipse ADT with ADT MCP and GitHub Copilot.
This is similar to this SAP help on Agentic AI but SAP help is on VS Code.
Agentic AI for ABAP Development | SAP Help Portal
Prerequisite
- Eclipse 2026-06 or later and SAP ABAP Development Tools (ADT) 3.60.0 or later. To install this check on SAP Development Tools
- GitHub Copilot 0.21.0 or later with account to login. To install, check on Installing GitHub Copilot in Eclipse ADT.
Note: Version in pre-requisite is the version in my laptop at the time of writing. Real version supported may be a little lower.
Tip: Click on Eclipse menu Help->Check for updates to update these to latest version if already installed in lower version.
MCP Setup in Eclipse ADT
- Enabling MCP Server in Eclipse ADT menu at Window->Preferences...
- Then click on enable ADT MCP Server in ABAP Development->MCP Server then apply.
Copy the token to use in next step. Leave the port as is unless you use it for something else already. - Set MCP Server for GitHub Copilot menu. Copilot->Edit Preferences...
- Select Model Context Protocol(MCP) and update server configurations with snippet below and token from step 2. Then apply.
{
"servers": {
abap-mcp": {
"url": "http://localhost:2234/mcp",
"requestInit": {
"headers": {
"Authorization": "Bearer <Token from step 2>"
}
}
}
}
}- Now. It is ready for testing via Chat.
Testing
Test Connection
- Check whether MCP can connect to SAP system. Type "List connection" in Chat and hit enter.
- Allow MCP to run. You can use for this "Allow tools from "abap-mcp" in this session". As long as this chat is still open then it won't ask again. You can change your selection for next session unless you select as always allow then it won't ask for permission again.
- Result.
Create Test Program.
Here is the prompt "create a program to send hello world email to [email protected] in package $TMP."
Result
Here is generated code.
REPORT zrca_r0001_hello_email.
CONSTANTS:
lc_subject TYPE so_obj_des VALUE 'Hello World',
lc_recipient TYPE ad_smtpadr VALUE '[email protected]'.
START-OF-SELECTION.
DATA: lt_body TYPE soli_tab,
lo_send_request TYPE REF TO cl_bcs,
lo_document TYPE REF TO cl_document_bcs,
lo_recipient TYPE REF TO if_recipient_bcs,
lv_sent_to_all TYPE os_boolean,
lx_bcs TYPE REF TO cx_bcs.
APPEND 'Hello World' TO lt_body.
TRY.
lo_send_request = cl_bcs=>create_persistent( ).
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_body
i_subject = lc_subject ).
lo_send_request->set_document( lo_document ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( lc_recipient ).
lo_send_request->add_recipient( i_recipient = lo_recipient ).
lv_sent_to_all = lo_send_request->send( i_with_error_screen = abap_true ).
COMMIT WORK.
IF lv_sent_to_all = abap_true.
WRITE: / 'Email sent successfully to', lc_recipient.
ELSE.
WRITE: / 'Email send request was created, but not all recipients were confirmed.'.
ENDIF.
CATCH cx_bcs INTO lx_bcs.
WRITE: / 'Error while sending email:', lx_bcs->get_text( ).
ENDTRY.Refactor created ABAP program into class structure.
Use prompt "Restructure this into class".
Result
REPORT zrca_r0001_hello_email.
CLASS lcl_application DEFINITION FINAL.
PUBLIC SECTION.
CLASS-METHODS run.
PRIVATE SECTION.
CONSTANTS:
lc_subject TYPE so_obj_des VALUE 'Hello World',
lc_recipient TYPE ad_smtpadr VALUE '[email protected]'.
CLASS-METHODS send_mail
RETURNING VALUE(rv_sent_to_all) TYPE os_boolean
RAISING cx_bcs.
ENDCLASS.
CLASS lcl_application IMPLEMENTATION.
METHOD run.
TRY.
DATA(lv_sent_to_all) = send_mail( ).
IF lv_sent_to_all = abap_true.
WRITE: / 'Email sent successfully to', lc_recipient.
ELSE.
WRITE: / 'Email send request was created, but not all recipients were confirmed.'.
ENDIF.
CATCH cx_bcs INTO DATA(lx_bcs).
WRITE: / 'Error while sending email:', lx_bcs->get_text( ).
ENDTRY.
ENDMETHOD.
METHOD send_mail.
DATA: lt_body TYPE soli_tab,
lo_send_request TYPE REF TO cl_bcs,
lo_document TYPE REF TO cl_document_bcs,
lo_recipient TYPE REF TO if_recipient_bcs.
APPEND 'Hello World' TO lt_body.
lo_send_request = cl_bcs=>create_persistent( ).
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_body
i_subject = lc_subject ).
lo_send_request->set_document( lo_document ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( lc_recipient ).
lo_send_request->add_recipient( i_recipient = lo_recipient ).
rv_sent_to_all = lo_send_request->send( i_with_error_screen = abap_true ).
COMMIT WORK.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
lcl_application=>run( ).Note:
Result may vary by LLM used.
Copilot Instruction was added to create program according to naming convention.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.