cancel
Showing results for 
Search instead for 
Did you mean: 

B1if File System - TXT issue

Former Member
0 Kudos

Hi Expert,

I want to import a file (*.txt) into B1if.

The question is how to set the format.

Position

From

To

Description

Sample

0

2

Location Code

12

3

8

Product Code

3012

9

10

Product Sub Code

D

11

20

Formula Date

10/24/2012

21

33

Market price

149959

34

46

Cost price

150939

47

59

VA Market price

149943

60

72

VA Cost price

150389

After import the file stream into B1if.

The message log display like this,

<row> 

           <col>12 3021D 10-24-2012 149959 150939 149943 150389</col>

</row>

-  <row>
           <col>99999999999999999999 99999999999 99999999999 99999999999 99999999999</col>

</row>

Could you please give me a hint?

Best regards

Happy

Accepted Solutions (1)

Accepted Solutions (1)

bastian_schaefer
Active Contributor
0 Kudos

Hi,

please use a format control document as described in the B1i online help for file inbound.

Best regards

Bastian

Former Member
0 Kudos

Hi Bastian,

I create a format.xml like this, and I choose it in Format Control Document.

But it doesn't work.

Could you help to fingure out where the problem is?

Thank you

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

<TXT>

<!--Format Control Document-->

<field id="Location Code" from="1" len="2" default="" justify="" fillchar=""/>

<field id="Product Code" from="3" len="6" default="" justify="" fillchar=""/>

<field id="Product Sub Code" from="9" len="2" default="" justify="" fillchar=""/>

<field id="Formula Date" from="11" len="10" default="" justify="" fillchar=""/>

<field id="Market price" from="21" len="13" default="" justify="" fillchar=""/>

<field id="Cost price" from="34" len="13" default="" justify="" fillchar=""/>

<field id="VA Market price" from="47" len="13" default="" justify="" fillchar=""/>

<field id="VA Cost price" from="60" len="12" default="" justify="" fillchar=""/>

</TXT>

bastian_schaefer
Active Contributor
0 Kudos

Hi,

if you change anything in the INBOUND or OUTBOUND definition of your scenario you need to deactivate and reactivate your scenario step to activate your changes.

And please don't use any space characters in xml tags like "Location Code".

Best regards

Bastian

Former Member
0 Kudos

Hi Bastian,

I changed it like this

<TXT xmlns="">

   <!--Format Control Document-->

   <field id="Location" from="1" len="2" default="" justify="" fillchar=""></field>

   <field id="Product" from="3" len="6" default="" justify="" fillchar=""></field>

   <field id="Sub" from="9" len="2" default="" justify="" fillchar=""></field>

   <field id="Date" from="11" len="10" default="" justify="" fillchar=""></field>

   <field id="price" from="21" len="13" default="" justify="" fillchar=""></field>

   <field id="Cost" from="34" len="13" default="" justify="" fillchar=""></field>

   <field id="VAprice" from="47" len="13" default="" justify="" fillchar=""></field>

   <field id="VACost" from="60" len="12" default="" justify="" fillchar=""></field>

  </TXT>

But still cannot get what I what

I create a xml file, and then save it into webdav path.

Is it right?

Best regards

Happy

Former Member
0 Kudos

Hi Bastian,

I changed it like this

<TXT xmlns="">

   <!--Format Control Document-->

   <field id="Location" from="1" len="2" default="" justify="" fillchar=""></field>

   <field id="Product" from="3" len="6" default="" justify="" fillchar=""></field>

   <field id="Sub" from="9" len="2" default="" justify="" fillchar=""></field>

   <field id="Date" from="11" len="10" default="" justify="" fillchar=""></field>

   <field id="price" from="21" len="13" default="" justify="" fillchar=""></field>

   <field id="Cost" from="34" len="13" default="" justify="" fillchar=""></field>

   <field id="VAprice" from="47" len="13" default="" justify="" fillchar=""></field>

   <field id="VACost" from="60" len="12" default="" justify="" fillchar=""></field>

  </TXT>

But still cannot get what I what

I create a xml file, and then save it into webdav path.

Is it right?

Best regards

Happy

Former Member
0 Kudos

Finally, I found the root cause.

I set the wrong value in Identifier of Inbound.

Thanks

Answers (0)