SAP Commerce Impex语法

简介: SAP Commerce Impex语法

image.png

Header:上图蓝色和浅绿色文字。


A header is a single line defining a mapping of the following value lines to the type system. A header applies to all processed value lines until the next header or until the end of file, whichever comes first. You can put any number of headers into a CSV file.


定义了接下来value line和type系统的映射关系。


格式:

mode type[modifier=value];attribute[modifier=value];attribute[modifier=value];attribute[modifier=value][;...];attribute[modifier=value]

方框里的modifier:Gives additional information for translating a value record to the mapped type attribute

例子:INSERT_UPDATE

category;code[unique=true];name[lang=de];name[lang=en];$supercategories;$thumbnail;description[lang=de];order

This header states that each following value line creates or updates a category instance, until another header occurs. 注意,大小写无关。

INSERT Address;firstname;owner(Principal.uid|AbstractOrder.code)
;Hans;admin
;Klaus;O-K2006-C0000-001

由|分隔开的语法叫 alternative pattern.


When importing the first value line ;Hans;admin, the ImpEx extension searches all instances of the Principal type to verify if any instance exists where the uid attribute is set to admin.


Impex extension首先查找所有principal实例,看是否存在其uid属性值为admin的实例。


注意我们现在是试图插入Address数据,如果上述的搜索命中,则将Impex语句里的address值维护到搜索命中的admin Principal实例去。


If an instance exists (and there is, by platform default), the new instance of the Address type has its owner attribute set to a reference to that Principal type instance.


如果并没有Principal实例,其uid属性等于admin,那么进行第二轮搜索,根据AbstractOrder的code字段进行搜索。


Attribute modifier

…;attribute[modifier=value,modifier=value,modifier=value];…

或者

…;attribute[modifier=value][modifier=value][modifier=value];…


The value of the $catalog macro sets the catalog id. The value of the $version macro sets the version string of the catalog version to export.


$catalog=clothescatalog

$version=Staged


宏的实现:


$catalog=catalog(id)

c a t a l o g V e r s i o n = c a t a l o g V e r s i o n ( catalogVersion=catalogVersion(catalogVersion=catalogVersion(catalog,version)


相关文章
|
8天前
SAP ABAP OData 服务里需要指定 guid 类型的请求参数时,正确语法是什么?
SAP ABAP OData 服务里需要指定 guid 类型的请求参数时,正确语法是什么?
8 1
|
8天前
|
UED
什么是 SAP Commerce Cloud SmartEdit Product Carousel Component Editor
什么是 SAP Commerce Cloud SmartEdit Product Carousel Component Editor
14 6
|
8天前
|
机器学习/深度学习 搜索推荐 UED
SAP Commerce Cloud Context Driven Services 概述
SAP Commerce Cloud Context Driven Services 概述
10 0
|
8天前
|
监控 搜索推荐 安全
SAP Commerce Cloud Context Driven Services 里 profile-tag.js 的作用介绍
SAP Commerce Cloud Context Driven Services 里 profile-tag.js 的作用介绍
9 0
|
8天前
|
存储 消息中间件 搜索推荐
SAP Commerce Cloud Context Driven Services 的 clickStreamEvents HTTP 请求
SAP Commerce Cloud Context Driven Services 的 clickStreamEvents HTTP 请求
10 0
|
8天前
|
机器学习/深度学习 人工智能 搜索推荐
SAP Commerce Cloud 智能销售服务 (Intelligent Selling Services)概述
SAP Commerce Cloud 智能销售服务 (Intelligent Selling Services)概述
10 0
|
8天前
|
安全 UED 开发者
SAP Commerce Cloud 配置项 refreshWithLock=false 的作用介绍
SAP Commerce Cloud 配置项 refreshWithLock=false 的作用介绍
23 0
|
6月前
|
数据安全/隐私保护
SAP Commerce Cloud 的 DataIsolation flag
SAP Commerce Cloud 的 DataIsolation flag
27 0
|
8天前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
33 0
|
8天前
|
JavaScript 前端开发 开发者
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
19 0