Passing HR infotype start date to an event

Tedde Taege ttaege at nebraska.edu
Thu May 27 15:25:16 EDT 2004


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