Retrieving Data for Customer Fields 
Prerequisites
You have extended the communication structure MCWF_TRANS with your own append structure.
Procedure
The function module EXIT_SAPLMCWF_001 is set as a default.
When called, the function module receives the internal table XMCWF_TRANS with the communication structure MCWF_TRANS as a table parameter. The fields defined by SAP are already filled.
Use the form routine WIS_CODING_TEMPLATE of the main program SAPLMCWF as a guide. (Transaction SE80, function group MCWF). The procedure is exactly the same.
First program an IF or CASE construction, to make sure that you analyze work items for particular tasks only. The task ID is in the field XMCWF_TRANS-WI_RH_TASK.
Use one of the two function modules SWI_READ_CONTAINER_ELEMENT or SWI_READ_CONTAINER_ATTRIBUTE within the IF or CASE construction so that each of your self-defined fields can read the appropriate data from the runtime tables.
Both function modules are called with the following parameters:
The work item ID is recognized from the field MCWF_TRANS-WI_ID.
ID of the container element.
The function module SWI_READ_CONTAINER_ATTRIBUTE also has the import parameter ATTRIBUTE (attribute of an object that is referenced in ELEMENT).
Both function modules return the value in the element VALUE.
Use this to fill the communication structure MCWF_TRANS.