---
article_id: KB0401234
article_type: Support Note
component_ids:
  - BNS-ARI-CI-BUY
component_descriptions:
  - SAP Integration Suite, managed gateway > Managed Gateway for Procurement
products:
  - SAP Ariba Procurement, cloud edition
personas:
  - Admin
  - Buyer
language: en
created: 2023-10-18
updated: 2024-03-18
source: Knowledge Base
url: https://support.ariba.com/item/view/KB0401234
connect_url: https://support.ariba.com/item/view/KB0401234?min=1
sap_for_me_url: https://me.sap.com/notes/KB0401234
---

# Error: "A sequence of more than one item is not allowed as the first argument of fn:substring"

## Symptom

While replicating PurchaseOrderExportRequest or other documents from Ariba Procurement (P2P), I can see the error below in the SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network:

A sequence of more than one item is not allowed as the first argument of fn:substring() ("abc@dummyhost.com", " abc@dummyhost.com ")

## Cause

You have mapped a field in SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network mapping tool to an item segment using a substring function and have not added a loop, so the mapping is not considering subsequent items.

## Resolution

You need to add a loop to the **item** segment to make sure that the mapping is applied for all the subsequent items:

1. Log in SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network.
2. Click My **Configuration** > **Mappings**.
3. Click in the pencil button for the document type that you are facing the issue.

Now you are in the mapping for this specific document type, do the following:

1. Click with the right button in the line of the mapping that you are performing to the **item** segment.
2. Click **Target Variable** > **Position** and click in the **item** segment from target structure(appears in the right side of the screen).
3. Repeat the step 1 but this time click **Add Source Condition**.
4. Click in the father segment of the field that you are mapping from the source structure(appears in the left side of the screen).
5. A pop-up will appear, click **Position Variable**.

## Keywords

CIG, Cloud Integration, Transaction Tracker
