showstuff11
6th December 2016, 03:26
i have an uploading that requires to put a text/remarks on header and or lines
i can't figure out how to code this one since base on the table tdpur400 or tdpur401 or any table that has text/remarks ... the remarks is just numbers
any help will be appreciated
thanks
JaapJD
6th December 2016, 10:35
What tool are you using to upload the data?
pillai.ganesh
6th December 2016, 11:34
In LN every text stored in the database has a text number. A text field that is included in a database table is referenced in the table by its text number. The text itself, its key words, and so on, are stored in a separate table.
You can try these functions-
text.to.buf - This stores the text of a specified text field in a two-dimensional string array.
text.write - This adds a new text to the text manager and assigns a new text number to the text.
showstuff11
7th December 2016, 02:52
Sir, i created a session for uploading via text files
showstuff11
7th December 2016, 02:58
In LN every text stored in the database has a text number. A text field that is included in a database table is referenced in the table by its text number. The text itself, its key words, and so on, are stored in a separate table.
You can try these functions-
text.to.buf - This stores the text of a specified text field in a two-dimensional string array.
text.write - This adds a new text to the text manager and assigns a new text number to the text.
how will i use that? or how to use that? can you direct me to some notes or tutorials on how to use it please? or can you show me how would i code it
thanks for the reply
pillai.ganesh
7th December 2016, 13:54
<declaration of variabls>
string.scan(record.line,"%s|%s|%s",orderno,position,text)
|* Code to read the file.
<some code>
|* Code to create a temp file and store the text in it
temp.file.name = creat.tmp.file$(bse.tmp.dir$())
temp.file.name = strip$(temp.file.name)
open.ret1 = seq.open(temp.file.name,"w")
seq.puts(text,open.ret1)
seq.close(open.ret1)
|* Code to update table with the text stored in temp file
db.retry.point()
select tdxxx901.*
from tdxxx901 for update
where tdxxx901.orno = :orderno
and tdxxx901.pono = :position
selectdo
ret2 = text.write("tdxxx901.txta","2","tdxxx901.txta","","","","","",temp.file.name)
ret2 = db.update(ttdxxx901,db.retry)
commit.transaction()
endselect