cancel
Showing results for 
Search instead for 
Did you mean: 

File Sender Content Conversion: Help needed

Former Member
0 Kudos

Hello Experts,

i need help with file sender content conversion:

i have a file which looks like this:

12329460  24.01.09/07:01  167     Y010122851  136086  43300007            E70115  1L2_96_1
12329660  25.01.09/07:02  157     Y010122851  136086  43390007            E711J5  1L2_96_1

as you can see 8 fields, separated with whitespaces

and i want and xml file which looks like this:

<DT_DATA_FILESENDER>
  <Recordset>
      <Data>  
        <field1>12329460</field1>
        <field2>24.01.09/07:01</field2>
        <field3>167</field3>     
        <field4>Y010122851</field4>  
        <field5>136086</field5>  
        <field6>43300007</field6>
        <field7>E70115</field7>  
        <field8>1L2_96_1</field8
     </Data>

      <Data>  
        <field1>12329660</field1>
        <field2>25.01.09/07:02</field2>
        <field3>157</field3>     
        <field4>Y010122851</field4>  
        <field5>136086</field5>  
        <field6>43390007</field6>
        <field7>E711J5</field7>  
        <field8>1L2_96_1</field8
     </Data>
  </Recordset>
      

Would you please let me know how the datatype has to look like?

And especially how the FCC has to be configured for this scenario?

Thanks in advance,

Chris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Christian,

First check if you are getting your data as field fixed length and what are those lengths.

Sceondly you have to create 8 fields while creating your data type.

Refer this link for FCC.

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

Regards,

Sarvesh

Former Member
0 Kudos

With fixed lengths i get it working,

but with de fieldseparator 0X09 it does not work,

would you please tell me the complete FCC config not only the fieldSeparation line?

Thank you

Former Member
0 Kudos

Check out this link for sample content conversion but take out the things you needed for your configurations.

http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm

Rajesh

Former Member
0 Kudos

Think its the wrong link

says:

PayloadSwapBean

Former Member
0 Kudos

> With fixed lengths i get it working,

>

> but with de fieldseparator 0X09 it does not work,

> would you please tell me the complete FCC config not only the fieldSeparation line?

Well Christian,

There is one thing, eithere you can use fieldSeparator or fieldFixedLengths you can not use both together. So in your case do not use fieldSeparator.

The complete FCC is almost same as given in the blog in my previous reply. See the final output in that blog and create your data type accordingly. e.g.

Recordset
------Item 0...unbound
--------Field1 0..1
--------Field2 0..1
--------Field3 0..1
...
.....
--------Field8 0..1

Regards,

Sarvesh

Answers (2)

Answers (2)

Former Member
0 Kudos

Use

field.fieldseparator 0X09

Former Member
0 Kudos

Data.fieldSeparator 0X09 ?

or what do you mean?

Thanks!

Chris

Former Member
0 Kudos

That is the hexadecimal representation of tab delimiter.

Rajesh

Former Member
0 Kudos

thats clear, but what is the complete statement?

Data.fieldSeparator 0X09

or

field.fieldseparator 0X09?

and what recordset structure, sequence do i need?

Thanks

Edited by: Christian Cz. on Jan 28, 2009 10:00 AM

Former Member
0 Kudos

It should be Data.filedSeparator. (record.filedSeparator)

Rajesh

Former Member
0 Kudos

what recordset structure, sequence do i need?

Thank you Rajeesh!

Former Member
0 Kudos

Hi,

The following content conversion should help you :

Data.fieldNames field1,field2,field3,field4,field5,field6,field7,field8

Data.fieldFixedLengths 10,20,10,10,10,10,10,22 ( change the field lengths as per your requirement)

Data.endSeparator 'nl'

Thanks,

Pooja Pandey