on 04-22-2009 6:31 AM
Hi All,
I just want to know if we can send a flat file(Rather Than the XML) with content conversion using Mail Adapter. If yes then what are all the possible ways for this.
I have tried but i am sucessful in sending the complete payload as a XML file, but i want the file with the content conversion, so that this should be able to picked by the third party systems.
Will be oblidge if any supported blog or pdf is provided for the same.
Thanks in Advance.
Jay
Abhishek,
I can't see the two options that are suggested by you in my Sender Mail Adapter CC.
However i can see only one option under MAIL ATTRIBUTES which is CONTENT ENCODING.
I am using the XI 3.0 with the service pack level = 15.
Your suggestion/guidance will be highly appreciated.
Thanks,
Jay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Now for the negative items, i want to send them back to business as flat file format
using the mail adapter as attachment. This will help them to process the file as for there
requirement.
Since you need to send an email message you have to use the format mentioned here: (S-UserID required)
https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt
Save this file as an XSD in you local system and upload it as an External Definition in your XI server.
Develop MI based on this External Definition (IN, ASYNC)
Create an Interface Mapping with Source as the file containing Negative items and target as the above developed MI
Now you need to develop an XSLT mapping (can use StylusStudio to do it) between the source and target Message Types
This XSLT mapping has to be designed in such a way that it extracts the payload out of the Negative Items message and maps it to the target (Content) field....you need to use CDATA element of XSLT here.
In this mapping itself you can define to what email-id you want to send the message.....
Everything happens on the XI --> Business service side...so it is not the sender channel but is the receiver channel:)
Your XSLT mapping will look something like:
<Mail>
<Content>
XSLT CODE
</Content>
</Mail>
where Mail and Content are the tags in the email message format...the External definition one.....
If you are new to XSLT then refer to my answer in this thread...
regards,
Abhishek.
Thanks Shabarish/Prateek,
I will look into all the possible solution and as for your suggestion, yes we should go for the standard one
rather than the workaround.
I will definitely look at this and may get back to you guys if i get stuck off.
Thanks a lot.
Best Regards,
Jay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks a lot for your support and suggestion.
Abshishek point is assigned to you & thanks a lot .
@ Prateek/Shabarish,
Thanks for your suggestion.
But i believe we are posting the threads over here to clarify our doubts by looking forward your valuable suggestions. I know u guys have good indepth knowledge in this platform but that doesnot mean that all are at the same level.
I just extended this thread to gather more clarification before approaching a solution. Hope this clarify your kind concern.
Thanks,
Jay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jay,
when you design something always look for an optimum solution.
We suggested the messagetransformbean because that is the standard used module for such purposes.
There are always alternative. I can personally suggest a solution that can be done via a XSLT mapping/Java Mapping or even a custom module, But why go for that when you already have a solution by SAP themselves
But then the choice is for you to make.
Good to know you do have a solution at hand.
>
> Hi All,
>
> I just want to know if we can send a flat file(Rather Than the XML) with content conversion using Mail Adapter. If yes then what are all the possible ways for this.
> I have tried but i am sucessful in sending the complete payload as a XML file, but i want the file with the content conversion, so that this should be able to picked by the third party systems.
>
> Will be oblidge if any supported blog or pdf is provided for the same.
>
> Thanks in Advance.
> Jay
for content conversion you can use the messagetransformbean
http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks a lot for your quick responce.
@ Ramakrishan- I am looking at the same thread suggested by you, but that basically is shown where we are getting the file(Flat Format) as an attachment and converting that to XML format to read by PI.
Here i am getting a file,processing it in PI and want to send the content of the file as a flat file format.
@Abshik - Let me clear the things:
Suppose For Ex:
I am getting a file with both positive items and negative items. Now i want to process the file in PI and send all the positive items to SAP system ( Which is OKAY for me). Now for the negative items, i want to send them back to business as flat file format using the mail adapter as attachment. This will help them to process the file as for there requirement.
I dont think that is anywhere releated to XSLT mapping .. Correct me if i am wrong ..
All your suggestion are most welcome..
Thanks a lot,
Jay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont think that is anywhere releated to XSLT mapping
Strange.....
In the [Mail message format |https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt]there are two fields (out of many others)....
[1) Content_Type
2) Content
If you map Content_tyep field with constant "plain/text" your payload will be converted to text format
The payload will be present in Content field
Now when I worked on Mail scenario I had to use XSLT mapping to convert the entire incoming message to a string so that it can accomodate in the Content field....Message Mapping is incapable to do this....and as I am a bit weak on JAVA I could not opt for it (also possible with JAVA Mapping)
Regards,
ABHISHEK
Edited by: abhishek salvi on Apr 22, 2009 11:45 AM
Edited by: abhishek salvi on Apr 22, 2009 11:46 AM
Hi,
If I get your requirement right then you need the following thing:
1) Get the file in XML format from some sending system
2) Convert this XML file into flat file
3) Send this flat file to some receiver
If your requirement is as above then you can convert the incoming XML message to flat file in XI/PI and that too without any adapter module:)
You just need an XSLT mapping to convert the XML to Flat FIle.....just search SDN for XML to string conversion and you will get it.
By using XSLT mapping I mean you will get the output as follows:
<SRC>
<Name>Abhishek</Name>
<Country>India</Country>
</SRC>
With XSLT output will be:
<TRG>Abhishek India</TRG>
Regards,
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jay,
File Content Conversion option is available only in File Adapters.
Best Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
[How to Configure sender Mail Adapter|http://help.sap.com/saphelp_nwpi71/helpdata/en/23/c093409c663228e10000000a1550b0/frameset.htm]
[Mail Adapter|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05]
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.