Skip to Content
avatar image
Former Member

How to retrieve status/data from workflow?

Hello Experts,

I have seen that saving the data in custom database table is not recommended but i got a requirement where i need to know the status of the workitem depending on the 3 fields. I need to generate a report which gives status depending on the 3 fields.How can i do it without using z-table?

Suggestions are highly appreciable.

Thanks,

Mohammed.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Sep 14, 2014 at 02:49 AM

    Hi,

    Why not just write a report that reads the 3 relevant fields?

    Or have I misunderstood.

    cheers

    Paul

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 15, 2014 at 01:57 AM

    I am not sure if I understand your question correctly. Anyhow, I have a feeling that by fields you are meaning container elements in your workflow/task? IF this is the case, you can read the container by function SAP_WAPI_READ_CONTAINER. Just give the work item ID as input parameter, and it will return you the container element values. Use this function in your report.

    Regards,

    Karri

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Mohammed,

      instead of selecting the information afterwards, I would recommend to make an instant notification to your ... functionality.

      In your case, I wouldn't recommend to write a full toolkit for workflow tracking, but instead to hook an event coupling for the WORKITEM.CREATED event, having a Check-FM, that checks for the workitem's type = F (flowitem) and the workitem's based task ID (your WS.... that you'd like to track).

      If so, the event's object key will be the flowitem ID, and you don't need to look that up with search functions.

      Use that key for the read-container stuff.

      A different solution with less trouble, but with some design flaws is, to create a background task at the time, where the container data is available in the workflow and have the background workitem perform an update on a specific index table, where you can report from.

      Florin