on 05-30-2011 4:44 PM
Hi Expert,
I have a scenario where I have to pick up a file from FTP using sender File adapter and send this file as an attachment using Receiver Mail adapter.
There are 3 requirements :
1) File name of the attachment in the Mail should be same as the File picked from FTP.
2) The Mail content should be "Please find attached the <Filename> for your reference.
i.e The content has to be dynamic
3) Subject of the Mail should be dynamic e.g : Apple_<Filename>
I am facing the following issues :
1. Since single File is picked up,the file is going as an payload and not as an attachment.As a result when i am doing message mapping,i am getting the error saying "Content is not allowed in prolog" in SXMB_MONI or Runtime workbench.
2. Since we have dynamic requirements, i have to Use "Use Mail Package" option.It implies that i have to use Message Mapping.But if i use Message Mapping,i get the error "Content is not allowed in prolog".
I understand that most of the experts would ask me to write UDF's, but if i use UDF i am getting the "Content is not allowed in prolog" error.
Thanks
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Saurabh,
I am not sure if your original problem got solved or not. The following blog helped me to solve the same issue.
Regards,
Aman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>>When i am using sender File adapter (considering i am picking TXT file), is the TXT file converted to XML?
Yes. It will convert text file to xml file, if you are using Sender File Content Conversion(Sender side).
If everything goes fine, then you can visible xml file in payload by using the T.code SXMB_MONI.
Hope this helps.
Regards,
P.Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saurabh
Try using PayloadSwapBean:
http://help.sap.com/saphelp_nw70/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm
"Content is not allowed in prolog" could be caused by some encoding issue.
Regards,
Giuseppe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Giuseppe,
Thanks for your prompt reply.
Since i have only one payload, i cannot use the PayloadSwapBean.
From what i understand, since i am using the File adapter, the file is picked up as the payload and not as an attachment.
Now while doing Message Mapping,how should i pass this payload (which is actually the content of the file that is picked up) to the Content field of the Mail adapter.
Thanks
Saurabh
Now while doing Message Mapping,how should i pass this payload (which is actually the content of the file that is
picked up) to the Content field of the Mail adapter.
You surely cannot do this with the normal Message Mapping.
Search SDN for " XML to String" ....you can find XSLT/ JAVA mappings using which you can pass the input payload to the Content Field.
If you have a flat text file and you want to convert it to XML you need to define content conversion on sender file adapter.
How to set content conversion in sender file adapter is explained here:
http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Regards,
Giuseppe
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.