Get t-code of the program that raise an event?

Richard Marut rvmarut at earthlink.net
Wed Mar 9 00:44:55 EST 2005


Rick,

That was an assumption that I made about the values for TRVOG. I'm pretty
confident that it's accurate and would go ahead and create the attribute.

Richard...

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Rick Sample
Sent: Tuesday, March 08, 2005 10:01 AM
To: sap-wug at mit.edu
Subject: RE: Get t-code of the program that raise an event?

Richard, 
If '0' is guaranteed to be VA01 / 02 then it is what I want. 
Will TRVOG value of '0' always mean that it was t-code VA01 or 02? 
If so, I can create an attribute to my extended object and put logic 
in my CFM to do what I want. 

Thanks!


>>> rvmarut at earthlink.net 3/2/2005 22:18:18 >>>
Rick,

Field TRVOG of table VBAK gives a clue about which transaction may have
triggered the event. Take a look at the values and you'll see that if value
0, then it could have been VA01 or VA02. If value is 1, it was VA11 or VA12,
value 2, it was VA21 or VA22, etc. You can also narrow it down to the create
or change transaction through the event binding with parameter _EVT_NAME.

One approach you can take is to add TRVOG as an attribute and have a first
step that would analyze the event name along with TRVOG.

Richard...

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Paez, Laura
Sent: Wednesday, March 02, 2005 4:19 PM
To: SAP Workflow Users' Group
Subject: RE: Get t-code of the program that raise an event?

I have a copy of things I think may help sometime...Hope this is the one...

Get t-code of the program that raise an event...
a:
-you can pick up the transaction code if the event is raised by a change
document.  You need to include the change document object class
(CDHDR-OBJECTCLAS), object id (CDHDR-OBJECTID) and change number
(CDHDR-OBJECTID) as event parameters. 
 In your check function module, you can access these event parameters and
check CDHDR-TCODE.
-Now why on earth had I never thought of event parameters as a rather
obvious way to find an event's change document before? 
-The event raise via the BUS2032 object CHANGED event. 


Laura Páez
210.345 2513


-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Rick Sample
Sent: Wednesday, March 02, 2005 3:59 PM
To: SAP-WUG at MITVMA.MIT.EDU 
Subject: Get t-code of the program that raise an event?


Someone responded to this question but I accidentally deleted the message.
Sorry! 
I searched the archives but could not find it. Strange...

Could the kind person that responded to this about getting the t-code from
the CDHDR please resend to me. 
Thanks!

======================
Can I get the t-code of the program that triggered and event on an object
and if so how? 

Example: 
BUS2032 change event triggered. How do I know what t-code triggered the
event? 

If I could get this calling t-code I could put some logic in my CFM to
process steps if called from VA02 / 01. 
Otherwise I could just ignore it and not start a WF. 

Any help is appreciated.
4.6C

Rick Sample
SAP Workflow / Developer
Graybar, Inc.
11885 Lackland Rd.
63146-4208
314.573.5822
Rick.Sample at GBE.com _______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu 
http://mailman.mit.edu/mailman/listinfo/sap-wug 

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu 
http://mailman.mit.edu/mailman/listinfo/sap-wug 



_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu 
http://mailman.mit.edu/mailman/listinfo/sap-wug 




_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug





More information about the SAP-WUG mailing list