Inconsistent behavior between SAP Rule and underlying Agent D etermination function module

Chatterjee, Partha (US - San Ramon) pchatterjee at deloitte.com
Fri Jul 30 12:16:50 EDT 2004


Hi Jocelyn,
=20
I will make the changes and let you know how it goes.
=20
Thanks for the help,
Partha
 
        -----Original Message-----=20
        From: SAP Workflow on behalf of Dart, Jocelyn=20
        Sent: Thu 7/29/2004 9:53 PM=20
        To: SAP-WUG at MITVMA.MIT.EDU=20
        Cc:=20
        Subject: Re: Inconsistent behavior between SAP Rule and underlying =
Agent D etermination function module
=09
=09
 
        Partha,
        You should not be using include <CNTAIN>.  The correct include to use =
is <CNTN01>.=20
        This could well be your problem as it changes how the macros are =
interpreted.
=09
        For the rest - make sure you use the EXACT same container element names =
as specified in the rule - assume
        case sensitivity.  Don't clear or refresh AC_CONTAINER.
=09
        Raise the exception NOTHING_FOUND if ACTOR_TAB is still initial after =
your ENDSELECT.
=09
        Read the doco and look at the tutorials on creating function module =
rules in both the SAP Library doco and in the book if you have it.
=09
        Rgds,
        Jocelyn=20
=09
        -----Original Message-----
        From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of =
Chatterjee, Partha (US - San Ramon)
        Sent: Friday,30 July 2004 4:16 AM
        To: SAP-WUG at MITVMA.MIT.EDU
        Subject: Re: Inconsistent behavior between SAP Rule and underlying =
Agent Determination function module
=09
=09
        Hi Serge,
=09
        Yes those are the macros I used.  My code in the funciton module is =
below:
=09
        INCLUDE <CNTAIN>.
=09
        DATA BEGIN OF ORG_OBJECT OCCURS 0.
=09
        INCLUDE STRUCTURE SWHACTOR.
=09
        DATA END OF ORG_OBJECT.
=09
        DATA: ORG_TYPE LIKE SWHACTOR-OTYPE.
=09
        DATA: ORG_ID LIKE SWHACTOR-OBJID.
=09
        DATA: RESULT_TAB LIKE SWHACTOR OCCURS 0 WITH HEADER LINE.
=09
        REFRESH: ACTOR_TAB, RESULT_TAB, ORG_OBJECT.
=09
        CLEAR: ACTOR_TAB, RESULT_TAB, ORG_OBJECT.
=09
        * Get the parameters under consideration.
=09
        SWC_GET_ELEMENT AC_CONTAINER 'plant' plant.
=09
        SWC_GET_ELEMENT AC_CONTAINER 'logentrytype' logentrytype.
=09
        SWC_GET_ELEMENT AC_CONTAINER 'eventdate' eventdate.
=09
        * Get the position ids from role resolution.
=09
        select * from ZSSE0017ROLETBL
=09
        into corresponding fields of result_tab
=09
        where iaplant =3D plant
=09
        and iatype =3D logentrytype
=09
        and begda <=3D eventdate
=09
        and endda >=3D eventdate.
=09
        actor_tab-otype =3D result_tab-otype.
=09
        actor_tab-objid =3D result_tab-objid.
=09
        append actor_tab.
=09
        endselect.
=09
        REFRESH: AC_CONTAINER.
=09
        CLEAR: AC_CONTAINER.
=09
        As you can see, its pretty simple code.  I was playing around with =
container refreshes thinking that that maybe the problem but I don't =
think it is.
=09
        Best regards,
        Partha
=09
                -----Original Message-----
                From: SAP Workflow on behalf of Serge Boulay
                Sent: Thu 7/29/2004 2:09 PM
                To: SAP-WUG at MITVMA.MIT.EDU
                Cc:
                Subject: Re: Inconsistent behavior between SAP Rule and =
underlying Agent Determination function module
              =20
              =20
=09
                Hi Partha,
              =20
                Do you use SWC_GET_ELEMENT AC_CONTAINER... statement in you =
function module
                in order to get these container elements into you function =
module variables?
              =20
                Best regards.
              =20
                Serge
              =20
                -----Message d'origine-----
                De : SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] De la =
part de
                Chatterjee, Partha (US - San Ramon)
                Envoy=C3=A9 : 29 juillet 2004 12:37
                =C3=80 : SAP-WUG at MITVMA.MIT.EDU
                Objet : Re: Inconsistent behavior between SAP Rule and =
underlying Agent
                Determination function module
              =20
                Hi Mike,
              =20
                I am not sure I understand your terminology.
              =20
                On PFAC_DIS, I click the simulate button (the abacus type =
symbol).  At this
                point, I get a pop-up which allows me to enter my custom =
container elements
                (Plant, Event Date, and Incident Type which are from the EH&S =
area).  After
                enter the custom container elements, I click the test button =
(wrench
                symbol) and get the problem I am speaking about.  If I run the =
same test
                with the underlying function module under se37 it works fine =
and I get the
                Agents I am expecting in ACTOR_TAB.
              =20
                I am not sure what the Org Management or the Extended Object ID =
have to do
                with this?  So I guess answer to your question would be no as =
the parameters
                I am feeding the Rule do not have anything to with Org =
Management.
              =20
                Best regards,
                Partha
              =20
                        -----Original Message-----
                        From: SAP Workflow on behalf of Mike Nickson
                        Sent: Thu 7/29/2004 11:53 AM
                        To: SAP-WUG at MITVMA.MIT.EDU
                        Cc:
                        Subject: Re: Inconsistent behavior between SAP Rule and =
underlying
                Agent Determination function module
                     =20
                     =20
              =20
                        When you are simulating the rule (presumably via PFAC) =
there are 2
                        possible ways to supply the parameters.
                     =20
                        Either via - Org Management Object =3D USBLOGGSF
                     =20
                        Or via - Extended Object ID =3D BLOGGSF   &   Object =
Type =3D US
                     =20
                        Are these the parameters youa re using ?
                     =20
                        Mike
                     =20
                     =20
                     =20
                     =20
                     =20
                        "Chatterjee, Partha (US - San Ramon)" =
<pchatterjee at DELOITTE.com>
                        Sent by: SAP Workflow <Owner-SAP-WUG at MITVMA.MIT.EDU>
                        29/07/2004 15:34
                        Please respond to SAP Workflow Users' Group
                     =20
                     =20
                                To:     SAP-WUG at MITVMA.MIT.EDU
                                cc:
                                Subject:        Inconsistent behavior between =
SAP Rule and
                underlying Agent Determination
                        function module
                     =20
                     =20
                        Hi All,
                     =20
                        I have developed a very simple rule that picks some =
agents from a
                custom
                        table.  When I execute the function module underlying =
the rule in
                        test/debug, the function module always behaves as =
expected returning
                the
                        correct result to ACTOR_TAB.  However, if I simulate =
the rule I get
                'No
                        Agent Found'.  I don't quite understand what is =
happening between
                the
                        two places.  We are on 4.7 extension set 2.
                     =20
                        Has anyone run into this type of problem before?  The =
only relevant
                note
                        I can find is 707767 but it is hard to know from the =
minimal problem
                        description whether its appropriate.
                     =20
                        Also, where is the place to search for q&a's on this =
forum.
                     =20
                        Best regards,
                     =20
                        > Partha Chatterjee
                        >
                     =20
                     =20
                     =20
                        This message (including any attachments) contains =
confidential
                information
                        intended for a specific individual and purpose, and is =
protected by
                law.
                        If you are not the intended recipient, you should =
delete this
                message. Any
                        disclosure, copying, or distribution of this message, =
or the taking
                of any
                        action based on it, is strictly prohibited.
                     =20
              =20
              =20
              =20
              =20
                This message (including any attachments) contains confidential =
information
                intended for a specific individual and purpose, and is =
protected by law.  If
                you are not the intended recipient, you should delete this =
message.  Any
                disclosure, copying, or distribution of this message, or the =
taking of any
                action based on it, is strictly prohibited.
              =20
=09
=09
=09
=09
        This message (including any attachments) contains confidential =
information intended for a specific individual and purpose, and is =
protected by law.  If you are not the intended recipient, you should =
delete this message.  Any disclosure, copying, or distribution of this =
message, or the taking of any action based on it, is strictly =
prohibited.
=09
 
 
 
 
This message (including any attachments) contains confidential =
information intended for a specific individual and purpose, and is =
protected by law.  If you are not the intended recipient, you should =
delete this message.  Any disclosure, copying, or distribution of this =
message, or the taking of any action based on it, is strictly =
prohibited.
 


More information about the SAP-WUG mailing list