<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Florin,<BR>
&nbsp;<BR>
Any reason why a container based on ABAP_PARMBIND_TAB couldn't be used here instead?<BR>
&nbsp;<BR>
Mike GT<BR><BR>&gt; Date: Wed, 10 Sep 2008 16:14:52 +0200<BR>&gt; From: florin.wach@gmx.net<BR>&gt; Subject: ABAP-OO Workflow Rule Resolution<BR>&gt; To: sap-wug@mit.edu<BR>&gt; <BR>&gt; Hi Wuggies,<BR>&gt; <BR>&gt; 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>&gt; <BR>&gt; <BR>&gt; 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>&gt; <BR>&gt; The straightforward(?) solution was:<BR>&gt; - Create a container element "LPOR" with struct-reference to type SIBFLPOR<BR>&gt; - Create a public attribute MS_LPOR and assign this in the binding to the rule (Releasable-&gt;MS_LPOR --&gt; LPOR)<BR>&gt; <BR>&gt; 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>&gt; <BR>&gt; 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>&gt; <BR>&gt; On runtime now, the following coding will /not/ work, to retrieve the object instance:<BR>&gt; <BR>&gt; DATA: releasable TYPE REF TO Z_CL_RELEASABLE.<BR>&gt; swc_get_element ac_container 'Releasable' releasable.<BR>&gt; <BR>&gt; Because the "new" ABAP-OO elements are passed in a way, that the old BOR-container macros cannot work with.<BR>&gt; <BR>&gt; 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>&gt; <BR>&gt; So this is, how it works:<BR>&gt; <BR>&gt; Create a new import parameter (optional, pass-value) for future use:<BR>&gt; ACTOR_CONTAINER_OO TYPE REF TO IF_SWF_CNT_CONTAINER Container: Implementing Class<BR>&gt; <BR>&gt; <BR>&gt; "... further in coding<BR>&gt; <BR>&gt; * The ABAP-OO container object is currently not designed by SAP. This<BR>&gt; * part is not yet fully compatible to the new ABAP-OO-Workflow.<BR>&gt; * Therefore we will help ourself here and create it backwards from<BR>&gt; * the BOR-container.<BR>&gt; * If the interface is correctly(!) used in the future, then we will<BR>&gt; * also use, what the standard gives us.<BR>&gt; IF actor_container_oo IS INITIAL.<BR>&gt; CALL METHOD CL_SWF_CNT_CONTAINER=&gt;IF_SWF_CNT_CONVERSION~CREATE_FROM_BOR_CONTAINER<BR>&gt; EXPORTING<BR>&gt; values = ac_container[]<BR>&gt; RECEIVING<BR>&gt; container = actor_container_oo.<BR>&gt; ENDIF.<BR>&gt; <BR>&gt; DATA: releasable_oo TYPE REF TO Z_CL_RELEASABLE.<BR>&gt; swf_get_element actor_container_oo 'Releasable' lo_releasable.<BR>&gt; "no it's fine :-)<BR>&gt; IF NOT sy-subrc EQ 0.<BR>&gt; "Handle exceptions here<BR>&gt; ENDIF.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Take care,<BR>&gt; Florin<BR>&gt; _______________________________________________<BR>&gt; SAP-WUG mailing list<BR>&gt; SAP-WUG@mit.edu<BR>&gt; 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>