溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

SAP Commerce Impex語法

發(fā)布時(shí)間:2020-08-17 14:30:07 來源:ITPUB博客 閱讀:135 作者:i042416 欄目:編程語言

SAP Commerce Impex語法


Header:上圖藍(lán)色和淺綠色文字。

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系統(tǒng)的映射關(guān)系。

格式:

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. 注意,大小寫無關(guān)。

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實(shí)例,看是否存在其uid屬性值為admin的實(shí)例。

注意我們現(xiàn)在是試圖插入Address數(shù)據(jù),如果上述的搜索命中,則將Impex語句里的address值維護(hù)到搜索命中的admin Principal實(shí)例去。

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.

如果并沒有Pricipal實(shí)例,其uid屬性等于admin,那么進(jìn)行第二輪搜索,根據(jù)AbstractOrder的code字段進(jìn)行搜索。

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

宏的實(shí)現(xiàn):

$catalog=catalog(id) $catalogVersion=catalogVersion($catalog,version)

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI