SAP CPI groovy UDF to parse some data

Job ID: 33330898

Budget: $25 – $50 USD

I need someone to help me with a SAP CPI UDF to be used inside a message mapping.
The UDF will have 2 input values from the attached example xml:
- POSEX - value to search
- UEPOS - field to match
- NETWR - values to return

Logic should be POSEX value is passed in the UDF and the UDF should search in al E1EDP01 segments and where UEPOS = POSEX. the output should be NETWR field, if more that 1 match is found they should all be returned in a single context.
If no result, returned value should be 0.

For example based on attached XML:
Value 001000 is passed, UDF searches in all segments where UEPOS = 001000 and from those segments it should return NETWR value, in this case, match is found in segments 2,3 and 4, and values returned should be:
0.00
30.00
20.00
context change

We can have a quick call to better explain this at any time.

Thank you,