Kozure Ohashi
10th October 2008, 10:05
Dear Baanboard,

we use a internal EDI, transferring textfiles between to servers.

Location 1 <----- FTP -----> Location 2
Sales Order
|
Purchase Order ---------------> Sales Order

We are sending purchase orders to another location, containing also some information from the related sales order (endcustomer) and additional sales tables.

Data is originated from:
tdpur040, tdpur041, tdsls041, tdsls991(additional table with textfield).

In the messages 850, 860 we defined the tdsls991.txta text field, but it is not written to the 850.14 and the 860.9 file, whereas all other fields are written, also other textfields like tdsls041.txta, tipcs021.txta

The setup for 850.9 contains only this single textfield.
Question: is it necessary to define e.g. tdpur040, tdpur041 in the beginning for layer "9" ?

The definition for EDI ist only done for tcedi5115s000 (Table tcedi501).

Is it necessery to also modify a script (dll / include) to write this field to a file.

Currently we only modified the dll tdslsdll4280 in Location 2 for the incoming message.

Thanks in advance for any help.

Kozure

ravikrn_k
10th October 2008, 10:35
Hi,
If you need the text from tdsls991. You need to define this table in the dll of the EDI message at Location 1. After defining this table , you need to modify the dynamic sql in the EDI dll, so that the text is picked up.
And also you need not modify the EDI setup, so that this new field is sent to the edi file.

Regards..

Kozure Ohashi
10th October 2008, 10:53
Dear ravikrn_k,

thanks for the answer:

Situation is:

(1) Added the table to tdpurdll4280 (location 1) for outgoing 850/860
(2) Now the 860.9 file is written:
It contains the edi header, the purchase order number and position number.

But the textfield is still empty. The debugger for tdpurdll4280 shows me, that the text is read (is <> 0) .

Other field from the additonal table tdsls991 like datefield is written to 860.5 file.
Tried to add the textfield also to 860.5 but without success is still empty.

Regards,

Kozure

ravikrn_k
10th October 2008, 12:24
Hi,
Did you modify the script to pick the data from the table tdsls991.
Regards...Ravi

Kozure Ohashi
10th October 2008, 14:30
Yes,

the script tdpurdll4280 which is related to the message 860 contains everything like for other text fields (tipcs021.txta, tdpur041.txta) which are working.

While debugging you can trace the textnumber, but the text is not written to the file?

It seems somewhere the definition or registration for this field is missing.

Any other place i can search ?

Kozure

ravikrn_k
10th October 2008, 17:17
Please forward the Script to me , so that I can check it once.

Please check the EDI setup also, whether this field is defined in the loop or not.

Regards

Kozure Ohashi
13th October 2008, 10:23
Dear ravikrn_k,

the following modifications are done:

(1) Script tdpurdll4280 (related to Message 860 Purchase Order Change):


function extern long set.recordbuffer.active()
...
case "tdsls991":
edi.rcd = rcd.ttdsls991
break
endcase
...
---------------------------------------
function extern long read.next.record()
...
case "tdpur041":
...
read.references.tdpur041()
...
select tdsls991.*
from tdsls991, tdsls041
where tdsls041._index2 = {:tdpur041.cprj, :tdpur041.item}
and tdsls991._index1 = {tdsls041.orno, tdsls041.pono}
as set with 1 rows
selectdo
selectempty
db.set.to.default(ttdsls941)
endselect
...
setting a trace to tdsls991.txta and tdsls991.txtb i get the correct text number in the debugger.
-----------------------------------------------


(2) Settings in Session tcedi5115s000:

X12
860
Outgoing
Line
tdsls991.txtb 0 694 9 5 0 80 blank 0 0 blank 1 ... (mask 3) 100 2
tdsls991.txta 0 696 9 6 0 80 blank 0 0 blank 1 ... (mask 3) 100 2


Can you please advice me, where i could debug (script / dll / function) , if the field is written to the file 860.9 (maybe it is loosing the value on this point).

Regards,

Kozure

Kozure Ohashi
13th October 2008, 21:56
Dear ravikrn_k,

i debugged tcedi7601 script an found a very deep customization for textfields with some filter logic.

That was the reason, the export of the 860.9 message works now perfect.

Thanks for your help!

But now, i have another problem for importing the message 860.9 on location2:

The problem is the settings in the tcedi501 table (Session tcedi5101s000) for the 2 textfields:

The current setting is:
X12
860
Incoming
Line
tdsls991.txtb 0 597 9 5 0 80 Yes 0 599 blank No Update
tdsls991.txtb 1 598 9 6 0 80 blank 597 0 blank No Upate

tdsls991.txta 0 610 9 7 0 80 Yes 0 700 blank No Update
tdsls991.txta 1 615 9 8 0 80 blank 610 0 blank No Update

(I used existing text fields as a template).

Now the import mixes the field txtb and txta up, i.e. field txta is txtb.

Can somebody please explain me a right setting to import 2 textfields on the same level (860.9). Up to now we had only one text field per level (e.g. 860.5 or 860.4), who to count the fields (is it the same like export: count 5 is txtb count 6 is txta) or is there something special because of maximum text segments (100) and maximum texts per segment (2).

Thanks in advance.

Kozure

Kozure Ohashi
14th October 2008, 16:56
Somebody out there who can explain it:

location 1:

export 2 textfields on one layer (e.g. 860.9)

location 2:

import it.

What are the correct settings. Up to now only the first text field is imported, the second is ignored (i think because of wrong settings).

Thanks for any hints in advance!

Kozure