on 07-07-2017 3:21 PM
Hi,
I have to send a file as an attachment through email and attachment should be convert it into ".xlsx" format(in mail attachment file should be .xlsx formate) in Pi 7.31 sp 10
1.In sender side we have .txt file - we are using File FCC
2.In receiver side we have to get an attachment as .xlsx - we are using Mail adapter
3.In mapping we did one to one mapping
and in receiver module we use "localejbs/AF_Modules/MessageTransformBean"
So we converted the file into .xlsx format but we are unable to open the file.
Can any buddy help me out how to resolve this issue..
Thanks,
Siva
Hi Siva,
Using Format Conversion Bean is definitely a good idea. Deploy this properly and check in Application Module. If it is deployed properly. you should get the desired result.
Another Solution -
What about splitting this into 2 separate interfaces to make the requirement a bit easier.
1) First interface will be File (FTP) -> PI -> File (NFS) --- This will read txt file convert the txt into an excel file. You can achieve this easily by JAVA mapping/XSLT mapping.
2) File to Mail scenario. This will send the mail with required subject file and body along with the excel as an attachment.
Please let me know if you need any lead.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apu,
Thanks for reply, I tried with splitting,
1. First i did File to File Using Format conversion Bean, it creating .xlsx file and i am able to open the file normally, 2.Coming to second File to Mail could you please suggest me how to read the excel file and sent the same file as attachment with same format (.xlsx) in the mail.
Thanks,
Siva
Hi,
You can follow this. It will definitely help you to complete your scenario step by step.
File to Mail with Dynamic attachment name
Thanks,
Apu
You gotta use adapter module to achieve this.........using mail package is depricated.
Siva,
The 0x09 works only for excel file with .xls extension . For .xlsx you need to use custom java / module.
Try renaming the filename extension to .xls
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
Sorry for the late reply, i tried with this link
https://blogs.sap.com/2014/11/03/exceltransformbean-part-2-convert-simple-xml-to-various-excel-forma...
in out put we are getting xml format as output but we need in .xlsx format.
I need clarify one more thing Our Current SAP PI version is 7.31 SP10 is it possible to convert the file in .xlsx format with this version ?
Thanks,
Siva
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.