cancel
Showing results for 
Search instead for 
Did you mean: 

FCC for a single line of text

markbernabe
Active Participant
0 Kudos

Hi All,

The file that I need to convert looks like this


1XY123 Test 21 10 100 22 20 101 330 201 420140101

And after conversion, it should be


<Header>

       <id>XY123</id>

       <name>Test</name>

</Header>

<Line>

       <item>1</item>

       <order>10</order>

       <points>100</points>

</Line>

<Line>

       <item>2</item>

       <order>20</order>

       <points>101</points>

</Line>

<Trailer>

       <totalorder>30</totalorder>

       <totalpts>201</totalpts>

</Trailer>

<Footer>

       <date>20140101</date>

</Footer>

The parameter KeyFieldValue would identify the nodes -  1 for Header, 2 for Line, 3 for Trailer and 4 for Footer. Recordset Structure is Header,1,Line*,Trailer,1,Footer,1. Since the file is just a single line of text, I could not use <node>.endSeparator.  Is it possible to convert such kind of file which contains single line only?

If the file contains multiple rows, then I have no problem converting it.


1XY123 Test

21 10 100

22 20 101

330 201

420140101

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Mark,

                Instead of FCC use a java mapping then this can be resolved easily.

Regards

Anupam

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Mark,

You can use a unix script to perform the rearrangement of the rows before it gets processed the the file sender adapter.

Regards,

Mark

Former Member
0 Kudos

Hello,

AFAIK, not possible using FCC.

U need some kind of custom logic to convert this text into XML (either at mapping or adapter level)

Thanks

Amit Srivastava

gagandeep_batra
Active Contributor
0 Kudos

Hi Mark

Did you try with fixed length option also?  NameA.fieldFixedLengths

Check below link for more help:

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm

Regards

GB