Skip to Content
0
Apr 18, 2017 at 01:35 PM

IF_WAPI_WORKITEM_CONTEXT~GET_WORKITEM_ID

197 Views

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