C_CPI Integration Suite Development Practice Question
An integration developer is configuring a Message Mapping in SAP Cloud Integration. The source XML contains a repeating node `Items/Item` with child elements `Name` and `Quantity`. The target structure requires a single `TotalQuantity` element that sums all `Quantity` values across the repeating items. Which mapping function should be used to produce the `TotalQuantity` value?
⚠ Common exam trap
The trap here is assuming that any function applied to a repeating node automatically aggregates values, when only context-aware arithmetic functions like `sum` actually reduce a queue to a single number.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use the `sum` function from the Arithmetic functions category, applied directly to the `Item/Quantity` node with the context set to `Items`.
The `sum` function from the Arithmetic category is designed to aggregate a queue of numeric nodes into one total. Pointing its context at the repeating `Items` node provides the entire set of `Quantity` values, and the function returns a single numeric result mapped to `TotalQuantity`. Text or formatting functions cannot perform arithmetic aggregation, and post-mapping steps cannot replace the mapping's responsibility to build the target value.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use the `sum` function from the Arithmetic functions category, applied directly to the `Item/Quantity` node with the context set to `Items`.
Why this is correct
The `sum` function is purpose-built for aggregating numeric values across a queue of nodes. Setting the context to `Items` ensures the function receives the entire repeating queue of `Quantity` values and returns a single summed result, which is exactly what the target `TotalQuantity` element requires. This is the standard approach for arithmetic aggregation in graphical message mappings.
- ✗
Use the `concat` function from the Text functions category, applied to the `Item/Quantity` node, then wrap the result in `trim`.
Why it's wrong here
`concat` joins values as text strings. Applying it to numeric quantities would produce a concatenated string such as "51020" rather than the arithmetic total "35". Wrapping with `trim` only removes whitespace and does not convert the string into a numeric sum. This option fails because the target element expects a numeric aggregate, not a text concatenation.
- ✗
Use the `formatNumber` function from the Formatting functions category on the `Item/Quantity` node with the context set to `Items`.
Why it's wrong here
`formatNumber` converts a numeric value into a locale-specific formatted string representation, but it does not aggregate multiple values. When given a queue of values, it formats each individually rather than summing them. It cannot produce a single total across repeating nodes, so it cannot satisfy the requirement for a single `TotalQuantity` element containing the sum.
- ✗
Use a Content Modifier step after the mapping to read the mapped `Quantity` element and accumulate the values with an XPath expression.
Why it's wrong here
A Content Modifier works on message headers, properties, and the body but does not natively accumulate values across repeating nodes with an XPath sum in the graphical mapping context. The mapping itself must produce the aggregated target structure. Adding a Content Modifier after mapping does not resolve the missing aggregation during the mapping step and introduces unnecessary complexity.
About these practice questions
One of 218 original C_CPI practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official SAP exam blueprint
This C_CPI practice question is part of Courseiva's free SAP certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C_CPI exam.