Skip to Content

IF_WAPI_WORKITEM_CONTEXT~GET_WORKITEM_ID

Hi,

am working on requirement where I have to update few things in SAP, when a mail is sent from Outlook to a SAP email-id (Inbound).

I happened to get a blog on 'Offline Approval' which does somewhat similar thing.

But in this blog to read workitem id 'after creation' for a decision step which is handled thru a Program exit where there is a code as below:

CALL METHOD wi_context->get_workitem_id RECEIVING re_workitem = l_wi_id.

But when I use this, I get an exception where I do not see the workitem id being captured in 'l_wi_id'.

Error that I get CX_SY_REF_IS_INITIAL for CX_SY_NO_HANDLER.

My question is what must have gone wrong in this code or is there any other way to get workitem id.

Thanks

Aditya V

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Apr 18, 2017 at 01:48 PM

    Hi,

    Please check the below wiki. Probably you should try with get header.

    Thanks, Pavan

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 25, 2017 at 09:17 AM

    hi

    anyone tried to capture 'workitem id' of a workflow step thru a program-exit?

    I tried using 'get_workitem_id' method but it isnt capturing any workitem. any inputs highly appreciated.

    Thanks,

    Aditya V

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 27, 2017 at 07:35 AM

    Hi,

    is there a way that I could debug the exit-code, like whenever I run the WF, it should go to the code.

    I know if I run WF, it addresses WF-BATCH which is a SYSTEM user and break-point that I set is from DIALOG user.

    Thanks,

    Aditya V

    Add comment
    10|10000 characters needed characters exceeded