AW: Passing HR infotype start date to an event, DELEGATION EMPLOYEET / BUS1065

Workflow nathanfox at swissinfo.org
Mon May 31 03:25:42 EDT 2004


I stumbled on to an elegant solution to your problem.
 
If you enter the BOR (SWO1) via the Information System Search hierarchy one
sees that EMPLOYEET inherits from BUS1065.
By activating the inheritance relationship via "delegation" the system
started firing "EMPLOYEET" events instead of the super-class BUS1065 events,
this of course with the extra "Begin-date" attribute that you need. No ABAP
coding was necessary.
 
This is what I would expect from an Object Oriented design, my only concern
is this seems to be an undocumented "feature" which I stumbled upon by
chance.
 
No warning was sent as I activated the delegation of the SAP standard
objects as is sometimes the case when one tries to adjust SAP customizing
tables.
 
Has anyone out there experience with such matters ?
 
Are there other side-effects to be expected when one activates the
"delegation" of SAP standard BOR objects?
 
 
-----Ursprungliche Nachricht-----
Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
Tedde Taege
Gesendet: Donnerstag, 27. Mai 2004 21:25
An: SAP-WUG at MITVMA.MIT.EDU
Betreff: Re: Passing HR infotype start date to an event
 
 
You should be able to build a container and fire off a different/custom
event from inside your function module to take care of your requirement.
 
Here is a sample of our code from inside a T779X driven function module:
 
CONSTANTS:  NPREL LIKE PA0001-ABKRS VALUE '99'.   "non-payroll
DATA: CONTAINER LIKE SWCONT OCCURS 0 WITH HEADER LINE.
DATA: LOCAL_PERNR LIKE SWEINSTCOU-OBJKEY.
  IF B_ABKRS = A_ABKRS OR
     A_ABKRS = NPREL.
  ELSE.
     SWC_SET_ELEMENT CONTAINER 'PayrollAreaCurrent' A_ABKRS.
     SWC_SET_ELEMENT CONTAINER 'PayrollAreaOld'     B_ABKRS.
     LOCAL_PERNR = L_PERNR.
     CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
            OBJTYPE           = 'BUS1065'
            OBJKEY            = LOCAL_PERNR
            EVENT             = 'PAYROLLAREACHANGED'
       TABLES
           EVENT_CONTAINER   = CONTAINER.
  ENDIF.
 
 
 
<<<<Michael Pokraka <workflow at quirky.me.uk>>>>
Sent by: SAP Workflow <Owner-SAP-WUG at MITVMA.MIT.EDU>
 
 
05/27/2004 02:02 PM
 
 
 
Greetings all,
The subject says it all: I want to know the start date of an infotype when
an event is raised.
We've specified a custom function in T779X to raise an event when a Person
is updated. However the update is usually future-dated and may even be
delimited. afterimage-begda is available within the FM and what I'm looking
for, but I cannot pass anything other than an event name out of the FM...
so
near and yet so far! Would be nice to fill an event container at this
point.
 
The issue behind all this is that the WF needs to instantiate an EMPLOYEET
object based on the start time specified in the update that raised the
event, just in case someone has a completely different alternative....
 
Any insight appreciated,
Cheers
Mike
 


More information about the SAP-WUG mailing list