Skip to Content
avatar image
Former Member

Multiple concat

Hi ,

I have the requirement to concat all the input fields (over 50) into one output field.

How can I do that whitout the graphical tool?

I don't like a UDF whith 50 parameters ;-)

I use SAP PO 7.5 in a single stack environment.

Regards

Edgar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 13, 2016 at 02:04 AM

    Hi Edgar!

    If you want to concatenate values of all subnodes within given node you could use UDF like this:

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 12, 2016 at 02:55 PM

    Hi Edgar

    if you wish to go for Graphical mapping here is a simple UDF which will concatenate n values in a context.

    public void nConcatenate(String[] input, ResultList result, Container container){

    String stringConcatenated = "";

    for (int i =0;i<input.length;i++)

    {

    stringConcatenated += input[i];

    }

      result.addValue(stringConcatenated);

    }


    Hope this helps you 😊

    Regards

    Anitha

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Anitha!

      Your UDF is helpful but, if I understand it right, it concatenates values of the same element for all its occurances, but this will not work for concatenating all subelements values of any element.

      Regards, Evgeniy.

  • Sep 12, 2016 at 02:37 PM

    Hi Edagar,

    Have you though to use XSLT mapping?, depending the name of your nodes this example could be useful for you Concatenate values of multiple xml elements into single element using xslt - Stack Overflow

    Regards.

    Add comment
    10|10000 characters needed characters exceeded