Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BPM: XPath-Condition in Switch Step


I have the following requirement in BPM.

There is a switch step with five branches, and I have the following document structure:



<Docnum> 12345 </Docnum>



<Docnum> 12346 </Docnum>



The switch condition is done based on the last digit of the first Docnum element. So in this case the value would be 5.

I tried to work with a substring as the total number of digits of docnum is always 5.

How would an XPath expression look like to retrieve the substring from the first <Segment> element? I tried different combinations but none of them really worked.

Example what I tried: p1:/root/Segment[1]/substring(docnum, 4,1)

Any advise on this?

Thank you very much

Not what you were looking for? View more on this topic or Ask a question