Workflow – Reading Container Values Using FM and Class
Hello Everyone!👋 Reading Workflow Container Values Using FM and Class If you’ve worked with workflows, you’ve likely encountered situations where you need to access container values within your program. Most of the time, we use the function module SAP_WAPI_READ_CONTAINER for this. However, there’s an alternative approach you can also retrieve container values using the class CL_SWF_RUN_WORKITEM_CONTEXT . CLASS lcl_workflow_container DEFINITION. PUBLIC SECTION. METHODS: get_value_using_fm IMPORTING iv_wi_id TYPE sww_wiid iv_element_name TYPE swfdname EXPORTING ev_value TYPE any. METHODS: get_value_using_method IMPORTING iv_wi_id TYPE sww_wiid iv_element_name TYPE swfdname EXPORTING ev_value TYPE any RAISING cx_swf_cnt_container. ENDCLASS. CLASS lcl_workflow_container IMPLEMENTATION. METHOD get_value_using_fm. TYPES: tt_swr_cont TYPE TABLE O...