ABAP OO Workflow

Mike Pokraka wug at workflowconnections.com
Thu Jan 22 13:54:27 EST 2009


Hello Tom, 

 

I'm a little confused. Are you expecting this attribute to be available in a
later step? 

If so, perhaps you misunderstand instance management. Workflow calls
FIND_BY_LPOR to get an instance, does its thing and ditches it. Anything not
stored in the database (or a static attribute) is lost. Next step it will
call FIND_BY_LPOR again to get a new instance. 

 

Either you need to implement a more sophisticated instance management (a
good idea for performance reasons) or you need to populate your attribute in
the constructor - probably both. 

Other alternatives are to bind the attribute back into a container element,
or look at using a functional method (my preferred option). 

 

Cheers, 

Mike

 

 

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Simon, Tom
Sent: 21 January 2009 19:22
To: sap-wug at mit.edu
Subject: ABAP OO Workflow

 

Florin:

      So this is what I understand: When I tested my task I entered the key
attributes into the variable that represents my class.  This object
reference is bound to the wi_Object_ID.  The persistent object reference  is
passed to find_by_lpor and the constructor is executed to create the
instance of the class.  My instance method then executes.  As part of this
execution I fill the me->zanek table with the results from the function
module.  I then use  me->zanek in another method.

When the task is complete and I look at the workflow log,  the wi_object_ID,
containing the instant object of the class has the key attribute filled but
not the table zanek.  In the method I changed the value of the key attribute
belnr and it showed up in the container reference to the class instance.  So
as the task completed and executed my method it must of called
bi_persistent-lpor and updated the result parameter with my new value for
me->belnr.  It then ran find_by_lpor and created a new instance with a
different value in the key parameter and passed it back to the wi_Object_ID
reference in the container.     

 

Thank you,

 

Tom Simon

 

  METHOD retrieve_anek.

  CALL FUNCTION 'ANEK_READ_MULITPLE'
    EXPORTING
      i_belnr = me->belnr
      i_bukrs = me->bukrs
    TABLES
      t_anek  = me->zanek.

   IF me->zanek is not initial.

    me->updatelink(
    im_archiveid = im_archiveid
    im_archdocid = im_archdocid
    im_object_id = im_object_id
    im_anek      = ex_anek ).

   ENDIF. 

 

    me->belnr = '4545454545454'.

 

endmethod.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20090122/03151e76/attachment.htm


More information about the SAP-WUG mailing list