首页 > 其他 > 详细

SAP PI-读取.csv/.txt格式转成xml格式

时间:2021-01-18 14:44:15      阅读:35      评论:0      收藏:0      [点我收藏+]

 

本次测试以读取.csv为例,.txt格式同理,只需更改channel中读取文件file name为*.txt

 

读取的.csv文件内容:

技术分享图片 

 

 生成的xml文件:

技术分享图片

 

 

以下为ESR 和 ID 配置

ESR:

message mapping

技术分享图片

 

ID:

技术分享图片

 

 

Message Protocol选择FCC

Document Name:经过FCC转换后的message type

Document Namespace:上面message type 的namespace

Recordset Name:结果集名称

Recordset Structure:子结构名称 <NameA,nA,NameB,nB,...> , where nA=1,2,3,... or * (for a variable, unlimited number, including 0).

Recordsets per Message:每条消息多少个结果集,即多少个Record

Key Field Name:主键字段,如果有多个子结构需要定义

 

head.ignoreRecordsetName true
head.fieldNames key,str1,str2,str3
head.fieldSeparator ,
head.endSeparator ‘nl‘
head.keyFieldValue head
list.fieldNames key,str1,str2,str3,str4
list.fieldSeparator ,
list.endSeparator ‘nl‘
list.keyFieldValue list

 

具体参数配置:https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/44/6713ec3f914ddee10000000a1553f7/content.htm?loaded_from_frameset=true

 

参考资料:http://saptechnical.com/Tutorials/XI/Contentconversion/page2.htm

 

SAP PI-读取.csv/.txt格式转成xml格式

原文:https://www.cnblogs.com/paidx/p/14282755.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!