cancel
Showing results for 
Search instead for 
Did you mean: 

UDF to pick only numeric part in input value in SAP PI

ramu_g4
Participant
0 Kudos
748

Hi Experts,

Mapping requirement is to pick the numeric part from input & populate it in the target field.

Say if in input we get value like 'Box 23' then output value should be '23'.

Eg:

Box 23 [Input] - 23 [Output]

Postfach 1261 [Input] - 1261 [Output]

Thanks,

Ramu.

View Entire Topic
xinjiang_li
Active Participant
0 Kudos

Hi Ramu,

You can use regex and delete non-digits.

str = str.replaceAll("\\D+","");
ramu_g4
Participant
0 Kudos

Hi Xinjiang,Alexander,

Thank you for your reply.

My input queue and output queue of UDF should look like below:

Input queue:

Output queue:

Can you help with UDF.

Thanks,

Ramu.