Medtun
27th April 2010, 14:36
Hi all,
While trying to import suppliers list price in tdpcg031, i gets the following error's message " cannot find unit mt in unit group .".
Have you already faced this problem ?
The unit is correct and it's the right unit for the item i'd like to import price.
I have only one declared group unit : ELIT001. Offcourse, it contains the unit mt.
Can you help me ?
Thanks.

mmurphy2650
28th April 2010, 20:56
Hi all,
While trying to import suppliers list price in tdpcg031, i gets the following error's message " cannot find unit mt in unit group .".
Have you already faced this problem ?
The unit is correct and it's the right unit for the item i'd like to import price.
I have only one declared group unit : ELIT001. Offcourse, it contains the unit mt.
Can you help me ?
Thanks.

Just a guess ... unit must be lowercase. Is your Unit MT? If so, try mt.

litrax
29th April 2010, 12:15
I think we need more details, Medtun.
I can only show you our config in "ASCII File Fields":
No. ASCII Field Field Type Start. Pos. Length
10 pbor Numeric 1 3
20 prbk Alphanumeric 4 9
30 item Alphanumeric 13 47
40 otbp Alphanumeric 60 9
50 sfbp Alphanumeric 69 9
60 curn Alphanumeric 78 3
70 qtun Alphanumeric 81 3
80 miqt Numeric 84 20
90 efdt Numeric 104 10
100 brty Numeric 114 3
110 exdt Numeric 117 10
120 endt Numeric 127 10
130 bapr Numeric 137 20
140 prun Alphanumeric 157 3
150 dsor Numeric 160 3
160 dssc Alphanumeric 163 9
170 quon Numeric 172 3
180 hipr Numeric 175 3
190 refa Alphanumeric 178 30
200 sour Alphanumeric 208 30
210 dfpb Numeric 238 3
220 uolp Numeric 241 3

and a line of the file:
i|1|PUR01| 100000|12345||EUR|km |0|1012010|1|0|1012010|37|km |1||2|2||Manuell|2|2

Our Import Field Relations are 1:1.
Can you post an exerpt of your file and your ASCII File Field config?

Litrax

Medtun
29th April 2010, 13:25
Good morning, thank you for your help.

@Mike: my unit is lowercase. So it's ok.

This is how i do :
- I export with Exchange the table tdpcg031. I generates automatically the file's structure wtih all the fields. i change nothing.
- With a ACCESS query, i create a file with all field's table.
- i create an import file and generates its fields automatically with exchange.
- i import the file.

So normally i should have no problem with fields.

this is the structure i want to import :
1^PA0000001^ 2010005001001^T00020001^T00020001^TND^ mt ^0^1271419085^1^0^^034^ mt ^1^^2^2^^Manuel^1^2

Thanks.

litrax
29th April 2010, 13:33
Could it be that the unit is 4 spaces long?
Normaly it's 3 spaces...

Did you got the alignment right?

( _ = space)

Perhaps it should be mt_
not _mt_

Litrax

Medtun
29th April 2010, 16:43
Even with "_mt" the situation is the same. and with "mt" too.

Peter Campbell
30th April 2010, 11:08
Hello,

Read the error message again

" cannot find unit mt in unit group .".

It is looking for mt in unit group "" so it has not got the correct unit group.

Either see that it gets the correct unit group or put mt in unit group ""

Medtun
30th April 2010, 16:31
Yes i saw this. But, the problem is that in table tdpcg031 there is no field for unit group.
And as i said earlier, i have only one declared group unit : ELIT001. And it contains the unit mt.

litrax
3rd May 2010, 09:12
What Peter (and the error message) meant was the Unit Set in Items - General.
Please check if the field tcibd001.uset (Unit Set) is filled at all!
Cause if the data in tcibd001 is incorrect you'll get problems everywhere...

Medtun
3rd May 2010, 16:59
Hello, thank you for your help.
I'm making the test with only two lines and two items.
For both of them, warehousing unit is set "mt" in tcibd0101s000. "mt" belongs to a units group called "ELIT01". This is the only unit group declared in the system. We don't have a unit group called " ".

Peter Campbell
4th May 2010, 06:35
Hello,

This message is possibly from the DAL of tdpcg031.
You can have a look and see what it needs.
Add the table for the units to the exchange and fill the group field with ELIT001 in a condition.

Regards

Peter

Medtun
6th May 2010, 12:40
I got an answer from Infor about my problem. I got a webex session with one person from Infor USA(in EMEA they were unable to answer me). They told me that with the parameters set on my system, it is not possible to import table tdpcg031.
Now, i think i'm going to search the parameters to change so that the operation becomes possible as for many people.
@Peter: could you please explain to me a bit more : Have i just to add units table in import schema and to put the "ELIT001" condition on ?

Peter Campbell
7th May 2010, 10:23
Hello,

this is the code in the DAL for tdcg031 where the error is comming from. The table field tcibd001.uset is "" so you need to add the table tcibd001 to your exchange scheme and creat a import condition with:-

tcibd001.uset = "ELIT001"
return true

or

select tcibd001.*
from tcibd001
where tcibd001.uset = "ELIT001"
etc
return true

Hope this helps

Peter

select tcmcs012.cuni, tcmcs012.trad
from tcmcs012
where tcmcs012._index1 = {:tcibd001.uset, :tdpcg031.qtun}
selectdo
if tcmcs012.trad <> tcpeun.yes then
dal.set.error.message("tdpcgs0003", tdpcg031.qtun)
|* Unit %1$s cannot be used as quantity unit.
return(DALHOOKERROR)
endif
selectempty
dal.set.error.message("tdpcg00207", tdpcg031.qtun,
|* Unit %1$s not found in unit set %2$s.
tcibd001.uset)
return (DALHOOKERROR)
endselect

Medtun
17th May 2010, 12:19
Thank you peter, i'll try this asap.

r.vandervegt
2nd June 2010, 14:55
@Medtun,

How are you dealing with the date format.
I also use a exchange scheme for pricebooks.
but it is not handy for the enduser, because my date fields are in second
(as from 01.01.1970)

how do you deal with this?

Kind Regards,
Rooy

Medtun
2nd June 2010, 15:38
you just have to convert the dates to unix timestamp.

Many websites can do this for you :

http://www.unixtimestamp.com/index.php

r.vandervegt
3rd June 2010, 10:44
Thanks medtun,

But how to embedded this to ERP LN? is there some code?

mmurphy2650
3rd June 2010, 18:30
@Medtun,

How are you dealing with the date format.
I also use a exchange scheme for pricebooks.
but it is not handy for the enduser, because my date fields are in second
(as from 01.01.1970)

how do you deal with this?

Kind Regards,
Rooy

Hi Rooy,

In your Exchange Condition Script, you should be able to use one of date functions that are defined here ...

http://www.baanboard.com/programmers_manual_baanerp_help_functions_date_time_zones_overview

and here ...

http://www.baanboard.com/programmers_manual_baanerp_help_functions_date_time_zones_synopsis

Mike

r.vandervegt
9th June 2010, 09:26
thanks Mike,

so if i read correctly, i can use this:
( long utc, ref long yearno, ref long monthno, ref long month_dayno, ref long hours, ref long minutes, ref long seconds )

as an condition when exchange will give the desired output?

am I correct?

Thanks,
Roy

mmurphy2650
9th June 2010, 15:05
thanks Mike,

so if i read correctly, i can use this:
( long utc, ref long yearno, ref long monthno, ref long month_dayno, ref long hours, ref long minutes, ref long seconds )

as an condition when exchange will give the desired output?

am I correct?

Thanks,
Roy

Hi Roy,

I'm assuming that you are exporting the data from LN to an ASCII file.

If so, it may be easier to let Exchange convert the date from a UTC number to a formatted date for you.

You can do this in the Exchange ASCII File Fields session by selecting your desired Date Format in the Numeric Format box.

For example ... YYYYMMDD or MMDDYYYY.

Mike

r.vandervegt
9th June 2010, 16:07
Hi Roy,

I'm assuming that you are exporting the data from LN to an ASCII file.

If so, it may be easier to let Exchange convert the date from a UTC number to a formatted date for you.

You can do this in the Exchange ASCII File Fields session by selecting your desired Date Format in the Numeric Format box.

For example ... YYYYMMDD or MMDDYYYY.

Mike

is it that simple? will try that.

thanks

Roy

r.vandervegt
16th June 2010, 11:00
Nope, this is not working

mmurphy2650
18th June 2010, 14:58
Nope, this is not working

It should work. Take a look at the attached Exchange Export Scheme for the Item - Purchase BP table.

tdipu010.efdt - Effective Date - is being exported in YYYYMMDD format.
tdipu010.exdt - Exp Date - is being exported in Date Number format.

Mike