UPC creation

UPC 结构

PLM 使用的UPC 是 14个数字组成的,兼容。

  1. 前两位为 0,后12位为有效数字,在SAP中0会被忽略,符合国际UPC通用 规则,

  1. 前一位为0,后13 位为有效数字,符合EAN规则

UPC 产生规则

具体规则一:7位 + 5位 + 1 位     13位

算法分解:假设前面固定7位 为 0715799

中间5位0开始计算,每次产生一个新的UPC,需要加一

最后一位的产生规则如下。

* 071579917350 6 -> 0+1+7+9+7+5=29 7+5+9+1+3+0=25*3=75 29+75=104 10-4=6
* 071579917351 3 -> 0+1+7+9+7+5=29 7+5+9+1+3+1=26*3=78 29+78=107 10-7=3
* 071579917352 0 -> 0+1+7+9+7+5=29 7+5+9+1+3+2=27*3=81 29+81=110 10-0=10
* 071579917353 7 -> 0+1+7+9+7+5=29 7+5+9+1+3+3=28*3=84 29+84=113 10-3=7
* 071579917355 1 -> 0+1+7+9+7+5=29 7+5+9+1+3+5=30*3=90 29+90=119 10-9=1
* 071579917356 8 -> 0+1+7+9+7+5=29 7+5+9+1+3+6=31*3=93 29+93=122 10-2=8
* 071579917357 5 -> 0+1+7+9+7+5=29 7+5+9+1+3+7=32*3=96 29+96=125 10-5=5
* 071579917358 2 -> 0+1+7+9+7+5=29 7+5+9+1+3+8=33*3=99 29+99=128 10-8=2
* 071579917359 9 -> 0+1+7+9+7+5=29 7+5+9+1+3+9=34*3=102 29+102=131 10-1=9
* 071579917360 5 -> 0+1+7+9+7+6=30 7+5+9+1+3+0=25*3=75 30+75=105 10-5=5
* 071579917361 2 -> 0+1+7+9+7+6=30 7+5+9+1+3+1=26*3=78 30+78=108 10-8=2
* 071579917362 9 -> 0+1+7+9+7+6=30 7+5+9+1+3+2=27*3=81 30+81=111 10-1=9

public
static String calcolaCRC(String myCode) throws Exception {
        String crc = "";
//     
calcolo la somma delle cifre in pos pari e di quelle in pos dispari
        int tot_pari = 0;
        int tot_dispari = 0;
//      i
caratteri in posizione pari sono in realta' in pos dispari e viceversa
//      perche' quello che si definisce
PRIMO carattere e' in pos ZERO
        for (int i = 0; i < myCode.length();
i++) {
            if (i % 2 == 0) {
//             
pos pari
                tot_dispari += Integer.parseInt(myCode.substring(i, i + 1));
            } else {
//             
pos dispari
                tot_pari += Integer.parseInt(myCode.substring(i, i + 1));
            }
        }
        int tot = tot_dispari + 3 * tot_pari;
//      del
totale mi serve solo l'ultima cifra
        int i_crc = tot / 10;
        i_crc = i_crc * 10;
        i_crc = tot - i_crc;
        crc = String.valueOf(10
- i_crc);
        if (i_crc == 0) {
            crc = "0";
        }

return crc;
    }

具体规则二:7位 + 4位 +1位    12位

07157991735   8

0*2 + 1*2 + (7*2-10+1)+ (9*2 -10 +1) + (7*2 -10 +1)+ (5*2 -10 +1) = 22

22%10 = 2

10-2 = 8

public static String calcolaOPCCRC(String OPC) throws Exception {
    String crc = "";
    int totSum = 0;
    for (int i = 0; i < OPC.length(); i++) {
        String curValue = OPC.substring(i, i + 1);
        Integer intCurValue = new
Integer(curValue);
        int parsedInt = intCurValue.intValue();
        if (i % 2 == 0) {
            parsedInt = parsedInt * 2;
            if (parsedInt >= 10) {
                parsedInt = parsedInt - 10 + 1;
            }
        }
        totSum = totSum + parsedInt;
    }
    int
toSubtract = totSum % 10;
    if (toSubtract == 0) {
        toSubtract = 10;
    }
    int
crcInt = 10
- toSubtract;
    crc
= new Integer(crcInt).toString();

return crc;
}

STID creation

与UPC一致

数据导出文件 文件名:MatrixDataExport-LUX_Products-True-91619142007919.xml

总体结构:

<MatrixDataExport>

<header>

//定义了一些很重要和系统集成有关的参数

</header>

<object>

//定义具体的导出的数据

</object>

</MatrixDataExport>

重要标签解释:

Transformation

<transformation>Z_MD_23_XSLT</transformation>

定义处理改xml的xslt 程序

sapSerialization

<SapSerialization>

<chrmas>1</chrmas>

<j3agri>1</j3agri>

<j3amat>1</j3amat>

</SapSerialization>

显示将要产生具体IDOC的数量 (目前来看,只有chrmas 有可能是2,其他都是1)

Chrmas
ßàZCHRMAS03

j3agrißàZJ3AGRI02

j3amatßàZ/AFS/MATMAS05

listZ08Chars

当前导出的物料,它的sku
属性有哪些。

物料属于不同的classification
的时候,它的characterstic
有所区别,

Z08属性 是说 某个classification
中的sku 属性。

Plm 中 有一个配置文件专门用来配置数据导出的配置项,其中就有此项配置。

object :

数据结构为不规则的多叉树

数据转换过程

转换过程: (邀请PI协助一下)

PI 读取XML->根据transformation
定义决定产生哪些Idoc->读取xml里面所有的节点->根据对应的转换文件xslt进行转换->读取转换后文件的所有节点->做适配(mapping,一般不做什么事情)

XSL

XslT语言

将一个XML 转化成另外一种格式显示的语言

例子:将一个XML 转换成网页可以显示

index.xml    (utf-8格式编辑)

<?xml version="1.0"
encoding="utf-8"?>

<catalog>

<cd>

<title>西游记 </title>

<artist>吴承恩</artist>

</cd>

<cd>

<title>红楼梦 </title>

<artist>曹雪芹</artist>

</cd>

</catalog>

index.xsl (utf-8格式编辑)

<?xml
version="1.0" encoding="utf-8"?>

<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template
match="/">

<html>

<body>

<h2>My CD Collection</h2>

<table border="1">

<xsl:for-each select="index/cd">

<tr>

<td><xsl:value-of
select="title"/></td>

<td><xsl:value-of
select="artist"/></td>

</tr>

</xsl:for-each>

</table>

</body>

</html>

</xsl:template>

</xsl:stylesheet>

合并:

<?xml-stylesheet
type="text/xsl" href="index.xsl"?>

Chrome 浏览器 安全等级太高,不能引用本地xsl,

需要在 dos 命令里面启动chrome 带上参数  --allow-file-access-from-files

XPath语言

可以直接访问XML节点的语言

Idoc

ZSSD_KSERIAL

解释是第几条idoc

总 Counter 为3 的情况

IDoc 0000001634665213  
counter 为1

IDoc 0000001634665215  
counter 为 2

IDoc 0000001634665216(出错)
counter 为3

总Counter
为4的情况

IDoc 0000001634644375

IDoc 0000001634644376

IDoc 0000001634644377

IDoc 0000001634644378

ZMM_CLASSIFICATION_HEADER

里面暂时只看到 D_X , 可能是语言/或者国家

但是它分为两种,一种BUSINESS 一种TEXT, TEXT 为何,不太清楚

001  material

Z06 size

Z07
color

Z08 sku

ZSMMA_PLM_TRANSIT

料号,物料组类型,工厂,采购类型

E1MARA1

物料的相关属性

Size的相关属性

SKU 的相关属性

E1J3MRA

E1MAKTM

各种语言版本的描述信息

E1MARMM

(grid
value 的详细信息,根节点无特别意义)

/AFS/E1MARM   Grid value

E1MEANM      Grid value 对应的UPC/STID

enovia plm export to sap的更多相关文章

  1. enovia PLM: add characteristic to both prototype and product

    Issue: add new mandatory attribute named LUX_HazardousMaterial to protoype and product, and export t ...

  2. enovia PLM : add new value to SPEO

    Solution: Modify LUX_SPEO attribute in PLM Modify D_SPEO attribute in SAP , Login sap system F3 Tcod ...

  3. add a characteristic in enovia PLM

    Problem: add a new Char. name D_COI6 that the description is Injected coloration #7 (COI6) in the D_ ...

  4. add new color number to the color drop down in enovia PLM

    Ticket description:A55482L Ticket attachment: Open the attached page 2. Open the internationalizing ...

  5. form 表单的name

    form 中 的name 很重要, 1. 可以用来查找对应的input 2.form 提交之后 会用来作为参数列表的名字 3.enovia plm 中,name 会和 table 的field 进行对 ...

  6. 程序间数据共享与传递:EXPORT/IMPORT、SAP/ABAP Memory

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  7. 【ABAP系列】SAP ABAP如何在调试查看EXPORT/IMPORT 内存数据

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP ABAP如何在调试查看E ...

  8. 【ABAP系列】SAP ABAP 给初学者-解读function函数的export和import等参数

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP ABAP 给初学者-解读 ...

  9. 批量授一种权限给用户程序 plm enovia

    set context user DanielDai;add program LUX_UserAssignment java execute immediate code 'import com.ma ...

随机推荐

  1. opencv图像的基本操作3

    1.获取像素并修改 读取一副图像,根据像素的行和列的坐标获取它的像素值,对于RGB图像而言,返回RGB的值,对于灰度图则返回灰度值 import cv2 import numpy img = cv2. ...

  2. Windows server 2016远程桌面登录和修改3389端口

  3. rope(平衡二叉树)

    题目描述: 链接:https://www.nowcoder.com/acm/contest/141/C来源:牛客网 Eddy likes to play cards game since there ...

  4. 【转】在配置静态IP的时候遇到 :bringing up interface eth0 : error unknown connection

    首先这是动态ip配置成功的结果 接下来切换到root用户来配置静态的 按照静态ip的配置方法配置好文件后(具体过程这里就不多加说明) 然后保存退出 当我们重启网卡的时候问题来了(因为本人有点强迫症,多 ...

  5. vue - blog开发学习6

    1.问题,如下图,使用iviewui中的card导致页面不能出现滚动条(不太会弄,在网上查了一个vue组件vuescroll,因此使用这个做滚动条) 2.安装vuescroll cnpm instal ...

  6. linux+Apache开启伪静态配置

    linux+Apache伪静态配置 一.环境准备:CentOS Linux release 7.4.1708 (Core)1.配置源[root@localhost ~]#yum install -y ...

  7. MariaDB学习笔记(一)

    一.数据类型:1.整数类型: TINYINT:1Byte SMALLINT:2Byte MEDIUMINT:3Byte INT:4Byte INTEGER:4Byte BIGINT:8Byte 2.浮 ...

  8. elasticsearch 父子关系

    ElasticSearch 中的Parent-Child关系和nested模型是相似的, 两个都可以用于复杂的数据结构中,区别是 nested 类型的文档是把所有的实体聚合到一个文档中而Parent- ...

  9. 三、bootstrap-treeview

    一.bootstrap-treeview 修饰标签为徽章 参考 https://www.cnblogs.com/bin521/p/8403588.html

  10. Ubuntu命令行操作

    一.文件/文件夹管理 ls 列出当前目录文件(不包括隐含文件) ls -a 列出当前目录文件(包括隐含文件) ls -l 列出当前目录下文件的详细信息 cd .. 回当前目录的上一级目录 cd - 回 ...