cancel
Showing results for 
Search instead for 
Did you mean: 

doubt about idoc adapter

Former Member
0 Kudos

hai friends ,

iam doing idoc to mdm secinario in this

iam sendig idocs to R3 system.

my doubt is

in my idoc some segments are repetativly comming in the same segment .

for example

<seg>

<f1>abc</f1>

</seg>

<seg>

<f1>xyz</f1>

</seg>

<seg>

<f1>asdf</f1>

</seg>

<seg>

<f1>lkj</f1>

</seg>

like this

iam getting the segments

these segments are randamly chaenging

means some times it may have 1 segment next time it may have 5 or 6 and some time it may not have also

finally

it may have to convert into one segment and send to mdm system.

for example the above format should conver into like this

<seg>

<f1>abc,xyz,asdf,lkj</f1>

</seg>

like this i want to get the out put

how can i do this

in idoc structur i have segment like this

<seg>

<f1></f1>

</seg>and it occusrence is 9999.

pls help me is it posible to convert in to above format

pls help me it's orzent.

with regards

srikanth vipparla.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Srikanth,

Try this UDF…

Please make sure the following Cache and Argument Values:

Cache: Queue

Argument:

Argument: a

Result: result

Code:

String s = a[0];

for(int i=1;i<a.length;i++)

{

s= s + "," + a<i>;

}

result.addValue(s);

Please update me if any clarifications are required.

Thanks,

Boopathi

Former Member
0 Kudos

hai friend

you are correct but in this iam get only one value

but i need to get total values in one segment

pls go through the example iam given above .

if give in that way

it help full to me a lot.

pls help me

with regards

srikanth vipparla

Former Member
0 Kudos

Hi,

My code works absolutely as per your requirements.

In mapping time you need handle the context change.

Let me know if any clarifications are required.

Thanks,

Boopathi

Former Member
0 Kudos

hai friend

ok but iam getting this message in the out put file

<E1MAKTM SEGMENT="">

<MSGFN>srikanth,[Ljava.lang.String;@6430d9,[Ljava.lang.String;@6430d9,[Ljava.lang.String;@6430d9</MSGFN>

</E1MAKTM>

or else

if did this kind of mapping pls tell me how to the mapping

pls hel me

with regards

srikanth vipparla.

Edited by: srikanth vipparla on Apr 22, 2008 9:51 AM

Former Member
0 Kudos

Hello Srikanth,

Please make the following change to the code.



for(int i=1;i<a.length;i++)
{
s= s + "," + a<i>;
}

Thanks,

Kiran.

Edited by: kiran kumar on Apr 22, 2008 11:19 AM

Former Member
0 Kudos

I think the above code works fine with your requirements and try check the display queue and make the necessary context change if it’s required.

Thanks

Boopathi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

There must be some standard function to do this job,,,,,,,,

if you dont want to think so much,,,,,wht you can do is ... create a UDF....in UDF just get the Queue of entries in tag <f1> and arrange it as required and send to target node..

Best Regards,

Sushil Hadge.

Former Member
0 Kudos

ok but hoe can catch the segment values in to queue.

is it all segment values auto matillcaly come to queue?

pls confome it me pls.

with regards

srikanth vipparla

Former Member
0 Kudos

yes, if <f1> is the source node for that UDF ,,,

all the entries coming in that tag will come as a Queue,,,,, while creating UDF select apppropriate option....for catching inputs into a Queue,,,,

Best Regards,

Sushil Hadge.

Former Member
0 Kudos

tahnks

but up to now ididt write any queue udf functions plse help me out on this

if u have any documents pls send to me pls.

with regards

srikanth vipparala.

Former Member
Former Member
0 Kudos

thanks

iam going through udf.

i wil be in tuach with u .

if i got any doubts in that i will contact to u.

with regards

srikanth vipparla

Edited by: srikanth vipparla on Apr 22, 2008 10:55 AM

Former Member
0 Kudos

Hi Srikanth,

You can use Node functions for this.

Regards,

srikanth

Former Member
0 Kudos

hi,

does Format By... function works.....

correct me if am wrong

Former Member
0 Kudos

iam not finding the format by function in my mapping functions

and still i have one doubt on this

xi can recive multiple segments into mapping or not

because iam using one segment but it is having occurence is 9999.

in one idoc iam getting multiple segments that depends on data.

let it confoem me pls.

withregards

srikanth vipparla

Edited by: srikanth vipparla on Apr 21, 2008 8:30 AM