Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
ManaswiniPuli
Explorer
241

As I began working with SAP’s Integration Advisor, I realized how much it simplifies defining message structures and mappings. I discovered a step-by-step approach to creating message guidelines and mappings. In this blog, I will walk you through how to leverage MIGs and MAGs in SAP BTP Cockpit to efficiently build message structures and mappings that comply with standards.

What are MIGs and MAGs?

  • Message Implementation Guidelines (MIGs) define the structure and format of messages, helping to create custom, standard-compliant message templates.

  • Message Guidelines(MAGs) specify how different message formats map to each other, enabling seamless data transformation between systems.

Step-by-Step Guide: Creating MIG for Purchase Order

Step 1: Access Integration Suite

  1. Log in to SAP BTP Cockpit using your registered email and password.
  2. Go to your Subaccount and navigate to Subscriptions.
  3. Click on  Integration Suite.

Step 2: Navigate to MIGs

  1. In the Integration Suite launchpad, go to the left-hand menu.
  2. Under the Design section, click on MIGs (Message Implementation Guidelines).

ManaswiniPuli_0-1751524033508.png

Step 3: Create a New MIG for Purchase Order

1.Click on the “Create” button at the top right.

ManaswiniPuli_1-1751524033511.png2. In the Type System section, under the Standard field, select X12 (for ANSI X12 standard).

ManaswiniPuli_2-1751524033514.png3. On clicking X12 in the Standard field, a list of available message types will appear. In the search bar, type 850 and select:

                         Message Type: 850 – Purchase Order

ManaswiniPuli_3-1751524033517.png4. After selecting the message type, a list of available versions will appear.  

     Choose the appropriate version, typically 004010 for X12.

ManaswiniPuli_4-1751524033518.png5. Once the version is selected, the Envelope selection screen appears. From the available options, choose None.

     This means the message will not be wrapped in any predefined envelope structure.

ManaswiniPuli_5-1751524033520.png6. The next screen shows the Sample Payload, which you can skip by clicking Next /Continue without making any changes.

ManaswiniPuli_6-1751524033522.png7. In the final step, provide the following details:

                  Name: Enter a meaningful name, e.g., X12_850_PurchaseOrder_MIG

                   Direction: Choose the option that best fits your integration scenario:

                                       Inbound: When your system is receiving data.

                                        Outbound: When your system is sending data.

                                        Both: When your system will both send and receive data.

                      Here, we are selecting Inbound since the system is receiving data.

ManaswiniPuli_7-1751524033524.png

                Own Business Context: Select the appropriate business context that matches your integration scenario.

                                                                This helps categorize and manage your MIG efficiently.

                                                                 For example, select Business Process Role and choose Request Order.

ManaswiniPuli_8-1751524033526.png8. Click Create to complete the setup and open the MIG editor.

9. After clicking Create, the MIG editor opens.

Select the required nodes relevant to your integration scenario. Once the nodes are selected, click Save to store the MIG configuration.

ManaswiniPuli_9-1751524033531.png

10. Verify the Created MIG                 

 To verify that the MIG has been created, go to the MIGs tab under the Design section and confirm that it is listed.

ManaswiniPuli_10-1751524033534.png

Step-by-Step Guide: Creating MIG for Sales Order

Step 1: Create a New MIG for Sales Order

1. Click on the “Create” button at the top right.

ManaswiniPuli_11-1751524033536.png2. In the Type System section, under the Standard field, select SAP S/4HANA Cloud SOAP.

ManaswiniPuli_12-1751524033543.png3. On clicking SAP S/4HANA Cloud SOAP in the Standard field, a list of available message types will appear. Search and select SalesOrderBulkRequest-SalesOrderBulkRequest.

ManaswiniPuli_13-1751524033549.png4. After selecting the message type, a list of available versions will appear. Choose the appropriate version — typically 1905 for SalesOrderBulkRequest – SalesOrderBulkRequest.

ManaswiniPuli_14-1751524033550.png5. The next screen shows the Sample Payload, which you can skip by clicking Next Continue without making any changes.

ManaswiniPuli_15-1751524033552.png6. In the final step, provide the following details:

                   Name: Enter a meaningful name, e.g., SOAP_SalesOrder_MIG

                   Direction: Choose the option that best fits your integration scenario:

                                       Inbound: When your system is receiving data.

                                       Outbound: When your system is sending data.

                                       Both: When your system will both send and receive data.

                     Here, we are selecting Inbound since the system is receiving data.

ManaswiniPuli_16-1751524033554.png                   Own Business Context: Select the appropriate business context that matches your integration scenario.

                                                                   This helps categorize and manage your MIG efficiently.

                                                                    For example, select Business Process Role and choose Request Order.

ManaswiniPuli_17-1751524033556.png7. Click Create to complete the setup and open the MIG editor.

8. After clicking Create, the MIG editor opens. Select the required nodes relevant to your integration scenario. Once the nodes are selected, click Save to store the MIG configuration.

ManaswiniPuli_18-1751524033560.png9. Verify the Created MIG       

To verify that the MIG has been created, go to the MIGs tab under the Design section and confirm that it is listed.

ManaswiniPuli_19-1751524033564.png

Creating MAG (Message Mapping Guideline) in SAP Integration Suite

Step 1: Navigate to the MAGs Section

  • In the SAP Integration Suite, go to the Design section.
  • Click on the MAGs tab.

Step 2: Click on Create

 Click the Create button to begin a new Message Mapping Guideline and select Standard MAG as the type.

ManaswiniPuli_20-1751524033566.png

Step 3: Select the Source MIG
In the Source section, select the appropriate Source MIG (e.g., X12_850_PurchaseOrder_MIG)

ManaswiniPuli_21-1751524033569.pngStep 4: Select the Target MIG
In the Target section, select the appropriate Target MIG (e.g., SOAP_SalesOrder_MIG)

ManaswiniPuli_22-1751524033571.pngStep 5: Click on Create
After selecting the source and target MIGs, click Create to generate the MAG and open the mapping editor.

ManaswiniPuli_23-1751524033574.png

Step 6: Perform Field Mapping
Once the MAG editor opens, map the relevant fields from the source structure to the corresponding fields in the target structure by dragging and dropping between them.
Apply any necessary transformations, constants as per your integration requirements.

ManaswiniPuli_24-1751524033579.png

Step 7: Save the MAG
After completing the field mappings, click Save to store your MAG configuration.

Step 8: Export the MAG
Click Export and select SAP Cloud Integration Runtime Artifacts to generate the artifact for use in Integration Flow.

ManaswiniPuli_25-1751524033584.png

Step 9: Extract the Exported Files
Download and extract the ZIP file. It contains the Mapping, Source MIG, and Target MIG folders.

Inside the Source and Target MIG folders, you will find the required files for integration.

ManaswiniPuli_0-1751526200403.png

With MIGs and MAGs in place, you’re prepared to leverage them in integration scenarios for efficient data processing. Stay tuned for more insights to help you build effective integrations!

Disclaimer:
All the views and opinions in this blog are my own and are made in my personal capacity. SAP shall not be responsible or liable for any of the contents published in this blog.