cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment to Mail step in workflow

Former Member
0 Kudos

Hi All,

I am trying to put attachment in my Send Mail Step in workflows. But somehow i am not able to do that

I have also tried the following way to attach the business object but thats even not working

1) Go to PFTC select the std. Task and enter 80000288 (Send Mail Task defined)

2) Copy it to a Custom Task

3) Go to that Custom Task, then click the Container Tab

4) Create a Element a popup will appear, Give the BO name BUS2007.

5) Save it and generate the binding

6) The go to the SWDD, navigate to user decision for that workflow

7) Go to Control Tab and give that Custom Task which you created and generate the binding.

Please help me in knowing the way to attach the business object with the mail, in such a way that it opens in change mode and then when user performs any action on the maintenance order, further step of workflow can be triggered.

I'd be thankful

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

IF you want to attach something to an email, then you need to locate the email sending step in your workflow template (transaction SWDD). Open the step and the control tab. Open the binding editor. There you should be able to bind the object to the Attachments container of the email sending task. (BUS2007 on left side, and attachment of the right side).

EDIT: It could be that you need to do the binding to the _attach_objects instead of attachments (cannot remember which one it was).

Regards,

Karri

Former Member
0 Kudos

Hi Karri,

you're always there to help. thanks for that

I tried doing it this way, but its giving me this error, please find in screen shot

Please help me resolve this.

thanks in advance

Former Member
0 Kudos

Try the attach_objects_ instead of the attachments. The attachments might be for actual attachment files (PDF, word, etc.).

Regards,

Karri

Former Member
0 Kudos

In either ways it is not working. i tried with both the ways

please find below the screen shot... Any other way to do this?

please help, its a very critical requirement, and i dont know how to cater it

Former Member
0 Kudos

Remove the attachments from the binding. It is causing the error message.

Oops, it didn't work for me too.

Regards,

Karri

Former Member
0 Kudos

So, any way out to this problem?

May be if i can achieve it by any other technique?

Please help..

I'd be thankful

Former Member
0 Kudos

Hmmm, I remembered that this was so easy as just binding the object to the email step, but I guess it is not?

Perhaps you could just create a shortcut file before the email sending step (in your own background step) with SWN_CREATE_SHORTCUT. Then you could attach this to the email (bind it to the attachment similarly what you tried to before). I think you should be able to find some examples if you search with the function name I mentioned.

Regards,

Karri

Former Member
0 Kudos

Can you please tell how to create shortcut step wise... I'm not clear as to how the shortcut will be created with SWN_CREATE_SHORTCUT....

and then how to attach it as well.

Thanks for providing me with a solution

anjan_paul
Active Contributor
0 Kudos

Hi,

  Also please check with bindin _Adhoc_Objects

SandySingh
Active Contributor
0 Kudos

Hello

You can refer to program RSWUWFML2 to see how a shortcut is attached to an email.

PERFORM add_shortcut_inbox at line no 1266.

data :  pt_attach       TYPE      soli_tab.

*- create the shortcut as table

   CALL FUNCTION 'SWN_CREATE_SHORTCUT'

     EXPORTING

       i_transaction           = 'SO01'                      "#EC NOTEXT

*     I_REPORT                =

*     I_SYSTEM_COMMAND        =

*     i_parameter             =

       i_saplogon_id           = l_logon_id

       i_sysid                 = sy-sysid

*     I_GUIPARM               =

       i_user                  = p_user

       i_language              = p_langu

       i_windowsize            = 'Normal window'             "#EC NOTEXT

*     I_TITLE                 =

       i_custom                = l_scrap

     IMPORTING

       shortcut_table          = pt_attach

*     SHORTCUT_STRING         =

     EXCEPTIONS

*     INCONSISTENT_PARAMETERS = 1

       OTHERS                  = 1.

   IF sy-subrc <> 0.

     REFRESH pt_attach.

   ENDIF.


Regards

Sandy

Answers (3)

Answers (3)

0 Kudos

Hi,

You cam simply do it using step 'Container operation':

1. Create a new container element with object type BO, do not specify Object Type Name, leave this field empty;

2. Create a new step 'Container operation'. In this step assign your attachment to the new container element;

3. In the sending mail step open the binding editor, then bind your new container element to attachments.

Former Member
0 Kudos

Maria,

can you elaborate on you process of using Container Operation (step type) to pass a document attached in an initial step to a Send Mail workflow step?

0 Kudos

Hello

1. New container element:

2. Container operation step:

&LISTOBJECT& is my attached document.

3. Send mail step:

4. Result:

Hope it helps.

Regards,

Maria

pokrakam
Active Contributor
0 Kudos

Not sure what your business scenario is, but I would suggest the easiest way is to send a proper workflow task (Edit PM Order), and use Extended Notifications to generate the email. It will have the correct links and the task text in it. Tx SWNADMIN, lots of info in the online help and on SCN if you search for it.

SandySingh
Active Contributor
0 Kudos

Hello

You will have to instantiate the BOR object and pass it to _Attach_Objects in the task container

Regards

Sandy

Former Member
0 Kudos

Hi Sandy,

thanks for your reply.

Can you please tell step by step, how to do this... I am new to this.

i guess i have tried it, but still can you elaborate a bit?

Thanks in advance,