Professional Documents
Culture Documents
Pic 1.2
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
The MultipartHeaderBean enables us to access the attributes of other payloads that are
appended to the XI message as
an additional attachment. In the Module tab add the MultipartHeaderBean with the following
parameters:
Parameter Name
Parameter Value
requiredHeaders
All
dcNamespace
http://sap.com/xi/XI/System/Mail
Using the PayloadSwapBean here we can replace the application payload of the XI message
i.e. email content, with another payload that is appended to the XI message i.e. the attachment
Add the PayloadSwapBean with the following parameters:
Parameter Name
Parameter Value
swap.keyName
Payload-Name
swap.keyValue
MailAttachment-1
Pic 1.3
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
To the 'Module' tab add the DynamicConfigurationBean with the following parameters:
Parameter Name
Parameter Value
key.0
write http://sap.com/xi/XI/System/Mail
Part[1].Content-Description
value.0
message.interface
Pic 2.1
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
Using Variable Substitution, create a variable fname referencing the message interface name and access this
variable in the file name field.
Pic 2.2
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
Pic 2.3
Testing
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
Integrated configuration was used in this scenario, so we can see the Dynamic Configuration message
attributes in message monitoring.
Note that Part[1].Content-Description has been set to MyAttachment1.CSV at runtime.
Pic 3.2
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
The payload was swapped successfully and the attachment data has been set to the main payload as shown
below.
Pic 3.3
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
We can see the output file in the output folder path with the same name as our attachment
MyAttachment1.CSV.
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
I rectified this issue by using an UDF. But just want to know is there any other way to get the correct file name
in adapter level.
Regards,
Deepak Ravi
divyesh vasani
Mar 19, 2014 7:06 AM
Nice Blog
Very well explained... I like the use of MultiPartHeaderBean ...
--Divyesh
mastan vali
Jan 10, 2014 9:03 AM
Hi Siva,
thank you for letting us the standard beans for mail attachement.
Keep blogging
Regards,
Mastan
Monikandan Panneerselvam
Jan 10, 2014 8:55 AM
Nice blog siva
One clarification:
If it is FTP folder instead of NFS any specific change need to do or only the adapter selection is enough.
dhinesh kumar raj kumar
Process Integration (PI) & SOA Middleware: Creating File Name from Mail Attachment using Standard Beans
- Kulwinder
amarnath kashinath
Apr 2, 2013 9:33 PM
Nice Blog sivasakthi. Got to learn few things about mail adapter with attachments.
Thanks for sharing:)