cameron
2nd June 2002, 13:40
can anybody advice how to import ONLY field tiitm001.item and tiitm001.dsca into table tiitm001? what i intend to do is to replace the Spanish description with English description without touching/importing the rest of the fields.

alejandro
2nd June 2002, 13:52
I do not Know anything that can do that without some work.

You have some options:

- Exchange
- Function Server
- 3GL or 4GL code, script.

For your requirement, I think the easiest way is exchange. If you have to translate dsca fields, with exchange you can export data to an ascii file, then translate and at last import those data.

If you have in some file dsca english descriptions, maybe a script that read those values and substitutes only dsca field would be the easiest way.

Of course you must test all this, backup previosly your table, test procedure , etc...

So, at last, maybe there is more than some job.

Hope this help.

cameron
2nd June 2002, 18:47
Hi alejandro,
first of all thanks for the advise. i had some knowledge in Baan Exchange and managed to get the job done by exporting all fields from table tiitm001, substituted the Spanish description with English description (in Microsoft Excel) and imported them back to the system. my concern is "somebody" told me this was stupid because i exported all fields and imported all fields which is totally unnecessary. by using Exchange i can actually import only those necessary fields (in my case, the tiitm001.item and tiitm001.dsca) without having to touch the rest. i tried only working on these two fields but when i import, the system rejected all records by giving me "reference not exist" error (reference integrity problem). i would like to learn if there is a way to have Baan ignore the reference integrity. thanks.

Nicholas
3rd June 2002, 00:33
From my little experience with exchange I ended up with a similar problem, but I just had to add the undefined reference fields to the Maintain Field Relation (import). I just put the field in there with a fixed value, and have it point to a proper value, then turn off update for that field.

benito
3rd June 2002, 22:02
Save yourself the time and headache. The way you did it is not stupid, its the quickest and most cost effective way.
You can do it with just several fields, definitely not 2 because you have other mandatory fields in tiitm001, but you have to map, determine the referential integrity, put fix values, putting "default" value and all sorts of thing.
Why would you care for such things? If you do it the way you did, you can finish the job almost after you got your description right, while the other guy is still trying to fix his referential integrity error. good luck.

Francesco
6th June 2002, 09:58
Cameron, you are correct. However, whenever you use exchange to import only certain fields, you must make sure to include the index fields of a table (although I believe that is only the .item field, however I am on a different version so I can't verify that).

Next, you need to make sure that Exchange will update the records rather than add or overwrite. To accomplish this, you need to go to session Table Relations (import) and select only Add and Update in the permitted operations. Then create an Update condition that simply says "return (true)", so you will always update and update only.

Finally, in the field relations, remove all fields that you don't want to touch (if any).

Your method of exporting and importing all fields will however work just as well and is definitely not 'stupid' ;)

Originally posted by cameron
Hi alejandro,
first of all thanks for the advise. i had some knowledge in Baan Exchange and managed to get the job done by exporting all fields from table tiitm001, substituted the Spanish description with English description (in Microsoft Excel) and imported them back to the system. my concern is "somebody" told me this was stupid because i exported all fields and imported all fields which is totally unnecessary. by using Exchange i can actually import only those necessary fields (in my case, the tiitm001.item and tiitm001.dsca) without having to touch the rest. i tried only working on these two fields but when i import, the system rejected all records by giving me "reference not exist" error (reference integrity problem). i would like to learn if there is a way to have Baan ignore the reference integrity. thanks.

NPRao
6th June 2002, 19:06
Hi Cameroon,

I was thinking of an alternative solution which you might like to explore, using the bdbpre and bdbpost commands.


comd = "bdbpre" & bse.release$() & " -t""|"" -N" & tabl & " -o " & path & " -C" & comp

e = shell(comd, 0)

|* export the table dump, tabl - table name/code, comp-company no., path-path of the *.S file

then you can use the VI/notepad/awk to replace the description column with a new codes... then use the bdbpost

comd = "bdbpost" & bse.release$() & " -c" & comp & " -t""|""" & " -R -n -D " & path
e = shell(comd, 0)

|* the -n option is to ignore refrential integrity constraints, -R is for replace mode if the records are already present.

cameron
7th June 2002, 03:41
Hi Francesco,
thanks a lot for the advise on Exchange - that really taught me a lot. :cool:

Hi NP,
thanks a lot for your alternative solution - although it is a bit difficult for me to understand at present; but i believe it would be very useful once i get through it :D

thanks, guys.

phoenix
7th June 2002, 10:45
Hello,

as some of you seem to have some problems with exchange
(especially with the error solving) here is a rough documentation
on the exchange basis we have written on our own.

Regards,
phoenix