Agreement is the heart of Trading Partner Management - it is here where all configuration components meet.
When creating Agreement, we have to create Agreement Template first. This is a generic Agreement, which can be reused and modified for as many Agreements as needed.
As we have many trading partners, we can create Agreement Template with My Company only and individual Agreements will be partner-specific. As we specify Type System here, we create one Template for IDoc communication and one for X12 communication, depending on what message method we are using.
Now we create the Agreement based on our Agreement Template. We usually select Copy from Template to have Agreements independent, even though binding the template may be useful in case our trading partners share similar configuration.
This is an example of an Agreement between My Company and our ACME trading partner. Don't worry too much about the Type System Version, as it can be always edited later, based on real message content.
The detailed message exchange configuration is specified in B2B Scenarios, where we define inbound / outbound flows. Let's demonstrate it on inbound (partner is sending an IDoc to us).
We populate individual boxes in alignment with our TPM configuration. It is here, where all the components meet! Here we connect SCI Sender / Receiver adapters with TPM message configuration and apply Mapping, which we built in Integration Advisor. In the inbound scenario we have to read the above diagram from right to left.
Once we save it and activate, the configuration is moved to TPM Partner Directory, which we can imagine as a database with all the data necessary for successful message exchange.
Only now, we can try to send a message, as we have the whole chain configured. Let's do it.
Just one thing before that - in order for this to work, we have to have this SAP-built package installed and configured. You can get it on SAP Business Accelerator Hub. This is more of a SAP Cloud Integration topic, so I will skip it here. If there is a demand, I can write another article about it.
I will simulate a partner's call by Mendelson AS2 client with a sample IDoc message. The IDoc header is what matters to TPM, so let's just focus on that.
Now we run the transfer and the message was sent to TPM.
We can see the message in TPM proprietary B2B Monitor.
The result is an error, which is nothing unusual in the beginning and its resolution will help us further understand the TPM logic.
Let's click it and see the Details of the error.
The 'Partner Directory lookup failed' error can be really frustrating, if we don't know what to look for.
What the error is saying is that the IDoc message doesn't correspond to the configuration, which we saved into Partner Directory.
TPM takes several so called Lookup Keys and if they don't match, it throws this error. Now we have to compare the above Lookup Keys from the message with Lookup Keys from Partner Directory.
In TPM B2B Scenarios menu, we go on Partner Directory Data tab and look for the record, which represents our Agreement. Here we can see the Lookup Keys combination, which we need to match.
Now we have Lookup Keys string from the message exchange and Lookup Keys string from Partner Directory. Now we have to compare them. Doing so, be careful even about the dashes, upper case, numbers, everything. Those strings need to match 100%.
We see 5 Keys:
This is our new IDoc header
The IDoc now passes TPM, as the Lookup Keys match and TPM was able to identify the Sender, Receiver, the exchange type, message format and the mapping.
As we can see, we can resolve the mismatch either by changing the message content, or the configuration. Changing the configuration is usually a better option, as we may not be able to control what the partner is sending.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |