cancel
Showing results for 
Search instead for 
Did you mean: 

Display Material Document from Workflow Email

former_member184675
Active Participant
0 Kudos

Hi all,

Please help me with the following.

Upon material document creation (BUS2017 - CREATED) I start a workflow that ends up sending in-sap emails  (SELFITEM - SENDTASKDESCRIPTION ) to notify them that the document has been created.

When the user received the email, I would like him/her to be able to drill down to the MB03 / MIGO TCODE and view the document.

So far i've been able to either send the email containing the material document &BUS2017-MATERIALDOCUMENT&

OR 

send a workitem for BUS2017-DISPLAY method.

I want to attach the Display Method Workitem to the Email, or any other solution to achieve the above mentioned task.

Thank you in advance,

Andrei

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Andrei,

If you want the instance in SOFM object format to make it available in attachment, add a activity step with method 'GENERICINSTANTIATE' of business object 'SYSTEM', here pass key field of BO BUS2017 and BO name to parameters objectkey and objecttype.

Instance in SOFM format can be send to task container element _Attach_objects

Thanks,

Deb

former_member184675
Active Participant
0 Kudos

Thank you !

It worked. Now i just have to add a description to my attachment and it's done.

.. and yes , I also have to understand workflows..but that's another story

-

Best regards,

Andrei

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you want to send an email with workitem as an attachment, you need to set Extended notifications or using RSWUWFML2 program ( based on your system version).

Above methods will send the workitems as emails. You will find many documents in SCN on how to use them.

Regards,

Murali Krishna.

former_member184675
Active Participant
0 Kudos

Hi ,

Thank you for your answer. So you're telling me that instead of sending an Email with Workitem, I have to notify the user about a created workitem  ?

But is there any other way to send an in-sap email that contains the material document as text and when users clicks on "it" to go to MB02 TCODE ?

Former Member
0 Kudos

Hi Andrei,

Is you have any approval for your workflow or just want to send an email from workflow?

If you have approval workitem[dialog workitem which goes to Inbox] then open the binding editor of this task and bind BUS2017 to workitem_objects.

Then use SWNCONFIG transaction to configure extended notifications.

This will send the notification with attachment to the approvers. The work item also will have the same screen as attachment .

Thanks,

Vijay.

former_member184675
Active Participant
0 Kudos

Hi Vijay,

No, I don't have approval.

It's like this: the customer wants to be informed when a material document (stock movement) is created in the system.

So i send him/her an email saying that : Material Document 50000001 - 2015 has been created.

But the customer requested to be able to drilldown from the email message directly into MB02 (or MIGO) TCODE, much like CALL TRANSACTION.

That is all I need to achieve. I will look into both your and Murali's answer and check Extended Notifiations. From what I understand, Extended Notifications will inform the user upon active work items that require his/her attention. This might be the solution, although I am hoping for a much simpler one.

-

Andrei

former_member185167
Active Contributor
0 Kudos

Hello,

You just want an email, no need for a workitem or Extended Notifications.

Try binding an object (or class) instance to the email, see if a link appears.

regards

Rick

SandySingh
Active Contributor
0 Kudos

Hi Andrei,

It is possible to send the transaction link in the email but this might have a single sign-on related issues.

I managed to get this working via NWBC. Let me know if there are issues. I can provide more info.

call method cl_nwbc=>url_construct

Refer to SDN threads below for your reference

http://wiki.scn.sap.com/wiki/display/Snippets/Creating+a+SAP+shortcut+for+any+transaction+and+sendin...

Regards

Sandy

former_member184675
Active Participant
0 Kudos

Hi,

I'm trying to:

I can bind BUS2017 from Workflow to BUS2017 from Task.

But I don't know what to bind BUS2017 from Task Container to the Method SENDTASKDESCRIPTION of SELFITEM.

Workflow  BUS2017 --- > Task BUS2017 --- > ??? SELFITEM?

If I try to bind Task BUS2017 to SelfItem->SendTaskDescription's Attachments i get error that i can't bind BO to SOFM.

former_member184675
Active Participant
0 Kudos

Hi Sandy,

Thank you very much for your reply, but this is an in-sap mail. The users opens it from SBWP Tcode. I'm not sure if your solution applies to my scenario.

SandySingh
Active Contributor
0 Kudos

Ok so you are using SBWP inbox ! 

Then you can try class CL_SWN_URL_GENERATOR method GET_INBOX_URL_WINGUI. It generates an url to start transaction SO01 .

Refer to interesting thread below: Last 3 comments are more relevant.

Regards

Sandy

former_member186746
Active Contributor
0 Kudos

Hi,

If that is the case(i.e. users use their SAP Business Workplace), then simply send them a user decision with the option to go to MIGO transaction. When they choose the goto transaction place a task in that thread with advance with dialog on the user will immediately go to the transaction.

Kind regards, Rob Dielemans