| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Tips Categories:
Contribute?What's New?
What's Hot? |
Processing Multiple Files in Source System and Target System in SAP PI/XIBy Pavan Kumar Nukala, Yash Technologies Business Case: We had a requirement to send multiple files located in
different directories from the Business System (FTP server) to target Business
System (FTP system) and create files based on the payload. Procedure: In order to achieve the above business case we need to
process the multiple files at sender communication channel using file adapter.
Sender file adapter has the option Advanced
Selection for Source File. Check
the option and maintain the list of directories from the source FTP server.
As per the above mentioned directories place the respective
files in their folders. For Example sender folder holds the file out.xml file in
the same way place the rest of the files in the sender1 and sender2 directories. If you want
to process all files with extension '.xml', and want to exclude files that begin
with the letter 'a'. To do this enter *.xml for File Name, and a* for
Exclusion Mask. In file receiver communication channel to Create Multiple
Files in the target system we are achieving this using Variable Substitution. In
Advanced tab of the communication channel check the Enable under variable substitution, maintain variable name and
corresponding reference of the variable. The variable can refer to an attribute
of the message header or can refer to an element in the payload. However to
create multiple files in the target system we are referring to the ‘Name’
element in the payload and using the prefix as payload. payload:MT_Employee,1,Employee,1,Details,1,Name,1
If we want to get the values from the Header message use
prefix as message: instead of payload:.
By using message:interface_namespace as a reference value to the variable.
For instance in above figure the variable ‘var1’ holds
the reference of ‘Name’ element, which is use in the target filename schema
for creating files in target system.
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||