Whenever workflow has been implemented on your system, setting up eCatt processing can be quite a challenge. Here's how it can be done. Workflow work items can be executed in different ways. The user inbox is of course the most common one, but working through this inbox when setting up your eCatt session is quite impossible. An alternative would be transaction SWIA
- "Execute work item as Administrator". This transaction allows you to enter a work item ID (which can be obtained via selection) which should produce a single-line result report. An even "closer to reality" approach would be using transaction SWI1
- "Work item selection" which would allow execution not as Administrator (like trx SWIA
) but as regular user.
Approach:
- Obtain work item ID number you would like to execute, mainly table
SWWWIHEAD
could be used for this (see more details on how to do this in the example) - With this work item ID number, start transaction
SWI1
in aTCD
recording session, enter the work item ID number in the selection screen and execute the report - (still in the above
TCD
) select the only item reported and selectOKCODE
"APRO" - "Execute work item". In the menu: Edit => Work item => Execute work item - The work item will execute immediately and further
TCD
session steps may follow.
Obtaining a workflow work item number:
Looking for a work item ID for a given case involves accurate selection. This example is about a vendor where the actual task ID is predefined ("TS97800013").
ABAP. "indicate ABAP programming code in an eCatt tables: swwwihead. data: l_lifnr(10), l_wi_text like swwwihead-wi_text, l_date like sy-datum. check not ( v_lifnr is initial ). write v_lifnr to l_lifnr. l_date = sy-datum - 1.
The search is done for a recent work item of the right type, in which relevant key information is held in the work item title.
concatenate '%' l_lifnr '%' into l_wi_text. select single wi_id into v_wi_id from SWWWIHEAD where wi_text like l_wi_text and wi_stat eq 'READY' and wi_cd ge l_date and wi_cd le sy-datum and wi_rh_task eq 'TS97800013'. if v_wi_id is initial. v_subrc = sy-subrc. wa_message-msgtx = 'No workitem found.'. append wa_message to v_message. endif. ENDABAP.