Introduction

SAP in Nov 2023 with Cloud Integration 6.45.22 had introduced new features for Custom Search Attributes for B2B Monitoring and Trading Partner Management. This feature of Custom Attributes allows you to defined upto 10 Custom Search Attributes for your B2B Messages per tenant. Analogous to this is your Custom Headers in Cloud Integration.

Custom Search Attributes allows you to define and search messages using Custom Attributes. Lets look at a Use Case.

Your customers send you a EDIFACT ORDERS D96B message. Standard EDI Search Headers are Sender Message Number, Sender Interchange Number and so on. You process this message over and send this to ERP. In other words, we are looking at a Incoming EDI over SFTP mapped over IDoc ( EDI to IDoc Flow ) described in this post of mine – Trading Partner Management – Part 2 – EDI to IDoc Flows(s) . Everything works perfectly. Now what if you get a request from your Business to locate the Original EDI Message from your Customer with just a Order Number? You would need to locate the IDoc from ERP, track that back with a date time stamp to Integration Suite and then locate the Corresponding B2B Message. You cannot search with the Order Number in Trading Partner Management. Well atleast you could not , till enter Custom Search Attributes feature from SAP.

As you can see there exists in the B2B world as well definite need to peak at the Input B2B Message and save additional searchable Identifiers. Custom Attributes are the answer.

Identify a B2B Field to Define as a Custom Search Attribute

As per our introduction, we will define a EDIFACT Custom Attribute in Trading Partner Management. Typically in a EDIFACT message, the Document Identification Number ( aka Order Number for EDIFACT Orders, Delivery Number for a EDIFACT DESADV and so on ) are a part of BGM segment. We will use the Document Identification Number of BGM Segment 1004 as our Custom Attribute. In Summary we will define a Custom Attribute for the EDIFACT Message with the below XPATH //*[local-name()=’S_BGM’]/C_C106/D_1004

Refer to the EDIFACT definition of this from UN/EDIFACT- BGM : BEGINNING OF MESSAGE.

BGM Document Identifier as a EDI Custom Attribute in SAP Trading Partner Management
Use Document Identification Number  as a Custom Search Attribute

Define Custom Search Attribute in TPM Configuration Manager

Create a Custom Attribute in Configuration Manager in Trading Partner Management. For our use case I have defined this with the below details

  • Name: EDIFACT_DocumentIdentifier
  • Description: EDIFACT_DocumentIdentifier /S_BGM/C_C106/D_1004
Create a Custom Attribute in Configuration Manager in Trading Partner Management.

Extend TPM Agreement for your Trading Partner to use the Custom Search Attribute

We will now extend our TPM Agreement we defined in our previous blogs to use this Custom Search Attribute. Custom Search Attributes are assigned at a Trading Partner Agreement Level.

Navigate to the Agreement for your EDIFACT Message for the Trading Partner you want to use and go to B2B Scenarios and Tab – Custom Search Attributes and Add. Provide the details for your Custom Search Attribute and save!

  1. Name: EDIFACT_DocumentIdentifier
  2. Source Type: XPATH
  3. Source Value: //*[local-name()=’S_BGM’]/C_C106/D_1004
  4. Data Source : Sender Interchange
Navigate to the Agreement for your EDIFACT Message for the Trading Partner you want to use and go to B2B Scenarios to add Custom Search Attributes
Add Custom Search Attributes
Add a Custom Search Attribute Name: EDIFACT_DocumentIdentifier

Source Type: XPATH

Source Value: //*[local-name()='S_BGM']/C_C106/D_1004

Data Source : Sender Interchange

Update your Trading Partner Agreement

Update your Trading Partner Agreement
Confirm Update of TPM

Test Your Custom Search Attribute

Thats it. Thats all the configuration is. You can use Custom Search Attributes now in the runtime. When you push your EDI Message, the data will be captured from your Custom Search Attribute configuration and saved and made available in your Monitoring.

In my case I push a EDI file as per our earlier screenshot and you can see the custom search attribute now in the B2B Monitoring.

You can see the custom search attribute now in the B2B Monitoring

Add Custom Search Attribute on Another Agreement

Similar to what we have done, we can use the same Custom Search Attribute on another Trading Partner Agreement. In this case we will use the TPM Agreement for a Outbound IDoc to EDI Flow as described in Trading Partner Management – Part 1 – IDoc to EDI Flow(s). We will add the Custom Search Attribute to this Agreement.

In this case we will add the Custom Search Attribute to the Receiver Interchange and provide the “updated” and “different” XPATH matching my EDI XML.

  • Name: EDIFACT_DocumentIdentifier
  • Source Type: Xpath
  • Source Value: //*[local-name()=’S_BGM’]/D_1004
  • Data Source: Receiver Interchange
Add Custom Search Attribute on Another Agreement with Data Source as Receiver Interchange
Custom Search Attribute Matching your EDI Message

Use Custom Search Attributes in B2B Monitoring

Once you have defined Custom Search Attributes in the Configuration Manager, these Attributes are also made available in your B2B Monitoring. You need to navigate to Monitoring B2B ScenariosAdapt Filters and select your Custom Search Attribute.

navigate to Monitoring - B2B Scenarios - Adapt Filters and select your Custom Attribute.
Select your Custom Search Attribute in Adapt Filter and click Ok

Final Thoughts

Custom Search Attributes is a very essential feature that is now made available out of the box from SAP. You can use this feature to add upto 10 Custom Fields as additional searchable identifiers for your B2B Messages.

Unfortunately, you cannot use Wildcard Searches for Custom B2B Attributes and your EDI Identifiers and for that, the Sprintegrate CI Add On for Chrome and Edge is the answer!

Additional Blogs from this Series

Further Reading