‎2008 Jul 09 5:43 PM
I'm trying to get the element container 'ReqReq'.
The code is:
*Begin code
DATA: v_reqreq TYPE swf_object.
CALL FUNCTION 'SWW_WI_CONTAINER_READ'
EXPORTING
wi_id = p_wi_id
IMPORTING
wi_container_handle = v_wi_container_handle_task
EXCEPTIONS
container_does_not_exist = 1
read_failed = 2
OTHERS = 3.
swf_get_element v_wi_container_handle_task 'ReqReq' v_reqreq.
swf_get_property v_reqreq 'RequirementRequest' v_sc_number.
*End code
But the bolded sentence is not working correctly, the sy-subrc is set 1. Debugging the sentence appear a type conflict:
* *
The element 'ReqReq' at container is declared as BO Object type BOR BUS2121. How can I get the element container? In which moment should I indicate that the object type is BUS2121? Is correct to declare the variable 'v_reqreq' as type 'swf_object'?
Obviously, the 'RequirementRequest' property is neither get correctly since the 'ReqReq' element is not get.
‎2008 Aug 22 10:52 AM
call SWW_WI_CONT_READ_SINGLE_OBJECT in order to get object key then call SWW_WI_READ_CONTAINERS_OF_OBJ to read attributes of object
‎2008 Aug 22 5:11 PM
Hello,
Use function module SAP_WAPI_READ_CONTAINER, it will return a simple name-value pair table.
You will have more luck with this type of question in the workflow forum. although this one is called ABAP Objects, it refers more to ABAP objects in the class sense rather than BOR objects.
Cheers,
Mike