Quantcast
Channel: SCN: Message List - SAP Business One Integration Technology
Viewing all articles
Browse latest Browse all 973

Importing A Tab Delimited File

$
0
0

I am currently importing a tab delimited text file but, I need to either use a transformation atom or a format control document to get the payload into a more workable format.  The incoming file contains a header row followed by data rows. What is the best way to do this?

 

The sender payload is as follows:

 

<Payload Role="S">

  <io xmlns="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="txt">

  <row>

  <col>Seq#</col>

  <col>WhsCode</col>

  <col>Seg1</col>

  <col>Seg2</col>

  <col>Seg3</col>

  <col>Seg4</col>

  <col>ItemCode</col>

  <col>Quantity</col>

  <col>EaBatSer</col>

  <col>BatchSerl</col>

  </row>

  <row>

  <col>1</col>

  <col>01</col>

  <col>123</col>

  <col>012</col>

  <col>123</col>

  <col>001</col>

  <col>XYZ-485</col>

  <col>5</col>

  <col>EACH</col>

  <col>N/A</col>

  </row>

  <row>

  <col>2</col>

  <col>01</col>

  <col>123</col>

  <col>012</col>

  <col>123</col>

  <col>002</col>

  <col>XYZ-BAT</col>

  <col>10</col>

  <col>BATCH</col>

  <col>45387</col>

  </row>

  </io>

  </Payload>


I need a payload that will look something like the following. The column tags do not need to match the data in the heading row but, they do need to be different.  The head row also needs to be dropped.


<Payload Role="S">

  <io xmlns="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="txt">

  <row>

  <Seq>1</Seq>

  <WhsCode>01</WhsCode>

  <Seg1>123</Seg1>

  <Seg2>012</Seg2>

  <Seg3>123</Seg3>

  <Seg4>001</Seg4>

  <ItemCode>XYZ-485</ItemCode>

  <Quantity>5</Quantity>

  <EaBatSer>EACH</EaBatSer>

  <BatchSerl>N/A</BatchSerl>

  </row>

  <row>

  <Seq>2</Seq>

  <WhsCode>01</WhsCode>

  <Seg1>123</Seg1>

  <Seg2>012</Seg2>

  <Seg3>123</Seg3>

  <Seg4>002</Seg4>

  <ItemCode>XYZ-BAT</ItemCode>

  <Quantity>10</Quantity>

  <EaBatSer>BATCH</EaBatSer>

  <BatchSerl>45387</BatchSerl>

  </row>

  </io>

</Payload>


Blessings,


Tom



Viewing all articles
Browse latest Browse all 973

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>