<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Florin,<BR>
<BR>
Any reason why a container based on ABAP_PARMBIND_TAB couldn't be used here instead?<BR>
<BR>
Mike GT<BR><BR>> Date: Wed, 10 Sep 2008 16:14:52 +0200<BR>> From: florin.wach@gmx.net<BR>> Subject: ABAP-OO Workflow Rule Resolution<BR>> To: sap-wug@mit.edu<BR>> <BR>> Hi Wuggies,<BR>> <BR>> I have just stumbled over an issue with the rule resolution by "function module" using ABAP-OO, as the container is not passed as a reference to IF_SWF_CNT_CONTAINER nor as a persistent XML-reference (as the check and receiver function modules do). So there's currently a small GAP.<BR>> <BR>> <BR>> The requirement was, to pass the persistent object reference (structure SIBFLPOR) and/or the object instance (TYPE REF TO ---type---) to the role-container (AC_CONTAINER).<BR>> <BR>> The straightforward(?) solution was:<BR>> - Create a container element "LPOR" with struct-reference to type SIBFLPOR<BR>> - Create a public attribute MS_LPOR and assign this in the binding to the rule (Releasable->MS_LPOR --> LPOR)<BR>> <BR>> A little bit of a suprise was, that the binding checks returns with an error, saying that that assignment is just incompatible. That was true in the way, that the instance-attribute MS_LPOR was treated as it was a TYPE-REF-TO definition. So the only eligible target type for the binding was a TYPE-REF-TO definition.<BR>> <BR>> However. I have changed the container stuff and now having a new element RELEASALBE with a TYPE-REF-TO definition and within the dataflow I just pass the _wi_object_id itself. Now the binding checks is fine.<BR>> <BR>> On runtime now, the following coding will /not/ work, to retrieve the object instance:<BR>> <BR>> DATA: releasable TYPE REF TO Z_CL_RELEASABLE.<BR>> swc_get_element ac_container 'Releasable' releasable.<BR>> <BR>> Because the "new" ABAP-OO elements are passed in a way, that the old BOR-container macros cannot work with.<BR>> <BR>> On the other hand, the rule interface does not (!) provide the ac_container as an object referring to IF_SWF_CNT_CONTAINER (or something like this).<BR>> <BR>> So this is, how it works:<BR>> <BR>> Create a new import parameter (optional, pass-value) for future use:<BR>> ACTOR_CONTAINER_OO TYPE REF TO IF_SWF_CNT_CONTAINER Container: Implementing Class<BR>> <BR>> <BR>> "... further in coding<BR>> <BR>> * The ABAP-OO container object is currently not designed by SAP. This<BR>> * part is not yet fully compatible to the new ABAP-OO-Workflow.<BR>> * Therefore we will help ourself here and create it backwards from<BR>> * the BOR-container.<BR>> * If the interface is correctly(!) used in the future, then we will<BR>> * also use, what the standard gives us.<BR>> IF actor_container_oo IS INITIAL.<BR>> CALL METHOD CL_SWF_CNT_CONTAINER=>IF_SWF_CNT_CONVERSION~CREATE_FROM_BOR_CONTAINER<BR>> EXPORTING<BR>> values = ac_container[]<BR>> RECEIVING<BR>> container = actor_container_oo.<BR>> ENDIF.<BR>> <BR>> DATA: releasable_oo TYPE REF TO Z_CL_RELEASABLE.<BR>> swf_get_element actor_container_oo 'Releasable' lo_releasable.<BR>> "no it's fine :-)<BR>> IF NOT sy-subrc EQ 0.<BR>> "Handle exceptions here<BR>> ENDIF.<BR>> <BR>> <BR>> <BR>> Take care,<BR>> Florin<BR>> _______________________________________________<BR>> SAP-WUG mailing list<BR>> SAP-WUG@mit.edu<BR>> http://mailman.mit.edu/mailman/listinfo/sap-wug<BR><BR><br /><hr />Try Facebook in Windows Live Messenger! <a href='http://clk.atdmt.com/UKM/go/111354030/direct/01/' target='_new'>Try it Now!</a></body>
</html>