- 浏览: 488489 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
cloudfile:
谢谢分享!
MyEclipse配置Tomcat(图解) -
dotjar:
有效没?
治咳嗽秘方 -
jyslb:
设置密码长度大于10位,其中包含%$#&等符号,你这个 ...
奶瓶无线破解介绍 -
廖乐逍遥:
还是不行。。
eclipse里不支持泛型的解决方法 -
cue2008:
http://backtrack.unixheads.org/ ...
Intel 3945ABG无线网卡破解无线路由器密码 BT3
Dynamic File name using ASMA (Adapter Specific Message Attributes) in PI/XI
- 博客分类:
- SAP_PI
转自:http://www.saptechnical.com/Tips/XI/ASMA/Index.htm
There has been an added feature from SP14 onwards to handle the Message Attributes dynamically using AdapterSpecificMessageAttibutes (e.g. Filename). This feature has been demonstrated with one of the example below using File adapter.
Business case:
There was a requirement in one of our interfaces to get the same file name that sender places in his FTP and get the same name as file name with the added time stamp separated by the “_ “(underscore) symbol on the target side.
Ex: Source side file name (DynamicPO.txt has to be converted to DynamicPO_<timestamp>.xml).
Technical challenge:
Time stamp can be added at the end of the file name by specifying the Add Timestamp parameter .But our requirement is to put underscore between filename and time stamp which is not possible in the former case. To achieve this we can make use of ASMA and modify the file name according to our requirement.
Procedure:
Design Part (IR):
Prerequisites:
All the required Interface objects have already been created,In the current case the message structures are:
Source Structure
|
Target Structure |
<!-- [if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:137.25pt; height:150.75pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image001.png" o:title=""/> </v:shape><![endif]--> |
<!-- [if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:139.5pt;height:154.5pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image003.png" o:title=""/> </v:shape><![endif]--> |
Message mapping:
-
Create an UDF and include the piece of code that captures the Filename and Timestamp from source side via ASMA.
-
Modify them according to our requirement by adding the <Timestamp> at the end of <filename>.
-
Map the UDF to any of the top level node so that the modified filename will be available for the target communication channel.
UDF code:
<!-- [if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" style='width:378pt;height:266.25pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image005.png" o:title=""/> </v:shape><![endif]-->
Code:
try {
String filename = "";
String timestamp = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
DynamicConfigurationKey key2 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","SourceFileTimestamp");
filename = conf1.get(key1);
timestamp = conf1.get(key2);
filename = filename.replaceAll( ".txt" ,"_" );
filename = filename+timestamp+".xml";
conf1.put(key1,filename);
return filename;
}
catch(Exception e)
{
String exception = e.toString();
return exception;
}
Configuration Part (ID):
à In the sender side communication channel, Mention *.txt as file name to pick all the txt files that will be placed in the source directory.
<!-- [if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:242.25pt;height:78pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image007.png" o:title=""/> </v:shape><![endif]-->
à Click on Advanced tab and check the Option “SetAdapterSpecificMessageAttributes ” in addition to that check the attribute that are required to be captured during run time. In our case File Name and Source File Time Stamp are required to be checked as shown in the below picture.
<!-- [if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style='width:214.5pt;height:118.5pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image009.png" o:title=""/> </v:shape><![endif]-->
--> In the receiver communication channel Mention ‘ * ‘as File Name Scheme.
<!-- [if gte vml 1]><v:shape id="_x0000_i1030" type="#_x0000_t75" style='width:270.75pt;height:55.5pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image011.png" o:title=""/> </v:shape><![endif]-->
à Click on Advanced tab and check the Option “SetAdapterSpecificMessageAttributes ” in addition to that check the attribute “File Name ” which will carry the modified value in the UDF in mapping as shown below.
<!-- [if gte vml 1]><v:shape id="_x0000_i1031" type="#_x0000_t75" style='width:3in;height:118.5pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image013.png" o:title=""/> </v:shape><![endif]-->
à Create the Remaining IR objects as usual, save and activate them.
Execution:
Now it’s the time to test the interface .Place the “.txt ” file in the source directory and execute scenario. After successful execution you will see the “.xml ” file (as my scenario is FCC to xml ) created by the name that in way it has been modified in the UDF using Dynamic Configuration .
Sender system |
Receiver System |
<!-- [if gte vml 1]><v:shape id="_x0000_i1032" type="#_x0000_t75" style='width:3in;height:51.75pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image015.png" o:title=""/> </v:shape><![endif]--> |
<!-- [if gte vml 1]><v:shape id="_x0000_i1033" type="#_x0000_t75" style='width:255pt;height:59.25pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image017.png" o:title=""/> </v:shape><![endif]--> |
<!-- [if gte vml 1]><v:shape id="_x0000_i1034" type="#_x0000_t75" style='width:153pt;height:51pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image019.png" o:title=""/> </v:shape><![endif]--> |
<!-- [if gte vml 1]><v:shape id="_x0000_i1035" type="#_x0000_t75" style='width:324pt;height:215.25pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image021.png" o:title=""/> </v:shape><![endif]--> |
Runtime Workbench:
The checking of options ASMA in communication channel allows sender file attributes to be available in RWB as shown in the figure to see them Go to sxmb_moni à click on the message à Inbound message à SOAP Header à Dynamic Configuration .
File name and timestamp in SXMB_MONI (Before Modification ) :
<!-- [if gte vml 1]><v:shape id="_x0000_i1036" type="#_x0000_t75" style='width:342pt;height:144.75pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image023.png" o:title=""/> </v:shape><![endif]-->
Go to sxmb_moni à click on the message à Call Adapter à SOAP Header à Dynamic Configuration .
File name in SXMB_MONI (After modification Modification using Dynamic Configuration):
<!-- [if gte vml 1]><v:shape id="_x0000_i1037" type="#_x0000_t75" style='width:425.25pt;height:204.75pt'> <v:imagedata src="file:///C:\DOCUME~1\SAPTEC~1\LOCALS~1\Temp\msohtml1\03\clip_image025.png" o:title=""/> </v:shape><![endif]-->
发表评论
-
Gateway Access Control Lists
2015-10-12 11:34 1182Source:http://wiki.scn.sap.com ... -
SLD_UC registration failes with return code 748
2015-10-12 09:44 2188The managed ABAP systems shoul ... -
SLD Related Gateway Serivces Unavaliable
2015-10-12 09:01 744转自:http://www.sapnew.com/212. ... -
JDBC/JMS driver deployment - now more forceMode=true
2012-11-07 19:36 1229转自:http://scn.sap.com/people ... -
JDBC Receiver Adatper的同步场景设计
2012-10-18 15:15 1079转自:http://scnblogs.techweb. ... -
XML Anonymizer Bean in Communication Channel to remove namespace prefix in XML P
2012-07-24 16:14 1401转:http://www.saptechnical.com/T ... -
Step-by-Step Guides - Connectivity > CIDX Message eStandards
2012-05-29 11:36 1329http://wiki.sdn.sap.com/wiki/di ... -
Chem XML Message eStandards and CIDX Scenario Part III
2012-05-25 00:32 943http://scn.sap.com/people/suraj ... -
Chem XML Message eStandards and CIDX Scenario development – Part II
2012-05-25 00:30 1099http://scn.sap.com/people/suraj ... -
Chem XML Message eStandards and CIDX Scenario – Part I
2012-05-25 00:28 1093http://scn.sap.com/people/suraj ... -
SLDDSUSER in SLD is getting Locked
2012-05-24 17:59 1221******* LOCAL to Solution Manag ... -
How to Start the Visual Administrator
2012-05-22 16:24 944http://help.sap.com/saphelp_nw7 ... -
利用XI同步调用(JDBC)oracle数据库的返回值。
2012-02-13 18:03 1142今天用CCBPM做一串业务操作,具体的操作是:我先异步更 ... -
XI/PI Tables LIST
2012-02-09 15:28 1082ABAP ABAP schema Database Trans ... -
(MID)com.sap.SOA.apt_rfc.0303
2012-02-02 11:51 836MessageID com.sap.SOA.apt_rfc.0 ... -
FAQ XI 3.0/ PI 7.0/ PI 7.1 RFC Adapter
2012-02-01 16:52 2440转自:http://www.saptechies.com/fa ... -
如何排查mapping报错。
2012-01-18 15:50 954XI/PI在开发过程中最容易也是出错最多的地位就是map ... -
RFC Sender to JDBC receiver scenario中值得注意的三个问题
2012-01-17 17:09 1449转自:http://scnblogs.techweb.com. ... -
copyValue用法
2012-01-05 15:24 1146copyValue目的就是实现可以取到一个LIST的任意值。 ... -
PI动态生成字段方法
2011-12-28 18:48 1077今天遇到这样一种情况,PI更新数据库时,有的字段是动态更新 ...
相关推荐
ASMA实习任务二.ipynb
Asma是用于Linux的简单Arma 3启动器。 主要目的是提供一个GUI,用于选择启动游戏所用的修改。 此外,可以切换一些常见的游戏选项,在使用之间会记住这些选项。 请注意,Asma可能在macOS上起作用,但这未经测试。 ...
标签中的"asma"可能是ASMS的缩写错误,但在这里我们主要关注的是ASMS和其跟踪算法。ASMS跟踪算法的应用不仅仅局限于VOT挑战,还可以广泛应用于监控系统、自动驾驶车辆、无人机等需要实时目标跟踪的领域。 总的来说...
=`{“ name”:{“ first”:“ Mohamed”,“ last”:“ Shapan”},“ age”: 26,“ friends”:[{“ name”:“ Asma”,“ age”:26},{“ name”:“ Ahmed”,“ age”:25},{“ name”:“ Mahmoud”,...
这项研究的目的是提供科学的证据来证明Schumanniophyton magnificum(ASMa)的茎皮水提物对未成熟雌性Wistar大鼠的性成熟和生育能力的治疗作用。 将40只未成年雌性大鼠随机分为4组,每组10只动物,并以0(蒸馏水),...
Emerging Trends in the Enterprise Data Analytics: Connecting Hadoop and DB2 Warehouse (Page 1161) Fatma Özcan (IBM Almaden Research Center) David Hoa (Silicon Valley Lab) Kevin S. Beyer (IBM Almaden ...
其核心亮点在于华硕自行研发的服务器网络管理系统(ASMA+ASWM),这套系统能够实时监控服务器的运行状况,包括系统温度、电压和风扇速度,以确保服务器在最优状态下运行。 华硕AP1710-S5提供了强大的存储能力,配置...
压缩包内的文件名可能代表了不同的模板组成部分,如asma_6751可能是一个特定页面的CSS或图片文件,而“中国旧衣服网wl”可能是网站的某个子目录或者特定的页面文件。在实际使用中,用户需要按照一定的结构将这些文件...
- **管理节点(Management Node)**:监控集群状态,管理网络和ASMA(Advanced System Manager Adapter),用于接收计算节点报警和SNMP Trap。 - **存储节点(Storage Node)**:存储大量数据,可能需要RAID保护和高速...
"ASMA"可能是其中一个子文件的缩写,具体用途可能包括类库、数据库脚本、模块名称或者是特定功能的标识。由于信息有限,无法给出更详细的解释,但可以推测这可能是一个关键的组件或者是一段代码的别名。 在开发过程...
R.Sampaio,Asma Atamna,Konstantinos Varelas,Umut Batu,Duc Manh Nguyen,Filip Matzner,Anne Auger。 比较连续优化器:Github上的numbbo / COCO。 Zenodo,2019年3月。 要开始使用GBEA套件,请参阅 提供了一...
R.Sampaio,Asma Atamna,Konstantinos Varelas,Umut Batu,Duc Manh Nguyen,Filip Matzner,Anne Auger。 比较连续优化器:Github上的numbbo / COCO。 Zenodo,2019年3月。 重新实现了原始的Comparing Continous ...
QUILL(I ntense L aser-p L asma 相互作用中的QU antum 效应模拟器)是俄罗斯下诺夫哥罗德应用物理研究所开发的全三维平行粒子细胞 (PIC) 代码。据我们所知,这是第一个使用蒙特卡罗 QED 方法来研究电子-正电子级联...
6. **生成目标文件**:汇编完成后,汇编器会生成一个目标文件(Object File),其中包含机器码、符号表和其他元数据,这个文件可以被链接器进一步处理。 7. **宏处理**:某些高级汇编器支持宏,允许程序员定义和...
具体来说,我们通过提出自适应分割掩码攻击(ASMA)将这些模型的脆弱性暴露给对抗样本。 这种新颖的算法可以制作有针对性的对抗样本,这些样本具有(1)目标对抗掩码和预测之间的高交叉联合率,以及(2)在大多数...
TrailBuddies IFI / IAM PLIM项目2015/2016 ##贡献者Dhane Asma: [任务待定] Boussarsar Nizar: [任务待定] Chammam Raed: [任务待定] ##工具与环境Microsoft VisualStudio 2015社区版运行Windows 8.1的HTC 8S...
- **管理节点(Management Node)**:控制和监控集群的整体状态,运行管理软件,如ASMA,用于系统管理。 - **存储节点(Storage Node)**:存储大量数据,提供高速数据传输,通常配备RAID保护和高性能网络连接。 - **...
该扩展程序的托管服务已更改为其他服务器,以防扩展程序停止工作,请重新安装版本2.2.0:-添加了Abdelrahman来自迪拜的Al-Hindi Athan(感谢Asma Tahir的建议)-对扩展版本2.1.3进行了一些增强:-更新了扩展版本...