Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 5 of 6

From guideline to runtime: artifacts, flows and TPM agreements

9 min

Listen to this lesson

0:00 / 8:21

A MAG is useful documentation, but its real payoff is that Integration Advisor generates what a runtime needs. SAP Help lists the contents: schemas for syntax conversion (EDI to XML and back), schemas for precise payload validation against the MIG's rules, pre- and post-processing scripts, the main mapping XSLT, and example payloads for testing. Without the tool, someone writes all of these by hand.

Export, or inject

From a MIG or MAG, choose Export and then SAP Cloud Integration Runtime Artifacts or SAP Process Integration Runtime Artifacts. You get a ZIP with XSD, XSL, HTML and text files. SAP notes that the Process Orchestration format contains fewer artifacts. For Cloud Integration there is a shortcut: Inject > SAP Cloud Integration Flow Resources on a MAG lets you pick the tenant (the one in your Integration Suite subscription is discovered automatically), an integration package and an integration flow, and writes the resources straight into that flow. Configure-only packages are not offered.

Artifact (Cloud Integration export)Used in the inbound 850 flow for
Message XSD in the source MIG folderEDI to XML Converter and the EDI Splitter validation
[SourceMIG]_preproc.xslQualifier pre-processing: adds qualifier suffixes so validation and mapping see N1 [BY] and N1 [ST] as distinct
[SourceMIG]_RD.xsdOptional extended validation against the MIG's cardinalities, codes, patterns and assertions
[MAGName].xslThe mapping step: 850 to ORDERS05
[TargetMIG]_postproc.xslQualifier post-processing: removes the suffixes before the IDoc is sent
[MIGName]_testdata_ICA.xmlExample payload for testing the artifacts in the runtime

Generated artifacts and where SAP's EDI-to-IDoc example uses them.

An EDI-to-IDoc integration flow consuming Integration Advisor artifacts, following SAP's documented example.
The Sign-Off Table · thesignofftable.com/academy/sap-pim-206

Two settings in the MIG's Runtime Context tab change runtime behavior. Use complete Message XSD in EDI Flow Steps defaults to true for MIGs created since May 2025: the XSD contains every segment of the message type, avoiding surprise conversion errors. Set to false, the XSD contains only the selected segments, so an unexpected segment fails EDI Splitter validation and can trigger a negative acknowledgment. MIGs created before May 2025 default to false. For UN/EDIFACT, a second setting controls the message version value in UNH (field 0052), which changes the expected XSD file name.

Path 1: your own integration flow

SAP publishes EDI Integration Templates for SAP Integration Advisor on the SAP Business Accelerator Hub: inbound and outbound template flows such as EDI to IDoc, EDI to SOAP, IDoc to EDI and IDoc to cXML. Copy the package, adapt the flow and add the exported artifacts. Contoso uses this path for Lakeside Components: ORDERS05 for purchase order 4500002210 leaves CMP, the MAG ORDERS05_to_LAKESIDE_850 produces an X12 850 (004010), and an SFTP receiver drops the file on Lakeside's server, which is how Lakeside already receives orders.

The Lakeside MAG shows the outbound direction. E1EDK02 with the purchase order qualifier fills BEG03 with 4500002210; E1EDKA1 for the ship-to becomes N1 [ST], with plant 1710 Detroit translated to Lakeside's own dock code by a code value mapping; E1EDP19 material numbers fill the PO1 product IDs, Contoso's CMC-RTR-200 under BP and Lakeside's part number from the purchasing info record under VP; and unit PCE becomes EA. The flow's XML-to-EDI conversion then writes the X12 file with Contoso (CONTOSOMC) and Lakeside (LAKESIDEC) as interchange sender and receiver.

Path 2: Trading Partner Management

Trading Partner Management (TPM) manages partner profiles, agreement templates and agreements, and runs them through SAP's configure-only generic integration flows (the package Cloud Integration - Trading Partner Management V2): Step 1 sender communication flows, Step 2 Interchange Processing Flow and Step 3 Receiver Communication Flow. Instead of one flow per partner, one set of flows reads each agreement's configuration from the Partner Directory.

Great Lakes' 850 in TPM's generic flows: the agreement, pushed to the Partner Directory, tells each step which MIG, MAG and channels to use.
The Sign-Off Table · thesignofftable.com/academy/sap-pim-206

In an agreement template, each B2B transaction has a sender and a receiver side. On the Interchange step you choose the MIG; for UN/EDIFACT and ASC X12 you can set Create Acknowledgement; and you can enable payload and syntax validation. On the Mapping step the mapping option is Integration Advisor (pick the MAG), Custom Integration Flow or Sequential Mapping. TPM supports type systems including UN/EDIFACT and its subsets, ASC X12, SAP IDoc, SAP SOAP On-Premise and Cloud, GS1 XML and, in the V2 package only, Tradacoms and VDA messages. Agreements are created from a template by Copy from Template or Bind with Template, and Activate pushes the agreement into the Partner Directory.

  1. Integration AdvisorActivate GLFS 850 MIG, ORDERS05 MIG and MAG GLFS_850_to_ORDERS05
  2. ProfilesCompany profile Contoso (ZZ CONTOSOMC); trading partner Great Lakes (ZZ GLFLEETEDI), AS2 details
  3. Agreement templateTransactions: 850 inbound with MIG and MAG; 810 outbound from INVOIC02
  4. AgreementGreat Lakes agreement from the template, then Activate
  5. Generic flowsTPM V2 package configured and deployed once in the tenant
Contoso's order of work for Great Lakes in TPM. The EDI IDs are illustrative Contoso examples.
The Sign-Off Table · thesignofftable.com/academy/sap-pim-206

When a MAG changes, TPM's Cross Actions > Update MIGs/MAGs updates the MIG or MAG version in many agreements at once, optionally including the agreement templates. The SAP Process Integration export still matters during coexistence: when Great Lakes changes a rule while XP1 still runs its interface, the team can fix the guideline once and export the Process Integration format for XP1, so both platforms are built from the same documented rules.

Key points
  • Export gives a ZIP of XSDs and XSLTs for Cloud Integration or Process Integration; inject writes resources directly into a Cloud Integration flow.
  • Pre-processing, extended validation, mapping and post-processing artifacts each have a fixed place in the EDI flow.
  • The Runtime Context setting for the complete message XSD decides whether unexpected segments fail validation.
  • Use SAP's EDI templates for your own flows, or TPM agreements with the generic flows and the Partner Directory.

Check your understanding · not graded

Lesson check

  1. 1. Which generated artifact removes Integration Advisor's qualifier suffixes before an IDoc is sent?

  2. 2. In a TPM transaction, where do you choose the MAG for Great Lakes' 850?

  3. 3. A MIG's "Use complete Message XSD in EDI Flow Steps" is false. What happens to an unexpected segment?

  4. 4. What does activating a TPM agreement do?