---
article_id: KB0402950
article_type: FAQ
component_ids:
  - BNS-ARI-CI-PRT-MAP
component_descriptions:
  - SAP Integration Suite, managed gateway > Managed Gateway - Portal > Managed Gateway - Buy Side Mapping tool
products:
  - SAP Integration Suite, managed gateway for spend management and SAP Business Network
personas:
  - Buyer
language: en
created: 2026-05-07
updated: 2026-05-07
source: Knowledge Base
url: https://support.ariba.com/item/view/KB0402950
connect_url: https://support.ariba.com/item/view/KB0402950?min=1
sap_for_me_url: https://me.sap.com/notes/KB0402950
---

# How to use the Target Value Variable functionality in Managed Gateway for Spend&Network?

## Symptom

How to use the **Target Value Variable** functionality in Managed Gateway for Spend&Network?

## Resolution

You can follow the steps below to add a **Target Value Variable** looping:

1. Right-click on the mapping line.
2. Click **Target Variable** > **Add Value Variable.**
3. Click on the target sequential field that contains the value that matches the sourcing one, e.g., **@lineNumber**.
4. Repeat step 1 > click **Add Source Condition** > Select the source sequential field you'd like to match.
5. Click **Value Variable** > select the variable you had chosen in step 3 > **OK**.
6. **Save Mapping.**

## See Also

For more information about this functionality, please refer to SAP Help Portal > SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network > SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network Configuration Guide > Managing Custom Mappings > Editing Custom Mappings > *[Adding Target Value Variable | SAP Help Portal](https://help.sap.com/docs/sisgw/sap-ariba-cloud-integration-gateway-configuration-guide/how-to-add-target-value-variable)*

There is another way to perform the loop in Managed Gateway for Spend&Network Mapping Tool with the item position. You can find the steps to perform it in the KBA [How to use the Target Position Variable functionality in Managed Gateway for Spend&Network?](https://me.sap.com/notes/0003180750)

When using the loop functionality in Managed Gateway for Spend&Network Mapping Tool, it is a good practice to always set it after all source and target conditions. It is more certain to work if this is followed, since the Managed Gateway for the Spend&Network Mapping Tool performs the mappings in the order they are maintained. So if the loop has a condition that must be met, it won't run if that condition is set after it.

## Keywords

Cig, mapping tool, looping, value, target value, variable, ismg, repeat
