cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc to Mail with attachment Scenario

ChRa
Explorer
0 Kudos

Hi Experts,

at the moment I'm developping a IDoc to Mail message flow.

I have to transform the IDoc to a Papinet EDI-Message.

I want to use the Mail-Package because i want to change the subject, the receiver and the content.

I also want to keep the content as text.

The question is how to create and transfer the messages for the mail and the EDI-XML-Document to the mail receiver.

The result should be a mail with Subject and content and attached the XML-EDI-Document.

Is it possible to do that with SAP PI/PO?

If yes, how can i solve the problem?

A multi-Message - Mapping with a module?

I searched a lot in the SCN, but i found no tutorial for this kind of problem.

regards,

Accepted Solutions (1)

Accepted Solutions (1)

ChRa
Explorer
0 Kudos

Hi guys,

It seems that I have to be more concret.

I want to use two mappings.

One to determine the Subject and the To of the mail

and

one to create the .XML - EDI message.

after execution of the two mappings one new Mail message using the Mail Package should be generatered.

I described the flow in the following picture.

Is it possible to do this with SAP PI/PO?

And what can be a way to do it.

in serveral Operation mapping steps?

with a module?

regards,

stefan_grube
Active Contributor
0 Kudos

This is not possible. After the graphical mapping, the original Idoc structure is no longer available, as the second mapping works on the output of the first mapping. If you have an XSLT mapping for reuse that you do not want to change, you could write a pre-mapping in Java/graphical which does not change the original structure and stores the "to" and "subject" in ASMA values. I don't think that you need to use MailPacakge at all. If you want to use it anyway, you can create it with another Java/graphical mapping.

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Christian,

This blog has Java code sample.

stefan_grube
Active Contributor
0 Kudos

You can use Java Mapping or XSLT mapping. You find here an approach for Java mapping, which has to last mapping step after the EDI mapping: http://scn.sap.com/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-email...