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. 四、bootstrap-Table

    一.bootstrap-Table基础表格 <!DOCTYPE html> <html lang="en"> <head> <meta c ...

  2. linux起源及centos安装

    第1章 Linux介绍 1.1 什么是操作系统 是一个人与计算机硬件的中介 Linux:内核+shell+扩展软件  操作系统,英文名称Operating System,简称OS,是计算机系统中必不可 ...

  3. Node.js定时邮件的那些事儿

    近开发一个项目,需要在Node.js程序里实现定期给管理员发邮件的功能. 笔者平时只会在Web界面收发邮件.对邮件的原理完全不懂(可能大学教过,然而全忘了),直到要解决这个问题.请教了几个业务的同事, ...

  4. curl分析请求的各个部分耗时情况

    curl 命令提供了 -w 参数,解释如下 -w, --write-out Make curl display information on stdout after a completed tran ...

  5. 18.synchronized

    同步的前提:  必须要有两个或者两个以上的线程  必须是多个线程使用同一个锁  必须保证同步中只能有一个线程在运行  好处:解决了多线程的安全问题  弊端:多个线程需要判断锁,较为消耗资源.抢锁的资源 ...

  6. Eur yml

    server: port: 6001 # 服务端口 eureka: instance: hostname: localhost # eureka服务端的实例名称 client: registerWit ...

  7. js 微信公众号网页用户授权,获取微信code,access_tocken,用户信息

    第一次做微信网页授权,过程有点艰难,主要是不知道redirect_uri的地址要怎么写,刚开始我以为就是授权结束后要跳转到的首页地址,于是写成了uri = 'http://18i194c049.ias ...

  8. POJ 2251 Dungeon Master(dfs)

    Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is co ...

  9. L1、L2损失函数、Huber损失函数

    L1范数损失函数,也被称为最小绝对值偏差(LAD),最小绝对值误差(LAE) L2范数损失函数,也被称为最小平方误差(LSE) L2损失函数 L1损失函数 不是非常的鲁棒(robust) 鲁棒 稳定解 ...

  10. CDN技术之-介绍

    “第一公里”是指万维网流量向用户传送的第一个出口,是网站服务器接入互联网的链路所能提供的带宽.这个带宽决定了一个网站能为用户提供的访问速度和并发访问量.如果业务繁忙,用户的访问数越多,拥塞越严重,网站 ...