Skip to Content
author's profile photo Former Member
Former Member

Workitem ID / Workitem through event Question

Hi I have a requirement that I need to send few details from an ABAP report as a workitem to certain users.Iam using the module 'SWE_EVENT_CREATE' to trigger an event linked to a task which sends the workitem. This is working fine.

I need to send an EXCEL attachment in the same workitem is it possible?

I tried using SAP_WAPI_ATTACHMENT_ADD in the method but didn't know how to retrieve the work item ID in the run time..is there a better way to achieve this requirement or a way to find the work item ID in the method

Thanks for your help!

Larry

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 19, 2011 at 04:53 AM

    Hi,

    Please use any of follwing Fm to start for the workflow directly. You can find the workitem id in as the export paramenter.

    SWW_WI_START_SIMPLE : General Task not required

    SWU_START_WORKFLOW : General Task not required

    SAP_WAPI_START_WORKFLOW : General Task Required

    EWW_WORKFLOW_START : General Task not required

    Thanks and regards,

    SNJY

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 19, 2011 at 06:39 AM

    Hi,

    What does the workitem do?

    Couldnt you just send the attachment though a mail step.

    Otherwise you have to create a workflow linked to this event and in the workflow a step to retrieve the correct attachment and then to add it in the binding of the task you're using at the moment.

    Kind regards, Rob Dielemans

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 19, 2011 at 09:42 AM

    Hi ,

    As Rob suggested go for SO_NEW* function modules if you just want to send mails with attachments to tthe given users.

    However if you have some sequence of tasks to be completed after you send mail, you need to create workflow( as it appears you have done). About the Workitem ID , you can use the &_WORKITEM.WORKITEMID& available in the binding and read it using relevant macro .

    Regards

    Gautam

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 19, 2011 at 09:48 AM

    Hello,

    Please use SAP_WAPI_CREATE_EVENT and not SWE_EVENT_CREATE (and definitely not SAP_WAPI_START_WORKFLOW).

    regards

    Rick Bakker

    hanabi technology

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.