SAP Integration Suite Cloud Integration Utilities - Is a community package for Integration Suite provided by SAP consultants.
This package contains selected flows and scripts that can be leveraged in daily business operations.
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?
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"
- according to payload, values created in VM
during update:
- Version incremented: "1.0.0" to "1.0.1"
- according to payload, 4 pairs added
SAP Integration Suite
SAP Integration Suite
SAP Integration Suite