<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Very strange. I presume you have tried the usual 'Update Navigation index' trick on the FM and activated it again just in case the runtime version of the program you're testing is slightly different than that called in the background?<BR>
&nbsp;<BR>
The only other thing I can think of is perhaps your role is properly initialising the new element whereas your test script is merely passing a saved string. Don't suppose your role is defaulting a value&nbsp;for the new element is it?<BR>
&nbsp;<BR>
MGT<BR>
<BLOCKQUOTE>
<HR>
Subject: RE: Testing FM with swc_get_element not getting my values in 4.6cvia se37<BR>Date: Thu, 19 Jun 2008 10:36:40 -0500<BR>From: Rick.Sample@graybar.com<BR>To: sap-wug@mit.edu<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</STYLE>

<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">Nope! Just passing in simple data types. No objects. And "attempting" to set to simple data types. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">Tried, swcont-value (since that is what they are in the container), tried simple myvar(14) type c, tried the actual data type in Fm, </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">tried upper/lower case and matched what was being passed in to name in the swc_get_element.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif"></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">99% of the time, I have no issues. This FM was working perfect until I add a new container value initiator. Same type as my zlastagent. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">Every swc_get after the new addition gives me a sy-subrc 8. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif"></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">I created a brand new Test and added in all the elements one at a time. I commented out ALL other code except the swc_get_element, and just does not get the container values.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif"></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">As I stated, I can see all my values in the ac_container. The are there and same name with the values in the ac_container. swc_get_element just simple will not get all my values in the test via se37. But, when I call the FM via roles res in task, it gets all just fine. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">Just not in the Test option in SE37. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif"></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif">Very aggravating!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_221572615-19062008><FONT face="Microsoft Sans Serif"></FONT></SPAN>&nbsp;</DIV><BR>
<DIV class=EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma><B>From:</B> sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] <B>On Behalf Of </B>Mike Gambier<BR><B>Sent:</B> Thursday, June 19, 2008 10:00 AM<BR><B>To:</B> SAP Workflow Users' Group<BR><B>Subject:</B> RE: Testing FM with swc_get_element not getting my values in 4.6cvia se37<BR></FONT><BR></DIV>
<DIV></DIV>Just a thought Rick but if your element values are actually object instance keys (which judging&nbsp;by their names they probably are) are you sure there's not something dodgy going on with your delegated objects and their internal buffering? Perhaps the sy-subrc 8&nbsp;is crawling out of their existence check methods...<BR>&nbsp;<BR>Or, maybe the keys are case-sensitive whereas the Test Variant has converted your entries to UPPER case without you realising it? That has happened to me nefore when messing around with keys based on GUIDs.<BR>&nbsp;<BR>Mike GT<BR><BR>&gt; Subject: Testing FM with swc_get_element not getting my values in 4.6c via se37<BR>&gt; Date: Thu, 19 Jun 2008 09:45:18 -0500<BR>&gt; From: Rick.Sample@graybar.com<BR>&gt; To: Rick.Sample@graybar.com; sap-wug@mit.edu<BR>&gt; <BR>&gt; In 4.6c, I have a FM and I am passing in 6 elements via the<BR>&gt; ac_container.<BR>&gt; Every great once and a while, I can not get all my elements no matter<BR>&gt; what data type I assign.<BR>&gt; <BR>&gt; I add my values in the correct order via the "Test Data Directory".<BR>&gt; I do my gets in same order. (again, no matter what order, data type,<BR>&gt; etc.)<BR>&gt; <BR>&gt; Like so, <BR>&gt; swc_get_element ac_container 'ZPONUMBER' l_po_num_in.<BR>&gt; swc_get_element ac_container 'ZLASTAGENT' zlastagent.<BR>&gt; swc_get_element ac_container 'ZINITIATOR' zinitiator.<BR>&gt; swc_get_element ac_container 'ZROLERESERROR' zrolereserror.<BR>&gt; <BR>&gt; The second two elements in the container sy-subrc 8 on swc_get_element <BR>&gt; even though I look at the container and see them in the container. <BR>&gt; <BR>&gt; Anyone have ideas? And I mean anyone with any far fetched ideas. <BR>&gt; This is getting VERY annoying!!!<BR>&gt; <BR>&gt; Rick Sample<BR>&gt; SAP Business Workflow Developer<BR>&gt; Graybar, Inc.<BR>&gt; 11885 Lackland Dr.<BR>&gt; St. Louis, MO. 63146<BR>&gt; 314-573-5822<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <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>
Miss your Messenger buddies when on-the-go? <A href="http://clk.atdmt.com/UKM/go/msnnkmgl0010000001ukm/direct/01/" target=_blank>Get Messenger on your Mobile!</A> </BLOCKQUOTE><br /><hr />Miss your Messenger buddies when on-the-go? <a href='http://clk.atdmt.com/UKM/go/msnnkmgl0010000001ukm/direct/01/' target='_new'>Get Messenger on your Mobile!</a></body>
</html>