cancel
Showing results for 
Search instead for 
Did you mean: 

Concatenating texts from multiple IDoc segments

Former Member
0 Kudos

Hi everybody!

I have to concatenate log texts supplied via IDoc segments into one string. There can be zero or more segments, each with one line of the long text. The result should be one single string field filled with all the lines concatenated.

What's the easiest way to achieve this result? Do I need a user-defined function or can I code this using standard built-in funtions (this solution would be preferred)?

Regards,

Joerg

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Use the UDF with the following logic.

Take the input type as Queue of the Segments

Concatenate the temp = temp + a<i> in the loop

return the temp.

<b>UDF as follows:</b>

String temp = " ";
for(int i=0; i< a.lenght; i++)
{
 temp = temp + a<i> 
}
return temp;

Your probelm will solve with the above UDF.

Warm Regards,

Vijay

Former Member
0 Kudos

Hi,

Use of User Defined Functions is always preffered over UDF.

Use Standard Node Functions like Concat to append string.

It would be better if you could set contexts appropriately to segement level for all line elements.

Regards,

AKshay.

    • Dont forget to give points.