hybris使用impEx导入产品主数据的示例脚本

简介: hybris使用impEx导入产品主数据的示例脚本

SAP官网链接:https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/1905/en-US/8bdf595b86691014b902e0974f71491a.html


菜单路径:


Platform,Services,and Utilities->Commerce Platform Module->Commerce Platform Module Features->ImpEx->Working with ImpEx->Importing Products and Orders:





完整代码如下:

#

# Macro definitions (1)

#

$catalogVersion=catalogVersion(catalog(id[default='clothescatalog']), version[default='Staged'])[unique=true,default='clothescatalog:Staged']

$prices=europe1Prices[translator=de.hybris.platform.europe1.jalo.impex.Europe1PricesTranslator]

$baseProduct=baseProduct(code, catalogVersion(catalog(id[default='clothescatalog']), version[default='Staged']));;;;;;;;

#

# Create a category (2)

#

INSERT_UPDATE Category;code[unique=true];$catalogVersion;name[lang=de];name[lang=en];description[lang=de];description[lang=en];

;SampleCategory;clothescatalog:Online;Testkategorie;Sample category;Dies ist eine Testkategorie;This is a sample category;

#

# Create some products (3)

#

INSERT_UPDATE Product;code[unique=true];name[lang=en]; name[lang=de];unit(code);$catalogVersion; description[lang=en]; description[lang=de]; approvalStatus(code);supercategories(code)

;sampleproduct1;SampleProduct1;Testprodukt1;pieces;clothescatalog:Online;"This is a sample product";"Dies ist ein Testprodukt";approved;SampleCategory

;sampleproduct2;SampleProduct2;Testprodukt2;pieces;clothescatalog:Online;"This is another sample product";"Dies ist ein weiteres Testprodukt";approved;SampleCategory

;sampleproduct3;SampleProduct3;Testprodukt3;pieces;clothescatalog:Online;"This is the third sample product";"Dies ist das dritte Testprodukt";approved;SampleCategory

#

# Some pricerows for our products (4)

#

INSERT_UPDATE Product;code[unique=true];$catalogVersion;$prices;Europe1PriceFactory_PTG(code);  

;sampleproduct1;clothescatalog:Online;"1 pieces = 12,00 EUR, 20 pieces = 10,00 EUR";Tax_Full;

;sampleproduct2;clothescatalog:Online;"1 pieces = 11,50 EUR, 30 pieces = 0,99 EUR";Tax_Half;

;sampleproduct3;clothescatalog:Online;"1 pieces = 651,89 EUR, 10 pieces = 599,99 EUR";Tax_Full;

#

# Some variants of sampleproduct1 including Prices (5)

#

INSERT_UPDATE Product;code[unique=true]; $baseProduct;$catalogVersion; approvalStatus(code); Europe1PriceFactory_PTG(code); $prices;unit(code[default=pieces]);

;sampleproduct1-00;sampleproduct1;clothescatalog:Online;approved;Tax_Full;11,50 EUR N; pieces;

;sampleproduct1-01;sampleproduct1;clothescatalog:Online;approved;Tax_Full;11,00 EUR N; pieces;

#

# Defining an Order (6)

#

INSERT_UPDATE Order;code[unique=true];user(uid);date[dateformat=dd.MM.yyyy HH:mm];currency(isocode);net;deliveryMode(code);paymentMode(code);Discounts(code);calculated

;SampleOrder1;demo;17.01.2006 10:58;EUR;false;;advance;;false

#% impex.getLastImportedItem().setDeliveryAddress(impex.getLastImportedItem().getUser().getDefaultDeliveryAddress());

#% impex.getLastImportedItem().setPaymentAddress(impex.getLastImportedItem().getUser().getDefaultPaymentAddress());

#

# Setting OrderEntries on the Order (7)

#

INSERT_UPDATE OrderEntry;order(code)[unique=true];product(code,catalogVersion(catalog(id),version))[unique=true];quantity;calculated;unit(code);entryNumber;;;

;SampleOrder1;sampleproduct1:clothescatalog:Online;1;false;pieces;0;;;

;SampleOrder1;sampleproduct2:clothescatalog:Online;2;false;pieces;1;;;

;SampleOrder1;sampleproduct3:clothescatalog:Online;3;false;pieces;2;;;

#

# Calculating the Order (8)

#

UPDATE Order;code[unique=true]

;SampleOrder1

#%   impex.getLastImportedItem().recalculate();


目录
相关文章
|
7月前
|
BI
如何给 SAP ABAP ALV 报表的修改功能添加自定义校验逻辑试读版
如何给 SAP ABAP ALV 报表的修改功能添加自定义校验逻辑试读版
62 0
|
6月前
|
XML 存储 搜索推荐
一个真实的 SAP 标准 UI5 应用的扩展开发项目(Extension Project)分享 - UI5 界面上新增订单创建者字段
一个真实的 SAP 标准 UI5 应用的扩展开发项目(Extension Project)分享 - UI5 界面上新增订单创建者字段
58 0
|
7月前
SAP 电商云 Spartacus 5_0.md 迁移文档的编写格式
SAP 电商云 Spartacus 5_0.md 迁移文档的编写格式
33 0
|
XML 数据格式 容器
一个真实的 SAP 标准 UI5 应用的扩展开发项目(Extension Project)分享 - UI5 界面上新增订单创建者字段(2)
一个真实的 SAP 标准 UI5 应用的扩展开发项目(Extension Project)分享 - UI5 界面上新增订单创建者字段
102 0
|
SQL 关系型数据库 MySQL
电商项目之数据库文件导入,ODS 业务表|学习笔记
快速学习电商项目之数据库文件导入,ODS 业务表
115 0
|
资源调度 Shell
SAP 电商云 Spartacus UI CI e2e-cypress.sh 脚本文件分析
SAP 电商云 Spartacus UI CI e2e-cypress.sh 脚本文件分析
101 0
SAP 电商云 Spartacus UI CI e2e-cypress.sh 脚本文件分析
SAP RETAIL 对WG22执行LSMW批量导入物料组描述信息时需要前台执行
SAP RETAIL 对WG22执行LSMW批量导入物料组描述信息时需要前台执行
SAP RETAIL 对WG22执行LSMW批量导入物料组描述信息时需要前台执行
hybris使用impEx导入产品主数据的示例脚本
hybris使用impEx导入产品主数据的示例脚本
121 0
hybris导出系统已有数据的两种方式
hybris导出系统已有数据的两种方式
136 0
宏在hybris impEx 产品主数据导入脚本中的用途
宏在hybris impEx 产品主数据导入脚本中的用途
90 0

热门文章

最新文章