Adding files for blog post about agentic sap workflows.#1502
Adding files for blog post about agentic sap workflows.#1502
Conversation
There was a problem hiding this comment.
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.
| "GatewayHost": "YOURHOSTNAMEHERE", | ||
| "GatewayService": "YOURGATEWAYSERVICEHERE", | ||
| "ProgramId": "YOURPROGRAMIDHERE", |
There was a problem hiding this comment.
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.
| } | ||
| }, | ||
| "method": "get", | ||
| "path": "/SOMESHAREDFOLDERPATH/@{encodeURIComponent(encodeURIComponent('YOURSITEHERE'))}/GetFileContentByPath", |
There was a problem hiding this comment.
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.
| 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. |
There was a problem hiding this comment.
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.
| 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. |
There was a problem hiding this comment.
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.
| "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", |
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ow with action parse xml with schema.
…re/logicapps into eprofeta/agenticsapworkflows
These files are the artifacts and code samples, images, html pages to illustrate a couple of blog posts on the Logic Apps tech community.