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.