public void importPRLPODtlFromCSV()
{
#File
FileIOPermission permission;
CommaTextIo file;
container c;
int i;
ACT_PRLPODtl prlpoDtl;
permission = new FileIOPermission(filenameDtl, #io_read);
permission.assert();
file = new CommaTextIo(filenameDtl, #io_read);
file.inFieldDelimiter(',');
if (file)
{
ttsbegin;
delete_from prlpoDtl;
c = file.read();
while (file.status() == IO_Status::Ok)
{
c = file.read();
if (c)
{
i++;
prlpoDtl.clear();
prlpoDtl.EDI_Version = conPeek(c, 1);
prlpoDtl.Buyer_CD = conPeek(c, 2);
prlpoDtl.PO_No = conPeek(c, 3);
prlpoDtl.Item_No = conPeek(c, 4);
prlpoDtl.Style_No = conPeek(c, 5);
if (subStr(prlpoDtl.Style_No, 1, 1) == "|")
{
prlpoDtl.Style_No = subStr(prlpoDtl.Style_No, 2, strLen(prlpoDtl.Style_No)-1);
}
prlpoDtl.Cust_Style_No = conPeek(c, 6);
prlpoDtl.Color_CD = conPeek(c, 7);
prlpoDtl.Color_Desc = conPeek(c, 8);
prlpoDtl.Size_CD = conPeek(c, 9);
prlpoDtl.Size_Desc = conPeek(c, 10);
prlpoDtl.EAN_UPC_CD = conPeek(c, 11);
if (subStr(prlpoDtl.EAN_UPC_CD, 1, 1) == "|")
{
prlpoDtl.EAN_UPC_CD = subStr(prlpoDtl.EAN_UPC_CD, 2, strLen(prlpoDtl.EAN_UPC_CD)-1);
}
prlpoDtl.Concept_CD = conPeek(c, 12);
prlpoDtl.Qty = conPeek(c, 13);
prlpoDtl.QtyUOM = conPeek(c, 14);
prlpoDtl.UnitPrice_1 = conPeek(c, 15);
prlpoDtl.UnitPrice_2 = conPeek(c, 16);
prlpoDtl.UnitPrice_3 = conPeek(c, 17);
prlpoDtl.RetailPrice_1 = conPeek(c, 18);
prlpoDtl.RetailPrice_2 = conPeek(c, 19);
prlpoDtl.PriceUOM = conPeek(c, 20);
prlpoDtl.Size_Scale = conPeek(c, 21);
prlpoDtl.Program_Term = conPeek(c, 22);
prlpoDtl.Pattern = conPeek(c, 23);
prlpoDtl.Carrier_Name = conPeek(c, 24);
prlpoDtl.Routing = conPeek(c, 25);
prlpoDtl.Product_Type = conPeek(c, 26);
prlpoDtl.Board_No = conPeek(c, 27);
prlpoDtl.Program_CD = conPeek(c, 28);
prlpoDtl.Model = conPeek(c, 29);
prlpoDtl.Brand = conPeek(c, 30);
prlpoDtl.Fabrication = conPeek(c, 31);
prlpoDtl.Item_Desc = conPeek(c, 32);
prlpoDtl.CustOrderNo = conPeek(c, 33);
prlpoDtl.Buyer_Color_CD = conPeek(c, 34);
prlpoDtl.Buyer_Color_Desc = conPeek(c, 35);
prlpoDtl.Buyer_Size_CD = conPeek(c, 36);
prlpoDtl.Buyer_Size_Desc = conPeek(c, 37);
prlpoDtl.LongItem_No = conPeek(c, 38);
prlpoDtl.MultiPC = conPeek(c, 39);
prlpoDtl.Height = conPeek(c, 40);
prlpoDtl.Weight = conPeek(c, 41);
prlpoDtl.PrePack_CD = conPeek(c, 42);
prlpoDtl.SKU_No = conPeek(c, 43);
prlpoDtl.NoOfPrePack = conPeek(c, 44);
prlpoDtl.Concept_Desc = conPeek(c, 45);
prlpoDtl.CurrencyCD = conPeek(c, 46);
prlpoDtl.UnitPrice_4 = conPeek(c, 47);
prlpoDtl.UnitPrice_5 = conPeek(c, 48);
prlpoDtl.Buyer_Season = conPeek(c, 49);
prlpoDtl.Buyer_Theme = conPeek(c, 50);
prlpoDtl.MerchDiv_CD = conPeek(c, 51);
prlpoDtl.ShipPayMethod = conPeek(c, 52);
prlpoDtl.QuotaCat_CD = conPeek(c, 53);
prlpoDtl.Harmonized_CD = conPeek(c, 54);
prlpoDtl.AirAuth_No = conPeek(c, 55);
prlpoDtl.AirAuth_IssueDate = conPeek(c, 56);
prlpoDtl.AirAuth_ExpireDate = conPeek(c, 57);
prlpoDtl.AgeGroup = conPeek(c, 58);
prlpoDtl.MSRPCur = conPeek(c, 59);
prlpoDtl.TicketID = conPeek(c, 60);
prlpoDtl.NRFSizeCD = conPeek(c, 61);
prlpoDtl.PrePackUPC = conPeek(c, 62);
prlpoDtl.PAQ_Price = conPeek(c, 63);
prlpoDtl.PAQ_Qty = conPeek(c, 64);
prlpoDtl.Special_Price = conPeek(c, 65);
prlpoDtl.Special_Qty = conPeek(c, 66);
prlpoDtl.TicketingService = conPeek(c, 67);
prlpoDtl.HangingService = conPeek(c, 68);
prlpoDtl.insert();
}
}
ttscommit;
}
CodeAccessPermission::revertAssert();
info(strFmt("File imported: %1.", filenameDtl));
}
Ax2012 : import from csv
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 在开发过程中,某些功能需要重复使用,利用React中的props来传递参数,通过参数来控制子组件的属性。 使用此页...
- import:导入整个模块(包),语法形式是: import module name 或 import pack...
- from...import from A import b,相当于 import A b = A.b 此过程中有一...
- 在使用 eclipse+pydev 时,突然遇到报错:Undefined variable from import...