Simplify EDI with SAP S/4HANA Cloud with SAP Trading Partner Management and Cloud Integration
In this blog post I will demonstrate the feature provided by SAP TPM which can be provisioned in SAP CI. SAP TPM targets mainly EDI related integration and brings greater control and faster delivery by smartly orchestrating 3 technologies of integration suite.
- SAP cloud integration.
- SAP Integration advisor.
- Partner directory – plays a major role, though is a part of SAP CI.
I will demonstrate an end-to-end EDI integration between external buyer system and SAP S/4HANA cloud using SAP TPM.
To create sales order in SAP S/4HANA cloud corresponding to EDI 850. I will read the EDI 850 file dropped in the SFTP server, convert it into Sales Order/Customer Return – Create, Update, Cancel (B2B) format and push into SAP S/4HANA using the communication arrangement created for the communication scenario – SAP_COM_0223.
Following things needs to be setup:
- Communication system and communication user for SAP CPI to interact with SAP S/4HANA cloud API.
- Customer info records – mapping between the customer material and the SAP internal material is completed.
- Number range – .I will show where this number range is used when we start designing the B2B scenario. ICN_DEFAULT.
High Level Process Flow
You can ask this question as to why the wrapper IFLOW was needed in the first place. This is because TPM as of now only supports the following adapters.
|Sender Adapter||Receiver Adapter|
Since our requirement is to capture the EDI document from SFTP server, we need this wrapper IFLOW. Since we need raw EDI format as our source, we need to use AS2 adapter in the reciever side of the wrapper IFLOW.
Understanding the concepts
Company – this is the central entity which will be exchanging the EDI document with all the external buyer or seller parties.
Trading partner – this is the external party which will either send or receive EDI document from the company.
Identifiers – every trading partner and the company has a distinct set of identifiers that help in resolving the configurations that will be loaded during the runtime of the interfaces.
System – company and trading partner may have different systems which are exchanging messages. 1 TP/company : N systems.
Type system – this represents the data type that is being exchanged with the system. 1 system : N type.
Communication – this represents how the data is exchanged with the system. 1 system : N communication.
Agreement template – this design corrrespond to the company interfacing side.
Agreements – this design corresponds to the end to end scenario involving the company and the trading partner. The template created above can be reused to connect to several trading partners. 1 Agreement templae : N Agreements.
The AS2 is configured to transmit encrypted and signed data. I will show where do we maintain the configuraiton to decrypt and verify data in the next steps.
The identifier set here must be part of the ISA segment that the trading partner is sending. Now create the type system as SAP S/4HANA Cloud SOAP (1905) and the communication arrangement.
Trading partner configuration
Similarly, create the identifiers for trading partner. Now a question must be coming to your mind – how does TPM knows which agreement to load for a given trading partner. Also 1 trading partner could be exchanging several EDI doctypes, so how does this resolution happen?
Trading partner resolution occurs using /AuthorizedUsers partner directory entity. This is evident when creating the system for the trading partner. The SapAuthenticatedUser linked to the TPM configuration is maintained.
Agreement Template Configuration
Here we only configure the company side details. Once we have done this, the same configuration can be reused for several trading partners.
The interchange step requires the target MIG from IA. Here we also need to set the number range created in the pre-requisite section. The purpose of this number range is to increment and is set in the payload to SAP S/4HANA cloud.
I have explained above how the trading partner resolution happens, but how TPM knows that which confuguration to load for this EDI transaction for that trading partner.
Using the details available in the ISA segment and using them to identify that which agreement configuration to load for which trading partner.
Mark, there is a second pair of identification, these are set in the payload sent to SAP S/4HANA cloud.
Include the source MIG and the MAG from IA. We are now ready with the configuration, Activate configuration.
Finally, lets see the payload sent to S4:
There is a dedicated dashboard to monitor the EDI transactions. There is excellent provision to filter by the trading partner name with lots of other details in the details section of the logs.
I think I was able to explain the various features and the configuraiton of SAP TPM in order to realize an end to end EDI scenario.
Thanks for reading this blog.