Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
_Nils_Lorenz_
Advisor
Advisor
0 Kudos
585

SAP Integration Suite Cloud Integration Utilities - Is a community package for Integration Suite provided by SAP consultants.

_Nils__0-1722859949593.png

 

This package contains selected flows and scripts that can be leveraged in daily business operations.

_Nils__0-1722604765209.png

In this blog post we focus on the flow: Upload Value Mapping Entries based on JSON or XML Input

Background:

  • Checking the Integration Content for Integration Suite in SAP Business Accelerator Hub there is also a Value Mapping API available with all the different facets of operation for creation, update, and deletion.
  • A major point - the creation of a new Value Mapping - always requires an upload of the content as Base64 Zip-File
  • Even for update or deletion mutiple apis calls are required
  • This leads to the question: Is there a more convenient way of usage?

_Nils__0-1722848390401.png

Solution: 

The flow in the utilities package allows:

  • Upload of a new VM based on a JSON or XML payload
  • Update existing VM based on a JSON or XML payload (see insights)
  • Deletion and undeployment an existing VM based on a JSON or XML payload

Insights:

  • First time creation: the flow creates in memory a ZIP-File and does a converting to base64 string based on the incoming payload - (Hint: you can use the script also for your own purpose - adjust it :))
  • Flow control by HTTP-Method (Post, Put, Delete) or via action in payload: (create, update, delete)
  • Important:
    • During creation all combinations of Source Agency/Identifier and Target Agency/Identifier etc. will be created
    • During update of VM only available value sets of Source Agency/Identifier and Target Agency/Identifier will be updated with new combinations of source and target values, a manual creation for this additional Source Agency/Identifier and Target Agency/Identifier is required – all values can be uploaded via API

Payload:

 

{
    "name": "VMTEST",
    "packageid": "PackageID",
    "description": "Upload via API",
    "action": "create",
    "_comment": "action: create also as HTTP-POST-Method, update also as HTTP-PUT-Method, delete also as HTTP-DELETE-Method",
    "items": [
        {
            "sourceagency": "Source Agency",
            "sourceidentifier": "Source Identifier",
            "targetagency": "Target Agency",
            "targetidentifier": "Target Identifier",
            "items": [
                {
                    "source": "source value new 1",
                    "target": "target value new 2"
                },
                {
                    "source": "source value3",
                    "target": "target value4"
                }
            ]
        },
        {
            "sourceagency": "Source Agency1",
            "sourceidentifier": "Source Identifier1",
            "targetagency": "Target Agency1",
            "targetidentifier": "Target Identifier1",
            "items": [
                {
                    "source": "source value5",
                    "target": "target value6"
                },
                {
                    "source": "source value7",
                    "target": "target value8"
                }
            ]
        }
    ]
}

 

Results:

during creation:

  • VM created: "VMTEST" as Version "1.0.0"

_Nils__0-1723705131163.png

  • according to payload, values created in VM

_Nils__1-1723705241300.png

during update:

  • Version incremented: "1.0.0" to "1.0.1"

_Nils__1-1723706090782.png

  • according to payload, 4 pairs added 

_Nils__0-1723706008817.png