Hi Kavita,
do one thing first test this functional module as the same way..
pass the WORKITEM_ID number to this function module
SAP_WAPI_OBJECTS_IN_WORKITEM
you will get the object key and object type. like below.
pass the ext value like this
into this function module SREL_GET_NEXT_RELATIONS then you will get the guid of that lead.
based on guid you will get the lead status what ever.
write the code in get_method only
procedure to write in get_yourfield_method.
DATA: ls_wi_attributes TYPE crmt_ct_inbox_wf_root_attrib,
lv_value type SWW_WIID.
* References
DATA: lrf_current_wi TYPE REF TO if_bol_bo_property_access,
lrf_current_wi_mixed TYPE REF TO if_bsp_wd_ext_property_access. "It is a mixed Node with Value Attribute(s) now
lrf_current_wi_mixed ?= iterator->get_current( ).
* Get actual BOL Entity (mixed Node)
lrf_current_wi = lrf_current_wi_mixed->get_model_node( ).
CHECK lrf_current_wi IS BOUND.
rf_current_wi-> get_property_as_value( EXPORTING iv_attr_name = 'WI_ID' IMPORTING ev_result = lv_value ).
check lv_value is bound.
pass this value into this function module SAP_WAPI_OBJECTS_IN_WORKITEM.
again pass the value into srel_get_next_relations funtion module.
you will get guid.
pass that guid into crmd_orderadm_h table you will get your value.
value = yourvalue.
example code how to write the code in get method.
Thanks & Regards,
Srinivas.