FAQ KB0406794
Email
How to use the For-Each function on the Managed Gateway for Spend&Network Mapping Tool?
Symptom

How to use the For-Each function on the Managed Gateway for Spend&Network Mapping Tool?


Resolution

The For-Each function works as a loop in the mapping. Follow the steps below to perform the mapping:

  1. Click in the repeatable segment on the target structure with the right button.
  2. Select For-Each.
  3. Select the repeatable segment on the source structure.
  4. Save the mapping.

It is also possible to perform an Inner Loop on the For-Each by adding a Target Position Variable into it. For this, please follow the steps below:

  1. Right-click on the For-Each line.
  2. Click Target Variable > Add Position Variable.
  3. Click the parent field of the target field.
  4. Repeat step 1 and click Add Source Condition.
  5. Place the condition on the respective parent field on the source structure.
  6. Click Position Variable > OK.

A source condition can also be set to trigger the For-Each. For this, please follow the steps below:

  1. Right-click on For-Each line.
  2. Click on Add Condition to For-Each.
  3. Select the segment desired on the Source structure.
  4. Set the condition based on the business need.
  5. Click OK.

Please note that the For-Each function's purpose is to create new repeatable structures, and not to update the existing values of a looped structure. This means that the For-Each will be recommended only for non-standardly repeated segments (e.g., PO_EXTENSIONIN/item for PurchaseOrderExportRequest). If the structure needed is already repeated by the standard mapping (e.g., PO_ITEMS/item for PurchaseOrderExportRequest), then the Position/Variable loop should be used instead.


See Also

For more information about how to perform the Target Variables loop, please refer to the following resources:

3180750 - How to use the position looping functionality in SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network Mapping Tool?

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 Variables | SAP Help Portal



Applies To

SAP Integration Suite Managed Gateway > Managed Gateway Foundation & Tools > Managed Gateway for Managed Gateway Portal

Terms of Use  |  Copyright  |  Security Disclosure  |  Privacy