Skip to Content

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

Multiple values in context concat to one string

Hi,

I need a UDF that concats the values in each context to one string.

Ex.

SUPPRESS

123456

CONTEXTCHANGE

123

654

789

CONTEXTCHANGE

012

321

CONTEXTCHANGE

I want to have the output like this...

SUPPRESS

123456

CONTEXTCHANGE

123, 654, 789

CONTEXTCHANGE

012, 321

CONTEXTCHANGE

I hope you can help me out here.

Thank you!

Sten

Former Member
Former Member replied

Hi,

try this code it will work,

String[] store = new String[1];
for(int i=0;i<var1.length;i++)
{
store[0] = store[0]+var1<i>;
}
result.addValue(store[0]);

var1 is input field containing numbers(123, 654, 789

)

Regards,

Rohit

Reward points if helpful.

0 View this answer in context

Helpful Answer

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