<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=497122713-17092009><FONT face=Arial
color=#0000ff size=2>From a quick glance everything looks okay
generically. I'd recommend some good old debugging. Hit F5 to
step into the method calls. Just make sure the containers are getting
passed properly and see if you are hitting any exceptions. Your technique
for calling the method is correct, just do some debugging to figure out why your
not getting results back in the container.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=497122713-17092009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=497122713-17092009><FONT face=Arial
color=#0000ff size=2>--Seth</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <B>On Behalf Of </B>Nat 4
Govender<BR><B>Sent:</B> Thursday, September 17, 2009 12:03 AM<BR><B>To:</B> SAP
Workflow Users' Group<BR><B>Cc:</B> SAP Workflow Users' Group;
sap-wug-bounces@mit.edu<BR><B>Subject:</B> RE: Function Module For Access a
Method Of The BOR<BR></FONT><BR></DIV>
<DIV></DIV>
<P>Hi Seth,<BR><BR>This is our code but we are not getting any
results.<BR><BR><BR><BR><FONT face="Courier New"
color=#0000ff>INCLUDE</FONT><FONT face="Courier New"> <cntn01>
.<BR><BR></FONT><FONT face="Courier New" color=#0000ff>DATA</FONT><FONT
face="Courier New"> : o_role </FONT><FONT face="Courier New"
color=#0000ff>TYPE</FONT><FONT face="Courier New">
swc_object.<BR><BR></FONT><FONT face="Courier New"
color=#0000ff>DATA</FONT><FONT face="Courier New"> : rule_agents </FONT><FONT
face="Courier New" color=#0000ff>TYPE</FONT><FONT face="Courier New">
wfsyst-agent </FONT><FONT face="Courier New" color=#0000ff>OCCURS</FONT><FONT
face="Courier New"> </FONT><FONT face="Courier New" color=#4181ff>0</FONT><FONT
face="Courier New"> </FONT><FONT face="Courier New"
color=#0000ff>WITH</FONT><FONT face="Courier New"> </FONT><FONT
face="Courier New" color=#0000ff>HEADER</FONT><FONT face="Courier New">
</FONT><FONT face="Courier New" color=#0000ff>LINE</FONT><FONT
face="Courier New">.<BR><BR>swc_container b_container.<BR><BR>swc_create_object
o_role </FONT><FONT face="Courier New" color=#3f803f>'Z_STD_ROLE'</FONT><FONT
face="Courier New"> </FONT><FONT face="Courier New"
color=#3f803f>'AC90000005'</FONT><FONT face="Courier New">.<BR>swc_set_element
b_container </FONT><FONT face="Courier New" color=#3f803f>'Plant'</FONT><FONT
face="Courier New"> ip_plant.<BR>swc_set_element b_container </FONT><FONT
face="Courier New" color=#3f803f>'MaterialGroup'</FONT><FONT face="Courier New">
ip_mat_grp.<BR>swc_call_method o_role </FONT><FONT face="Courier New"
color=#3f803f>'Role90000005'</FONT><FONT face="Courier New">
b_container.<BR>swc_get_table b_container </FONT><FONT face="Courier New"
color=#3f803f>'ActorTab'</FONT><FONT face="Courier New">
rule_agents.</FONT><BR><BR><BR><BR><BR><FONT face="Courier New">The key for BOR
Z_STD_ROLE is </FONT><FONT face="Courier New">HRS1203-</FONT><FONT
face="Courier New">OTYPE and HRS1203-</FONT><FONT
face="Courier New">OBJID.</FONT><BR><BR><BR><FONT face="Courier New">This is the
input paramters for the method of BOR S_STD_ROLE.</FONT><BR><BR><IMG height=212
src="cid:497122713@17092009-21CC" width=734><FONT
face="Courier New"><BR></FONT><BR><FONT face="Courier New">This is the code for
the method role90000005</FONT><BR><BR><FONT face="Courier New">begin_method
role90000005 changing container. </FONT><BR><FONT
face="Courier New">swc_set_objectkey 'AC90000005'. </FONT><BR><FONT
face="Courier New">swc_call_method self 'ResolveRole' container.
</FONT><BR><FONT face="Courier New">CASE sy-subrc. </FONT><BR><FONT
face="Courier New">WHEN 1001. </FONT><BR><FONT face="Courier New">exit_return
9001 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. </FONT><BR><FONT
face="Courier New">WHEN 1002. </FONT><BR><FONT face="Courier New">exit_return
9002 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. </FONT><BR><FONT
face="Courier New">WHEN 1003. </FONT><BR><FONT face="Courier New">exit_return
9003 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. </FONT><BR><FONT
face="Courier New">WHEN 1004. </FONT><BR><FONT face="Courier New">exit_return
9004 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. </FONT><BR><FONT
face="Courier New">ENDCASE. </FONT><BR><FONT face="Courier New">end_method.
</FONT><BR><BR><BR><BR><B><FONT color=#483d8b size=4><BR>Regards</FONT></B><FONT
size=4><BR>Nat Govender<BR>Toyota South Africa<BR>IT - SAP Workflow
Specialist<BR>Internal Ext. : 32645<BR>Direct Line : +27 031 910 2645<BR>Fax :
086 607 0414<BR>E-mail : </FONT><A
href="mailto:ngovender4@toyota.co.za"><U><FONT color=#0000ff
size=4>ngovender4@toyota.co.za</FONT></U></A><FONT size=4><BR></FONT><FONT
color=#ff00ff size=4><BR>If you tell the truth, you don't have to remember
anything. </FONT><BR><IMG height=16
alt='Inactive hide details for "Stevens, Seth" <Seth.Stevens@anadarko.com>'
src="cid:497122713@17092009-21D3" width=16 border=0>"Stevens, Seth"
<Seth.Stevens@anadarko.com><BR><BR><BR>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD
style="BACKGROUND-IMAGE: url(cid:3__=CDBBFCA7DF88CE498f9e8a93df9@toyota.co.za); BACKGROUND-REPEAT: no-repeat"
width="40%">
<UL>
<UL>
<UL>
<UL><B><FONT size=2>"Stevens, Seth"
<Seth.Stevens@anadarko.com></FONT></B><FONT size=2>
</FONT><BR><FONT size=2>Sent by: sap-wug-bounces@mit.edu</FONT>
<P><FONT size=2>15-09-2009 04:22 PM</FONT>
<TABLE border=1>
<TBODY>
<TR vAlign=top>
<TD width=168 bgColor=#ffffff>
<DIV align=center><FONT size=2>Please respond to<BR>"SAP
Workflow Users' Group"
<sap-wug@mit.edu></FONT></DIV></TD></TR></TBODY></TABLE></P></UL></UL></UL></UL></TD>
<TD width="60%">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD width="1%"><IMG height=1 alt=""
src="cid:497122713@17092009-21DA" width=58 border=0><BR>
<DIV align=right><FONT size=2>To</FONT></DIV></TD>
<TD width="100%"><IMG height=1 alt=""
src="cid:497122713@17092009-21DA" width=1 border=0><BR><FONT
size=2>"SAP Workflow Users' Group"
<sap-wug@mit.edu></FONT></TD></TR>
<TR vAlign=top>
<TD width="1%"><IMG height=1 alt=""
src="cid:497122713@17092009-21DA" width=58 border=0><BR>
<DIV align=right><FONT size=2>cc</FONT></DIV></TD>
<TD width="100%"><IMG height=1 alt=""
src="cid:497122713@17092009-21DA" width=1 border=0><BR></TD></TR>
<TR vAlign=top>
<TD width="1%"><IMG height=1 alt=""
src="cid:497122713@17092009-21DA" width=58 border=0><BR>
<DIV align=right><FONT size=2>Subject</FONT></DIV></TD>
<TD width="100%"><IMG height=1 alt=""
src="cid:497122713@17092009-21DA" width=1 border=0><BR><FONT
size=2>RE: Function Module</FONT></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR vAlign=top>
<TD width=58><IMG height=1 alt="" src="cid:497122713@17092009-21DA"
width=1 border=0></TD>
<TD width=336><IMG height=1 alt="" src="cid:497122713@17092009-21DA"
width=1 border=0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><FONT
face=Arial color=#0000ff>Nat,</FONT><BR><FONT size=4></FONT><BR><FONT face=Arial
color=#0000ff>This is very simple to do. Create your RFC, then inside the RFC
use the BOR macros to instantiate the business object and call your method.
Something like below.</FONT><BR><FONT size=4></FONT><BR><FONT face=Arial
color=#0000ff>data lv_obj type swc_object.</FONT><BR><FONT face=Arial
color=#0000ff>data: begin of lt_container occurs 0,</FONT><BR><FONT face=Arial
color=#0000ff>include structure swcont.</FONT><BR><FONT face=Arial
color=#0000ff>data: end of lt_container.</FONT><BR><FONT size=4></FONT><BR><FONT
face=Arial color=#0000ff>swc_create_object lv_obj 'your_obj_name'
objkey.</FONT><BR><FONT face=Arial color=#0000ff>swc_call_method lv_obj
'your_method_name' lt_container.</FONT><BR><FONT size=4></FONT><BR><FONT
face=Arial color=#0000ff>You can use swc_set_element to set any import
parameters in lt_container before calling the method then use swc_get_element to
read any export parameters after calling the method. Syntax is swc_get_element
lt_container 'your_param_name' lv_variable.</FONT><BR><FONT
size=4></FONT><BR><FONT face=Arial color=#0000ff>Hope this
helps.</FONT><BR><FONT size=4></FONT><BR><FONT face=Arial
color=#0000ff>--Seth</FONT><BR><FONT face=Arial color=#0000ff></FONT><BR><BR>
<HR align=left width="100%" SIZE=2>
<B><FONT face=Tahoma>From:</FONT></B><FONT face=Tahoma> sap-wug-bounces@mit.edu
[<A href="mailto:sap-wug-bounces@mit.edu">mailto:sap-wug-bounces@mit.edu</A>]
</FONT><B><FONT face=Tahoma>On Behalf Of </FONT></B><FONT face=Tahoma>Nat 4
Govender</FONT><B><FONT face=Tahoma><BR>Sent:</FONT></B><FONT face=Tahoma>
Tuesday, September 15, 2009 2:59 AM</FONT><B><FONT
face=Tahoma><BR>To:</FONT></B><FONT face=Tahoma> SAP Workflow Users'
Group</FONT><B><FONT face=Tahoma><BR>Cc:</FONT></B><FONT face=Tahoma>
sap-wug@mit.edu; sap-wug-bounces@mit.edu</FONT><B><FONT
face=Tahoma><BR>Subject:</FONT></B><FONT face=Tahoma> Function
Module</FONT><FONT size=4><BR></FONT>
<P><FONT size=4>Hi All,<BR><BR>I would like to know if it is possible to create
a function module (remote) that can access one of our methods of the business
object.<BR><BR><BR>If so can you please advise how to go about to do that. I am
not a ABAPer.<BR><BR><BR></FONT><B><FONT color=#483d8b
size=5><BR><BR>Regards</FONT></B><FONT size=5><BR>Nat Govender<BR>Toyota South
Africa<BR>IT - SAP Workflow Specialist<BR>Internal Ext. : 32645<BR>Direct Line :
+27 031 910 2645<BR>Fax : 086 607 0414<BR>E-mail : </FONT><A
href="mailto:ngovender4@toyota.co.za"><U><FONT color=#0000ff
size=5>ngovender4@toyota.co.za</FONT></U></A><FONT color=#ff00ff
size=5><BR><BR>If you tell the truth, you don't have to remember anything.
</FONT><TT>_______________________________________________<BR>SAP-WUG mailing
list<BR>SAP-WUG@mit.edu<BR></TT><TT><A
href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</A></TT><TT><BR></TT>
<P></P></BODY></HTML>