cancel
Showing results for 
Search instead for 
Did you mean: 

send email used output management in TM

Former Member
0 Kudos

Dear expert,

        we has a requirement to send a email in the tm , as we know tm provide this function in the output mangement,

but i don't know how to do this, can anyone tell how to send email used output mangement in the tm, thank you.

Message was edited by: Michael Appleby

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member630642
Discoverer
0 Kudos

Hello Pioneer,

  There are several ways by which you can add email recipients to actions that can be triggered from SAP TM, either manually or automatically. Some of the most common ones are as follows:

1. PPF Customizing: As you will be aware, Output Management (OM) in SAP TM is built upon PPF (Post Processing Framework).

In the 'Conditions Configuration', you can add the email recipients to the PPF Actions under Processing Details tab -> Recipients as shown in the image below.

When a trigger of this particular Action Definition is created, the recipients maintained in this customizing activity are picked up and added to the 'Recipients' section under 'Communication Details' for actions of type 'External Communication' in the OM tab on various TM UIs.

2. Adding Recipients on the UI: You can manually add recipients to the triggers on the TM UI. For this, navigate to the 'Output Management' tab, select an action of the type 'External Communication', mark the 'Email' check box and add email IDs to the 'Recipients' section under 'Communication Details' tab.

3. Agent Class: As you know, various PPF Profiles are attached to TM Business Objects and their respective Nodes via 'Output Agents'. Each of the agents has an 'Agent Class' attached to it. Various methods contained within the agent class are invoked when triggers for PPF Actions belonging to associated PPF Action Profiles are generated/executed.

The method: COMPLETE_SEND can also be used to pass on recipients for individual triggers. We can create recipients objects and then add them IO_SEND.

When you create a trigger, this method ill be invoked. You can check the action via the parameter IS_PPF_ACT and then add recipients to IO_SEND.

Hope this helps.

Regards,

Varun

AshishV
Explorer
0 Kudos

Hi Varun,

Can we customize your 2nd option - Adding Recipients on the UI? We have requirement where need to send email to the carrier with the attachment.

Regards,

Ashish

former_member630642
Discoverer
0 Kudos

Hello Ashish,

  Option 3 that I have mentioned is just what you are loking for. Here you can programtically add the recipient's email ID to the triggers.

As mentioned in my earlier reply, you have to re-define the method: COMPLETE_SEND of the respective agent class wherein you can pass the Carrier's Email ID to triggers.

Once this is done, the email ID will be shown in the Recipient section of the Communication Details tab in the OM part of the business documents.

When you excute the action, the email will be send along with the attachment to the carrier's email ID.

Regards, Varun

kiran_chowdary3
Explorer
0 Kudos

Hello Varun,

I was following your option 3 , where i have re-defined the method COMPLETE_SEND and tried to modify the Recipient Email id, Body and Subject. and put logic to modify the datas of IO_SEND.

But couldn't see any changes reflecting in the OM->Communication details or external break point isn't triggering either . Am i missing anything at the configuration level , please suggest.

Regards

Kiran Kumar P.

former_member630642
Discoverer
0 Kudos

Hello Kiran,

  Are you using a standard TM PPF Action (starting with /SCMTMS/*) or a custom defined PPF Action.

  For Standard TM PPF Actions, the break-point should hit the COMPLETE_SEND method of the Agent Class.

  However, for custom PPF Actions, you have to create an implementation for the BAdI: COMPLETE_PROC_PPF and maintain the filter values based on your namespace for PPF Profiles and PPF Actions. Also, the code in the methods can be copied from the standard Implementation class: /SCMTMS/CL_IM_COMPLPROCPPF.

Regards, Varun

kiran_chowdary3
Explorer
0 Kudos

Hello Varun,

Thanks for the reply , Your Suggestions really helped me a lot.

I had created an implementation for BADI /SCMTMS/CL_IM_COMPLROCPPF and wrote our logic in method complete_send.

We could auto populate the email Subject, email body , Sender and Recipient in OM Communication details , the only part we couldn't accomplish was Document Name/Attachments Name.

We have tried to use method CL_DOCUMENT_MANAGER_BCS_PPF=>CHANGE_document to edit the form name(Currently it is picking the name from PPF action Profile form name). Where we had Form name to be dynamically with FO details.

Can you help me that value as well ,Suggest where we can Edit the Attachment details, I have tried every possibility but I ended up Failing. Please find the below coding block I tried in method complete_send.

Thanks in Advance.

Regards

Kiran Kumar P