hybris - 如何使用impex在Hybris中仅导出一种产品

标签 hybris impex

我只想使用 hybris impex 导出一种产品:
以下sql给我那个产品。

select * from products where code='489923'

我正在尝试修改导出脚本:
# ---- Extension: core ---- Type: Product ----
"#% impex.setTargetFile( ""Product.csv"" );"
insert_update Product;pk;Europe1PriceFactory_PDG(code,itemtype(code));Europe1PriceFactory_PPG(code,itemtype(code));Europe1PriceFactory_PTG(code,itemtype(code));approvalStatus(code,itemtype(code))[allownull=true];articleStatus[lang=en];buyerIDS(key(code,itemtype(code)));catalog(id)[allownull=true];catalogVersion(catalog(id),version)[unique=true,allownull=true];code[unique=true,allownull=true];contentUnit(code);creationtime[forceWrite=true,dateformat=dd.MM.yyyy hh:mm:ss];data_sheet(catalogVersion(catalog(id),version),code);deliveryTime;description[lang=en];detail(catalogVersion(catalog(id),version),code);ean;endLineNumber;erpGroupBuyer;erpGroupSupplier;europe1Discounts(pk);europe1Prices(pk);europe1Taxes(pk);galleryImages(catalogVersion(catalog(id),version),qualifier);logo(catalogVersion(catalog(id),version),code);manufacturerAID;manufacturerName;manufacturerTypeDescription[lang=en];maxOrderQuantity;minOrderQuantity;name[lang=en];normal(catalogVersion(catalog(id),version),code);numberContentUnits;offlineDate[dateformat=dd.MM.yyyy hh:mm:ss];onlineDate[dateformat=dd.MM.yyyy hh:mm:ss];order;orderQuantityInterval;others(catalogVersion(catalog(id),version),code);owner(pk)[allownull=true];picture(catalogVersion(catalog(id),version),code);priceQuantity;productOrderLimit(pk);remarks[lang=en];segment[lang=en];sequenceId;specialTreatmentClasses();startLineNumber;summary[lang=en];supplierAlternativeAID;thumbnail(catalogVersion(catalog(id),version),code);thumbnails(catalogVersion(catalog(id),version),code);unit(code);variantType(code);variants(catalogVersion(catalog(id),version),code);xmlcontent
"#% impex.exportItems( ""Product"" , false );"

如下:
# ---- Extension: core ---- Type: Product ----
"#% impex.setTargetFile( ""Product.csv"" );"
insert_update Product;pk;Europe1PriceFactory_PDG(code,itemtype(code));Europe1PriceFactory_PPG(code,itemtype(code));Europe1PriceFactory_PTG(code,itemtype(code));approvalStatus(code,itemtype(code))[allownull=true];articleStatus[lang=en];buyerIDS(key(code,itemtype(code)));catalog(id)[allownull=true];catalogVersion(catalog(id),version)[unique=true,allownull=true];code[unique=true,allownull=true];contentUnit(code);creationtime[forceWrite=true,dateformat=dd.MM.yyyy hh:mm:ss];data_sheet(catalogVersion(catalog(id),version),code);deliveryTime;description[lang=en];detail(catalogVersion(catalog(id),version),code);ean;endLineNumber;erpGroupBuyer;erpGroupSupplier;europe1Discounts(pk);europe1Prices(pk);europe1Taxes(pk);galleryImages(catalogVersion(catalog(id),version),qualifier);logo(catalogVersion(catalog(id),version),code);manufacturerAID;manufacturerName;manufacturerTypeDescription[lang=en];maxOrderQuantity;minOrderQuantity;name[lang=en];normal(catalogVersion(catalog(id),version),code);numberContentUnits;offlineDate[dateformat=dd.MM.yyyy hh:mm:ss];onlineDate[dateformat=dd.MM.yyyy hh:mm:ss];order;orderQuantityInterval;others(catalogVersion(catalog(id),version),code);owner(pk)[allownull=true];picture(catalogVersion(catalog(id),version),code);priceQuantity;productOrderLimit(pk);remarks[lang=en];segment[lang=en];sequenceId;specialTreatmentClasses();startLineNumber;summary[lang=en];supplierAlternativeAID;thumbnail(catalogVersion(catalog(id),version),code);thumbnails(catalogVersion(catalog(id),version),code);unit(code);variantType(code);variants(catalogVersion(catalog(id),version),code);xmlcontent
"#% impex.exportItems(""SELECT {K:pk} FROM {Product as K} WHERE {K:code}='489923'  , false );"

这样我只能导出一种产品。但它给了我错误?另外我不确定如何查看错误的详细信息。

最佳答案

您可以在 hac 中在 export impex 下运行:

insert_update Product;pk;approvalStatus(code,itemtype(code))[allownull=true];articleStatus[lang=en];buyerIDS(key(code,itemtype(code)));catalog(id)[allownull=true];catalogVersion(catalog(id),version)[unique=true,allownull=true];
"#% impex.exportItemsFlexibleSearch( ""select {pk},{approvalStatus},{articleStatus},{buyerIDS},{catalog},{catalogVersion}from {Product} where {pk}='8799737217054'"" );"

您可以在下方下载一个文件

关于hybris - 如何使用impex在Hybris中仅导出一种产品,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34549201/

相关文章:

sap-commerce-cloud - 如何创建 Hybris Impex 以从给定的 .xml 代码导入

sap-commerce-cloud - hybris 中的用户访问权限 user MemberOf Groups

java - 如何使用 "ant importImpex"命令将特定租户指定为参数?

Intellij 无法解析 Spring bean 范围租户

sync - Hybris 同步系统错误

hybris - 如何减少 Hybris 服务器的启动时间?

mocking - Hybris Mockito : Getting Exception there is no LocaleProvider for (detached) model

hybris - 在 Hybris 中更改 “autocreate = true"等参数有什么影响?

sap-commerce-cloud - 如何通过 impex 在 SAP Hybris 中配置客户特定定价?