Skip to content

Adding files for blog post about agentic sap workflows.#1502

Open
eprofeta wants to merge 6 commits intomasterfrom
eprofeta/agenticsapworkflows
Open

Adding files for blog post about agentic sap workflows.#1502
eprofeta wants to merge 6 commits intomasterfrom
eprofeta/agenticsapworkflows

Conversation

@eprofeta
Copy link

These files are the artifacts and code samples, images, html pages to illustrate a couple of blog posts on the Logic Apps tech community.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds blog post materials demonstrating agentic SAP workflows with Logic Apps. The submission includes ABAP function modules, SAP metadata definitions, Azure Logic Apps workflows, validation rules, sample data, and HTML documentation for illustrating intelligent SAP integration patterns using AI agents for data validation and analysis.

Changes:

  • ABAP code for creating IDocs and performing order analysis with remote function calls
  • SAP metadata (data elements, domains, tables, IDoc types) exported via abapGit
  • Three Logic Apps workflows: IDoc filtering with validation, sales prediction/analysis, and order processing
  • Validation rules and error reports for order data quality enforcement
  • Sample CSV order data and HTML documentation showing analysis results

Reviewed changes

Copilot reviewed 55 out of 59 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
Z_*.abap ABAP function modules for RFC-based order processing and IDoc creation
abapgitexported/src/*.xml SAP Data Dictionary objects (tables, data elements, domains, IDoc types)
Agentic*.json Logic Apps workflows implementing AI-driven validation and analysis
SendCustomerOrders*.json Workflows for processing and sending customer orders
ValidationRules.txt Business rules for order data validation
ValidationErrorsReport.txt Sample validation error output
Online-Store-Orders*.csv Sample order data for testing
Analysis.htm HTML report showing AI-generated order analysis
*.xsd XML schemas for RFC function interfaces

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +438 to +440
"GatewayHost": "YOURHOSTNAMEHERE",
"GatewayService": "YOURGATEWAYSERVICEHERE",
"ProgramId": "YOURPROGRAMIDHERE",
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placeholder values 'YOURHOSTNAMEHERE', 'YOURGATEWAYSERVICEHERE', and 'YOURPROGRAMIDHERE' need to be replaced with actual SAP gateway configuration before deployment. These will cause connection failures if not properly configured.

Copilot uses AI. Check for mistakes.
}
},
"method": "get",
"path": "/SOMESHAREDFOLDERPATH/@{encodeURIComponent(encodeURIComponent('YOURSITEHERE'))}/GetFileContentByPath",
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SharePoint path contains placeholder values 'SOMESHAREDFOLDERPATH' and 'YOURSITEHERE' that must be replaced with actual SharePoint site and folder paths before deployment. This will cause failures when the workflow attempts to retrieve validation rules.

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +31
CALL FUNCTION 'Z_GET_ORDERS_ANALYSIS' DESTINATION DEST
IMPORTING
ANALYSIS = ANALYSIS
TABLES
IT_CSV = IT_CSV
CHANGING
RETURN = RETURN
EXCEPTIONS
SENDEXCEPTIONTOSAPSERVER = 1
system_failure = 2 MESSAGE EXCEPTIONMSG
communication_failure = 3 MESSAGE EXCEPTIONMSG
OTHERS = 4.
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ABAP function is recursively calling itself with the same name 'Z_GET_ORDERS_ANALYSIS' using a remote destination. This creates infinite recursion if DEST points to the same system. The function should either call a different function implementation or the comment on line 17 is misleading (it mentions ZCREATE_ONLINEORDER_IDOC but the code calls Z_GET_ORDERS_ANALYSIS). Verify that this recursive call is intentional and that DEST always points to a different system or workflow endpoint.

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +27
CALL FUNCTION 'Z_GET_ORDERS_ANALYSIS' DESTINATION DEST
IMPORTING
ANALYSIS = ANALYSIS
TABLES
IT_CSV = IT_CSV
CHANGING
RETURN = RETURN
EXCEPTIONS
SENDEXCEPTIONTOSAPSERVER = 1
system_failure = 2 MESSAGE EXCEPTIONMSG
communication_failure = 3 MESSAGE EXCEPTIONMSG
OTHERS = 4.
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as in Z_GET_ORDERS_ANALYSIS_ABAPCODE.abap: The function recursively calls itself which could cause infinite recursion if DEST points to the same system. Additionally, the comment on line 17 mentions ZCREATE_ONLINEORDER_IDOC but the code calls Z_GET_ORDERS_ANALYSIS.

Copilot uses AI. Check for mistakes.
Comment on lines +262 to +405
"inputs": {
"uri": "YOURBLOBURIHERE?comp=lease",
"method": "PUT",
"headers": {
"x-ms-lease-action": "acquire",
"x-ms-lease-duration": "30",
"x-ms-version": "2023-11-03",
"x-ms-date": "@{formatDateTime(utcNow(),'r')}"
},
"authentication": {
"type": "ManagedServiceIdentity",
"audience": "https://storage.azure.com/"
}
},
"runAfter": {
"Delay": [
"SUCCEEDED"
]
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
}
},
"Delay": {
"type": "Wait",
"inputs": {
"interval": {
"count": "@rand(1,10)",
"unit": "Second"
}
}
},
"Set_status_code": {
"type": "SetVariable",
"inputs": {
"name": "statusCode",
"value": "@{outputs('Acquire_validation_errors_blob_lease')?['statusCode']}"
},
"runAfter": {
"Acquire_validation_errors_blob_lease": [
"SUCCEEDED",
"FAILED",
"TIMEDOUT",
"SKIPPED"
]
}
}
},
"runAfter": {
"Does_blob_exist": [
"SUCCEEDED"
]
}
},
"Save_lease_id": {
"type": "SetVariable",
"inputs": {
"name": "leaseId",
"value": "@outputs('Acquire_validation_errors_blob_lease')?['headers']['x-ms-lease-id']"
},
"runAfter": {
"Until_lease_is_acquired": [
"SUCCEEDED"
]
}
},
"Append_verification_results": {
"type": "Http",
"inputs": {
"uri": "YOURBLOBNAMEHERE with append",
"method": "PUT",
"headers": {
"x-ms-version": "2023-11-03",
"Content-Length": "@{length(variables('FailedVerificationInfo'))}",
"content-type": "text/plain",
"x-ms-lease-id": "@{outputs('Acquire_validation_errors_blob_lease')?['headers']['x-ms-lease-id']}"
},
"body": "@variables('FailedVerificationInfo')",
"authentication": {
"type": "ManagedServiceIdentity",
"audience": "https://storage.azure.com/"
}
},
"runAfter": {
"Save_lease_id": [
"SUCCEEDED"
]
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
}
},
"Release_the_lease": {
"type": "Http",
"inputs": {
"uri": "YOURBLOBNAMEHERE with proper parameters to release the lease",
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple placeholder URIs 'YOURBLOBURIHERE' and 'YOURBLOBNAMEHERE' need to be replaced with actual Azure Blob Storage URIs. These placeholders will cause runtime failures when the workflow attempts to interact with blob storage.

Copilot uses AI. Check for mistakes.
eprofeta and others added 5 commits February 13, 2026 14:16
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant