cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver file content conversion

Former Member
0 Kudos

Hi All,

I have a simple problem and I can't seem to find a way around it . My xml file is like this

<?xml version="1.0" encoding="UTF-8" ?> 
- <EDIFACT>
- <UNB>
- <UNB01>
  <UNB0101>UNOC</UNB0101> 
  <UNB0102>2</UNB0102> 
  </UNB01>
  <UNB05>846</UNB05> 
  </UNB>
  </EDIFACT>

The output file i need is

UNOC:2+846'

The content converison parameters i am using are

Recordset Structure: UNB,UNB01

UNB.fieldSeparator : +

UNB.endSeparator: '

UNB01.fieldSeparator: :

UNB01.endSeparator: +

When i use these parameters the result i am getting is

UNOC:2846

But i need

UNOC:2+846'

How can i achieve this . It seems so simple but i can't make XI to work, Is it a flaw in XI ?

Helpful replies will be rewarded with points.

Thanks in advance

Sudheer

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you

Former Member
0 Kudos

Hi.....this is ur xml right...

<?xml version="1.0" encoding="UTF-8" ?>

- <EDIFACT>

- <UNB>

-<UNB01>

<UNB0101>UNOC</UNB0101>

<UNB0102>2</UNB0102>

-</UNB01>

-<UNB05>846</UNB05>

-</UNB>

</EDIFACT>

according to my understanding...UNB has 2 fileds UNB01,UNB05

UNB.fieldSeparator : +

UNB.endSeparator: ' => UNB01+UNB05'

UNB01.fieldSeparator: :

UNB01.endSeparator: + => UNB0101:UNB0102+

if u club them u shud get UNOC:2++846'

how is it that u are getting UNOC:2846

Try giving : Recordset Structure : UNB,UNB01,UNB05

UNB05.endSeperator: '

and remove UNB.endSeparator (i guess its not mandatory...)

If u dont mention UNB05 in record set sructure it will take it as a field of UNB01 and ends it with + as per UNB01.endSeparator: +

Either give UNB.endSeparator: ' or UNB05.endSeperator: '

Just tell me wat the output is now.....

Regards,

Deepika K.

Former Member
0 Kudos

Hi Deepika

Logically when I give the parameters as mentioned earlier it should give UNOC:2846' NOT UNOC:2+846'

But the trouble is it is not working as it should . as soon as the processing enters UNB01 structure , it is ignoring all the previous parametes, Strangely it is giving + in the end instead of ' . Eventhough UNB.endSeparator is ' , this parameter is being ignored and UNB01.endSeparator = + is being applied there .

According to your suggestion if i give UNB05 as recordsettructure then I should give a fieldSeparator for it , which I don't have becos its juat a value not a structure.

Any Comments ?

GabrielSagaya
Active Contributor
0 Kudos

Recordset Structure: UNB,UNB01

UNB.fieldNames=UNB01

UNB.fieldSeparator : +

UNB.endSeparator: '

UNB01.fieldNames=UNB0101,UNB0102

UNB01.fieldSeparator: :

UNB01.endSeparator: +

please check these

Former Member
0 Kudos

Hi Gabriel

I tried with your parameters , but it still has the same problem , I can't get an end seperator after the line.

But thnaks anyway . Any other ideas anybody ?

Former Member
0 Kudos

Hi,

Try this,

Recordset Structure: UNB,UNB01

UNB.endSeparator: '

UNB01.fieldSeparator: :

UNB01.endSeparator: +

Former Member
0 Kudos

Hi

UNB.fieldSeparator is mandatory , without that the adapter can't process the message.

Former Member
0 Kudos

Hi Sudhir,

Replace UNB.fieldseparator with UNB.Filedfixedlength - 0

I didnt try this one,hope this may solve ur problem.

Edited by: Srinisap on Jun 30, 2008 11:33 AM

Former Member
0 Kudos

Hi Srini

I tried as you suggested but it still has the same problem .

Former Member
0 Kudos

Hi,

hope u tried with these parameters,

Recordset Structure: UNB,UNB01

UNB.endSeparator: '

UNB.FixedfiledLength:0

UNB01.fieldSeparator: :

UNB01.endSeparator: +

what is the o/p for the above parametrs?

Former Member
0 Kudos

Hi Nivas

The output with those parameters is UNOC:2846

but i need it as UNOC:2+846'

any ideas

former_member190389
Active Contributor
0 Kudos

For this sort of structure you will have to use conversion agent.

search blogs on conversion agent...which supports EDIfact library

Former Member
0 Kudos

Hi Progirl

What other possibilities are there to achieve this ? We are trying not to use conversion agent or Seeburger adapter to keep it simple. Can't we achieve this without using them at all ? If so what is best , Conversion agent or see burger adapter? Which one is easier to implement ?

Thank you

Former Member
0 Kudos

Hi Sudheer,

I hope this will work,

UNB.fieldNames=UNB01, UNB05

UNB.fieldSeparator :"dont give anything, not even a space"

UNB.endSeparator: '

UNB01.fieldNames=UNB0101,UNB0102

UNB01.fieldSeparator: :

UNB01.endSeparator: +

Please check this and tell

regards,

Murugavel

Former Member
0 Kudos

Hi Murugavel

It is not processing the message without UNB.fieldSeparator value. The message is failing in the adapter without this value.

Any other thoughts ?

former_member190389
Active Contributor
0 Kudos

You can have a look at the following block: