Carlo H. Francisco
Member
Hello Guys,
I was trying to transfer a record of a data that I exported to .txt and put it to the current table using a buffer. I am having some errors about data type, it's like the delimeter "," didn't follow the order of the table I buffered??.. This is the code...
But if I tried to define a temp-table with assigned fields, it was created
thanks and I really appreciate to those who will reply this..
I was trying to transfer a record of a data that I exported to .txt and put it to the current table using a buffer. I am having some errors about data type, it's like the delimeter "," didn't follow the order of the table I buffered??.. This is the code...
Code:
DEFINE BUFFER xinvhdr FOR inv-hdr-file.
INPUT FROM "C:\Documents and Settings\carlo\Desktop\_Carlo\Test\sample2.txt".
REPEAT:
CREATE xinvhdr.
IMPORT DELIMITER ",":U xinvhdr.
END.
FOR EACH xinvhdr .
CREATE inv-hdr-file NO-ERROR
.
ASSIGN
inv-hdr-file.beg_bal = xinvhdr.beg_bal
inv-hdr-file.date_forwarded = xinvhdr.date_forwarded
inv-hdr-file.end_bal = xinvhdr.end_bal
inv-hdr-file.fscl_prd = xinvhdr.fscl_prd
inv-hdr-file.fscl_yr = xinvhdr.fscl_yr
inv-hdr-file.in_qty = xinvhdr.in_qty
inv-hdr-file.item_code = xinvhdr.item_code
inv-hdr-file.item_desc = xinvhdr.item_desc
inv-hdr-file.item_specs[1] = xinvhdr.item_specs[1]
inv-hdr-file.item_specs[2] = xinvhdr.item_specs[2]
inv-hdr-file.item_specs[3] = xinvhdr.item_specs[3]
inv-hdr-file.min_level = xinvhdr.min_level
inv-hdr-file.pending_req = xinvhdr.pending_req
inv-hdr-file.qty = xinvhdr.qty
inv-hdr-file.qty_rel = xinvhdr.qty_rel
inv-hdr-file.qty_req = xinvhdr.qty_req
inv-hdr-file.qty_ret = xinvhdr.qty_ret
inv-hdr-file.type = xinvhdr.TYPE
inv-hdr-file.unit_price = xinvhdr.unit_price
inv-hdr-file.uom_code = xinvhdr.uom_code NO-ERROR.
END.
INPUT CLOSE.
But if I tried to define a temp-table with assigned fields, it was created
