Skip to Content

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

java udf

Hello sdners

I need help with a java udf

context udf : array of texts will be passed to udf

text1 : This is a purchase order number 111111....# and date is 10/02

text2: purchase order number 222..# and date is 10/03

text n...

In all these texts being passed to the udf,we need to extract the string : purchase order 11111...

so basically the substring needs to be extracted "purchase order 11111... " . Anything between purchase order... and #: the substring needs to be extracted.

The substring extracted is dynamic in length : purchase order ..... : can be of any length.

regards

replied

Hi Denny

This is a purchase order number 11111 #

in this "purchase order" is 11 but for your requirement to get only 1111 out of the above string you need to keep "purchase order number" into the code i provided above instead of "purchase order"

Secondly for your requirement of the above string you can incorporate

 int start = input.toLowerCase().indexOf("purchase order"); 

Thanks

Gaurav

0 View this answer in context

Helpful Answer

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