on 02-25-2017 12:04 AM
Hi Guys,
Need your help on the below scenario.
Usecase: REST-->PI-->Mail
UI will pass on a feedback form with an attachment that may be either (.pdf, .txt, .jpg, xlsx format). The attachment content will be passed to PI in bytearray(base64 string).
And for attachment: file type, filename and base64 string will be provided by UI.
Rest of the fields like To, From, Subject and Content will be passed in a json format.
Now we need to send a mail with attachment after reading the byte array with the file format and file name provided.
Please provide your valuable suggestions to crack this out.
Best Regards,
Sachin Jangir
Sachin,
1.Convert your json to xml in rest adapter.
2.Then convert the base64 to pdf using java mapping refer this thread:https://archive.sap.com/discussions/thread/3603150
3.Addition to this set the converted pdf as attachment with outputattachment class and use dynamic config to set the to,from etc for mail adapter
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Manoj for your inputs.
Is there any other option of achieving this without Java Mapping?
Let me know if there is other way to achieve this using UDF in Graphical mapping and standard Modules.
Incase it is not doable with Graphical mapping, I'll go with the Java Mapping option.
Also I would like to know whether we can handle the attachment with different file extension in it like (jpg, png, xlsx, txt, pdf & etc).
Best Regards,
Sachin Jangir
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.