Medtun
9th March 2010, 12:48
Hi,
I'm triying to import table tcibd001 into LN FP5 using Exchange( i know it's not the easiest way to begin using Exchange :D ).
I presume i entered all the necessary parameters.
When i run importation program, records are read but none is processed. In logfile, i gets the following message :
" Incorrect record: number of fields or field contents doesn't correspond with ascii file fo 10 2daxch021707.06".
In the "exchange scheme", "separator character" is empty because in my input file, fields are separated with a "space" character.
My ASCII file is a text file saved from an Excel file.
Is it mandatory to mention in the input file all the fields that have to remain empty in the targetted table ?
Could you please help me ?
Regards.
mmurphy2650
9th March 2010, 23:05
Hi,
I'm triying to import table tcibd001 into LN FP5 using Exchange( i know it's not the easiest way to begin using Exchange :D ).
I presume i entered all the necessary parameters.
When i run importation program, records are read but none is processed. In logfile, i gets the following message :
" Incorrect record: number of fields or field contents doesn't correspond with ascii file fo 10 2daxch021707.06".
In the "exchange scheme", "separator character" is empty because in my input file, fields are separated with a "space" character.
My ASCII file is a text file saved from an Excel file.
Is it mandatory to mention in the input file all the fields that have to remain empty in the targetted table ?
Could you please help me ?
Regards.
Medtun,
Exchange probably cannot handle the "space" delimiter.
I would save your Excel text file as a comma delimited .csv file and change your Exchange Scheme text file delimiter to ",".
Mike
litrax
10th March 2010, 11:36
From the help for the field "Separator Character" in the session "Exchange Schemes" (daxch0501m000):
Enter a value here if you want to use variable-length fields in the ASCII file. The value you enter here is used to separate the ASCII file fields. The default is fixed-length fields.
Allowed values are characters such as \, ], ^, and _, and letters in the range [A-Z] if the Control Character check box is selected. Do not use characters that are used in the data fields that must be exchanged.
So an empty field means fixed-length. This is very buggy in practice.
So use a field separator that's not used in any field (text, description, special fields).
We use ^ or | (Pipe) as separator character. You can even use ΒΆ ( type ALT+0182 ).
The chance that this character is in any text is very low.
Hope it helped
Litrax
Medtun
10th March 2010, 18:23
Thank you for you help :
I didn't know that tools has it's own help :eek:
I'm using "exchange user's guide" and until now i did not succeded to import my file.
Can you help me please ?
- Is it necessary to specify in the ASCII file(and in the ASCII logical definition) all the fieds existing in the table target even if they are not madatory and empty ?
- Is it necessary to put in the ASCII file the exact length of empty text fields ?(for example if the field is text with 8 characters, il must be "" or " " ?
- Is multilinetext equivalent to MBS shown in GTM(field dsca in tcibd001). Im i obliged to use multilinetext or can i unse alphanumeric instead ? (with multilinetext i cannot specify the start position neither the length).
Thanks.
mmurphy2650
10th March 2010, 19:32
Thank you for you help :
I didn't know that tools has it's own help :eek:
I'm using "exchange user's guide" and until now i did not succeded to import my file.
Can you help me please ?
- Is it necessary to specify in the ASCII file(and in the ASCII logical definition) all the fieds existing in the table target even if they are not madatory and empty ?
- Is it necessary to put in the ASCII file the exact length of empty text fields ?(for example if the field is text with 8 characters, il must be "" or " " ?
- Is multilinetext equivalent to MBS shown in GTM(field dsca in tcibd001). Im i obliged to use multilinetext or can i unse alphanumeric instead ? (with multilinetext i cannot specify the start position neither the length).
Thanks.
It's not necessary to have all of the fields defined in your ASCII file and you don't need to worry about exact lengths because you will be using delimiter characters in your ASCII file.
Maybe this will clear thing up ... take a look at the attached document. It shows how I imported the following tables:
Routing Codes by Item - tirou101
Routing Operations - tirou102
It also shows how to import the tirou102.txta - Operation Text field.
Mike
Medtun
11th March 2010, 10:05
Thank you Mike, you're great.
dilvin
17th March 2010, 11:01
Hi
I did the import using exchange scheme on table tcibd001 (and also using OI) and the data was loaded successfully into this table.
But when i try to add this imported item in session tiedm1110m000 Engineering BOM, it prompts "Change the value of the Component field. Reason : Component not present as general item".
This happened too in session tcibd2500, i want to add the imported item manually, so i click on New, search for the imported item, found it, and when i want to tab to next field, it prompts "Specified "Item" not found in "Items - General." Enter another "Item".
It seems there is another table to be updated when i imported items into tcibd001. Have i missed out something ?
Please advise
regards
litrax
17th March 2010, 11:20
Hello,
I'm not sure but I would tip that there are some invisible or strange characters (trailing spaces, etc.) in the item field in tcibd001 that were coming from the import. Could you please look in the database and verify the content of the field tcibd001.item.
Or perhaps you can simply debug the tcibd2500 and compare the value of tcibd001.item with (after it's filled) tcibd200.item.
So it's just a first guess. Please provide more details (item numbers, debug infos?, did it happen with every item) if you could.
Litrax
dilvin
17th March 2010, 11:47
I have 9 trailling spaces before the item code in the tcibd001.item
I was told this is needed for project? Am i doing it right?
litrax
17th March 2010, 11:55
You need leading 9 spaces!? You can see this e.g. in the session tcibd0500m000 (see attachment).
Is there any conflict between upper/lowercase? Look in the General Table Maintenance to verify that.
You can see it when the item has e.g. lowercase chars in the GTM field and uppercase chars in the session fields.
dilvin
17th March 2010, 18:29
Hi Litrax
You are correct on the lowercase in GTM & uppercase in sessions.
Am i correct to say that in sessions, the item codes always displayed in uppercase?
What is the best practice for item code? All should be uppercase? (since the displayed code in sessions always seems to be in uppercase)
Thanks for your great help!
dilvin
18th March 2010, 12:48
i am trying to load for item-warehousing (session whwmd4100s000
) for the item - generals that i have loaded earlier.
Errors in the log file : Reference does not exist: whwmd400.item->tcibd001.item
Which table kept this reference?
regards
Medtun
18th March 2010, 14:40
I'm still blocked with tcibd001. I tried another way :
I exported all the table tcibd001 in an ASCII file.
I selected few line from this file, i changed the item codes and created an import file.
i've redone the creation of logical file and field's relations. it's easy, i generated them automatically.
when i tries to import the file, gets always the same error's message :
" 10,2,daxch021707.06,Incorrect record: number of fields or field contents...."
mmurphy2650
19th March 2010, 14:40
i am trying to load for item-warehousing (session whwmd4100s000
) for the item - generals that i have loaded earlier.
Errors in the log file : Reference does not exist: whwmd400.item->tcibd001.item
Which table kept this reference?
regards
Like litrax said earlier, you are probably missing the 9 leading spaces in whwmd400.item in your ASCII file.
mmurphy2650
19th March 2010, 14:47
I'm still blocked with tcibd001. I tried another way :
I exported all the table tcibd001 in an ASCII file.
I selected few line from this file, i changed the item codes and created an import file.
i've redone the creation of logical file and field's relations. it's easy, i generated them automatically.
when i tries to import the file, gets always the same error's message :
" 10,2,daxch021707.06,Incorrect record: number of fields or field contents...."
What delimiter character are you using in your ASCII file? Maybe that same delimiter character appears in your actual data. For example, if you are using a comma as your delimiter, make sure that there are no commas in any of your ASCII file fields such as tcibd001.dsca - Description.
Medtun
19th March 2010, 17:02
Well, i'm using the comma indeed.
i'll check for this.
In the meanwhile, i made a test with a simple table tcmcs060. and it works without problems.
i also have another question :
- What is the type MBS ? (tcibd001.dsca for example)
- How to deal with field type UTC ? : it contains inapprehensible data. Is it possible for me to obtain the right code for the dates/time i wants to import in a field with this type ?
Thanks.
mmurphy2650
19th March 2010, 18:38
Well, i'm using the comma indeed.
i'll check for this.
In the meanwhile, i made a test with a simple table tcmcs060. and it works without problems.
i also have another question :
- What is the type MBS ? (tcibd001.dsca for example)
- How to deal with field type UTC ? : it contains inapprehensible data. Is it possible for me to obtain the right code for the dates/time i wants to import in a field with this type ?
Thanks.
The data type MBS means Multi Byte String and it allows you to have non ASCII characters in your string.
UTC Dates are stored as an integer representing the number of seconds since January 1, 1970.
If your ASCII file has a date field that needs to be converted to UTC format, use the ASCII File Fields session to set the Field Type to Numeric and the Date Format to YYYYMMDD, MMDDYY or whatever format it is on your input file.
Mike
Medtun
22nd March 2010, 14:43
Thank you very much Mike.
Medtun
24th March 2010, 18:23
Finally it worked :D
I have done this :
- I changed as Litrax suggested from "," to "^" the delimiter character in session "exchange scheme".
- I changed from ".seq.txt" to ".S" the extension's file in session "table relation(import)" daxch0521m000.
Thank you all.