Creating a new change document object

Carolyn Fuller fuller at MIT.EDU
Mon Jan 27 16:28:03 EST 2003


Stephan,
 
"you have to take into account where the commit work is handled"
 
That was the problem. In one scenario, the commit work was happening
after the programmer's call to the SWE_EVENT_CREATE function module,
which is why it was working. In the other, the commit work was
happening before, which is why it wasn't working. The programmer
fixed this problem by coding an explicit commit work in the second
scenario after the call to SWE_EVENT_CREATE.
 
Now that we've gotten the function module solution working
consistently, is there an advantage to using status management
instead?
 
Carolyn
 
>Hi Carolyn,
>
>Raising an event via function module always works, you just have to
>make the right choice of FM for the occasion.. look for
>SWE_EVENT_CREATE_* in the function builder, there are several ones,
>depending on whether you want to raise the event from a dialog task,
>or whether you're already in the update task, etc.. also, you have
>to take into account where the commit work is handled.. in your own
>program, you might have to commit explicitly, in transactions you
>must not commit yourself, the standard processing will take care of
>it.. but don't despair, finding the right FM takes some practice,
>and often enough that means practice in trial and error :-)
>
>Greetings,
>Stephan
>
>
>-----Original Message-----
>From: Carolyn Fuller [mailto:fuller at MIT.EDU]
>Sent: Samstag, 25. Januar 2003 01:53
>To: SAP-WUG at MITVMA.MIT.EDU
>Subject: Re: Creating a new change document object
>
>Thank you everyone who responded to this question!
>
>We will probably end up going with status management but before I
>posted my question I had given up and was trying to implement a
>terminating event by raising the event via a function module. I'm
>still in a workflow learning curve and I've been given the luxury of
>time to learn. Therefore, I want to figure out why this function
>module solution works in some cases and not others before trying
>another solution.
>
>Carolyn
>
>>.problem with a new change document is that you need to raise it
>>somehow.. ie in a user exit.. but there you might just as well
>>create the event directly.. creating change documents usually only
>>make sense if you need them for more than just triggering an event..
>>
>>.maybe better is to use status management, because you can easily
>>trigger events on line item level.. use status object type vbp and
>>object type vbap for example in customer status management
>>(transaction bsvz)..
>>
>>hth,
>>stephan
>>
>>-----Original Message-----
>>From: Pyc, Mark [mailto:Mark.Pyc at amersham.com]
>>Sent: Freitag, 24. Januar 2003 10:45
>>To: SAP-WUG at MITVMA.MIT.EDU
>>Subject: Re: Creating a new change document object
>>
>>G'day Tony,
>>
>>It's been a while but I'm pretty sure you can do this using a function
>>module defined in transaction SWED (Define Workflow Properties <for Change
>>documents>). In this table you can link incompatible Change Doc / Business
>>Objects. In the function module you need to interorgate the change doc and
>>populate the Bus Obj key appropriately.
>>
>>SWE_TEMPLATE_OBJECT_KEY_SET is listed in the help as a template func mod.
>>
>>As there are no exceptions in this I think you may need to use a check
>>function module to ensure that only valid item level changes are being
>>raised as events.
>>
>>I think you may also get warnings when in txn SWEC, but these can be
>>ignored.
>>
>>Have fun,
>>Mark
>>
>>-----Original Message-----
>>From: Hoodak, Anthony J. [mailto:AHoodak at Gleason.com]
>>Sent: Thursday, January 23, 2003 18:17
>>To: SAP-WUG at MITVMA.MIT.EDU
>>Subject: Creating a new change document object
>>
>>
>>Hi -
>>
>>I want to trigger a WF for the creation of a sales order at the item level.
>>Currently, I can raise a change document object for the header level
>>(BUS2032), but I cannot raise one for the item level (VBAP) because the
>>table linkage for the sales order object (VERKBELEG) is to the table VBAK.
>>How do I go about raising a change document for the item level in this case?
>  >Can I create my own change document objects and link them to the VBAP table?
>>Please advise.
>>
>>Regards,
>>
>>Tony Hoodak
>>Gleason Works
>
>
>--
>
>"Imagine there's no heaven, it's easy if you try, no hell below us,
>above us only sky, Imagine all the people, living for today." John
>Lennon - Imagine
>
>Carolyn Fuller                               M.I.T.
>fuller at mit.edu                       Financial Systems Services
>http://www.mit.edu/people/fuller/    Senior Analyst/ Programmer Peer Leader
>fax (617) 253-9661                    voice (617) 253-6213
>W92-210
 
 
--
 
"Imagine there's no heaven, it's easy if you try, no hell below us,
above us only sky, Imagine all the people, living for today." John
Lennon - Imagine
 
Carolyn Fuller                               M.I.T.
fuller at mit.edu                       Financial Systems Services
http://www.mit.edu/people/fuller/    Senior Analyst/ Programmer Peer Leader
fax (617) 253-9661                    voice (617) 253-6213
W92-210
 


More information about the SAP-WUG mailing list