Where to include custo object types in workflow events?
One of my friend is working on HR related Workflow. He has a question about where to include the custom change document infotypes in workflow events.
To make it clear, he says there are three transactions swehr1, swehr2 and swehr3. Now, if he wants to include a custom object (Z object) which transaction should he use?
Please reply ASAP.
Margaret A Hilsbos replied
Yes, you use swehr1 to link the infotype to the object type. Then use swehr3 to create the event linkage to your function module or object type event.
I just did this with an e-recruiting project and it worked fine. For example:
NB Requisition 5131 Persons Responsible ZERC_REQUI Job Requisition
NB Requisition 5131 Persons Responsible INS 0 ZERC_REQUI Z_ON_MEMBER_ADD
This accomplishes the following: when a record is inserted for infotype 5131, the function module Z_ON_MEMBER_ADD runs. That function module decides if or which event should be raised. Alternatively I could have entered an event for the ZERC_REQUI object type, but then the event will always be raised on a 5131 record insertion, and for my application I didn't want that.
I hope this example is helpful.