cancel
Showing results for 
Search instead for 
Did you mean: 

problem in file content conversion

Former Member
0 Kudos

hi experts,

My requirment is xml to flat file using File content conversion at receiver side.

In output file I need some header lines and then data.

Like:--

----


Name address phone email

----


This should be the header in the output file then data will come under that.

how to achieve using File content conversion as in that i am able to add only one line instead of all 3 lines.

Please help me out

Thanks

Jaideep

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

Without having tested that, just a quick thought... Why don't you create a header in your FCC configuration with the option "NameA.addHeaderLine=3" and "NameA.headerLine=--


'0x0A''0x0D'Name address phone email'0x0A''0x0D'--


". The headerline is completely one line, but it contains CRLF commands, so the output file should be as wished.

Regards,

Heinrich

Former Member
0 Kudos

hi,

Thanks for yours quick reply.

I tried the same way as you mentioned but in out put file it is coming same in a single line including CRLF commands.Output I m getting is(allin first line):--

-


'0x0A''0x0D'Name address phone email'0x0A''0x0D'----


Data.......................

Please help me out.

Thanks

Jaideep

Edited by: Jaideep Baid on Apr 1, 2009 10:38 AM

Shabarish_Nair
Active Contributor
0 Kudos

>

> hi,

> Thanks for yours quick reply.

> I tried the same way as you mentioned but in out put file it is coming same in a single line including CRLF commands.Output I m getting is(allin first line):--

>

> -


'0x0A''0x0D'Name address phone email'0x0A''0x0D'----


>

> Data.......................

>

> Please help me out.

>

> Thanks

> Jaideep

>

> Edited by: Jaideep Baid on Apr 1, 2009 10:38 AM

will suggest you an alternative.

1. Modify your target structure to have a node called Header in the starting. Les say it has a field called headerValue inside it.
2. Let Header be 0-unbounded
3. Right click and duplicate this node three times
4. First occurance pass a constant -----------------------------------
5. Second pass Name address phone email
6. Pass ------------------------------------ again.

Now in the content conversion you can easily say

header.fieldSeparator 'nl'

header.enddSeparator 'nl'

Former Member
0 Kudos

hi Shabarish,

Thanks for urs response.

That can be done in mapping program only. But in my case i need to implement in receiver communication chanel using FCC.

Can you please tell how to do in that way..?

Thanks

Jaideep

Shabarish_Nair
Active Contributor
0 Kudos

>

> hi Shabarish,

> Thanks for urs response.

> That can be done in mapping program only. But in my case i need to implement in receiver communication chanel using FCC.

> Can you please tell how to do in that way..?

>

> Thanks

> Jaideep

yes. so thats why make that values as part of your mapping so that your target xml after mapping will have the required values in the header. Now you can easily accommodate this as part of your FCC. And once after FCC the file is written out the header values will also be written. Hope you understood.

Answers (2)

Answers (2)

Former Member
0 Kudos

What happens, if you change the '0x0A''0x0D' with 'nl'?

What are the other parameters in your channel configuration?

Former Member
0 Kudos

Hi,

Please refer to the sap link below:

http://help.sap.com/saphelp_nw70/helpdata/EN/d2/bab440c97f3716e10000000a155106/frameset.htm

Answer to your query is ,try to include "NameA.addHeaderLine" in your receiver file adapter.

Regards

Madhu