cancel
Showing results for 
Search instead for 
Did you mean: 

Concate mutiple input in to Single String.

Former Member
0 Kudos

Hi ,

I need one help .

I want to contcat the one of the IDOC fields occurance in a single string. Please let me know how to user.

For Ex. I am mapping one field of Idoc ex TDLINE --> Extrinsic (0.. Unbounded)in the output side.

In the Input side the TDLINE fields appears multiple time. in the current mapping I have one to one mapping between TDLINE and Extrinsic fields. So it creates the same number of Extrinsic fields as I have TDLINE fields at input side.

What I want to do , I want to create a single Extrinisc fields at output side for all the TDLINE fields.

For Ex. At particaular segment I have 10 fields for TDLine then all should come as Single string at out put side.

Note . No of Occurance of TD line is 0.. unbounded).

Please give ur suggestions for the same.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

thanks !!

Former Member
0 Kudos

Hi Ram,

TDLINE(context to Idoc) -->UDF -->Extrinsic

You can write this UDF in context label. and withing this UDF you can contact all TDLINE for one Idoc.

If you have any problem to write this UDF then let me know.

Thanks

Shubhankar

Former Member
0 Kudos

Hi Ram,

i got same problem recently. For this problem there is no standard functions in XI so you must create udf. I wrote that udf and sending with these:

http://allyoucanupload.webshots.com/v/2003800853095440083

http://allyoucanupload.webshots.com/v/2003854577844519372

http://allyoucanupload.webshots.com/v/2003865357113273227

http://allyoucanupload.webshots.com/v/2003828767547920796

Regards,

Sai

former_member267355
Active Participant
0 Kudos

Hi,

Try using standard function

Text -> concat

or create an user define function.

Regards,

Sakthi

Former Member
0 Kudos

Thanks , can you please give us what Udf , I need to write for the same. I am not able to understand how to write this logic. ur efforts will be appreciable. thanks

Former Member
0 Kudos

your required string = input string1 + string 2 + string 3.....

you can implement in Java ...using User defined option , best to go is graphical mapping where you have CONCAT function add other imput by dragging then in graphical area

kindly rewards point

Regards,

Pranshu

Former Member
0 Kudos

TDLINE--> removeContext->UDF---> target ..either use remove context or change the context of source to uppermost element...

here is the code

UDF: [ Queue]

StringBuffer sb= new StringBuffer();

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

{

sb.append(input[j]);

sb.append(" ");

}

result.addValue(sb.toString());

Former Member
0 Kudos

UDF can serve your purpose

Write a UDF that will collect all the values of TDLINE .. concatenate these values into single value ... you will need to apply a loop for that...

You can write one single UDF and can use it for all elements...