SAP_WAPI_CREATE_EVENT and Workflow binding

Penhall, Kathy kpenhall at hydro.mb.ca
Thu Jan 8 10:21:59 EST 2009


Jocelyn, Shai:

Thanks for your quick responses.  Please bear with me if I'm still a bit
confused.  The function module parameters don't include the SWCONT
structure, rather SWR_CONT which is looks very simplified (ELEMENT and
VALUE).  I had populated the ELEMENT with my simple container name, and
the value with the key value I wanted to pass.

FUNCTION sap_wapi_create_event.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(OBJECT_TYPE) LIKE  SWR_STRUCT-OBJECT_TYP
*"     VALUE(OBJECT_KEY) LIKE  SWR_STRUCT-OBJECT_KEY
*"     VALUE(EVENT) LIKE  SWR_STRUCT-EVENT
*"     VALUE(COMMIT_WORK) LIKE  SWR_STRUCT-COMMITFLAG DEFAULT 'X'
*"     VALUE(EVENT_LANGUAGE) LIKE  SY-LANGU DEFAULT SY-LANGU
*"     VALUE(LANGUAGE) TYPE  SYLANGU DEFAULT SY-LANGU
*"     VALUE(USER) TYPE  SYUNAME DEFAULT SY-UNAME
*"     VALUE(IFS_XML_CONTAINER) TYPE  XSTRING OPTIONAL
*"  EXPORTING
*"     VALUE(RETURN_CODE) LIKE  SY-SUBRC
*"     VALUE(EVENT_ID) LIKE  SWR_STRUCT-EVENT_ID
*"  TABLES
*"      INPUT_CONTAINER STRUCTURE  SWR_CONT OPTIONAL
*"      MESSAGE_LINES STRUCTURE  SWR_MESSAG OPTIONAL
*"      MESSAGE_STRUCT STRUCTURE  SWR_MSTRUC OPTIONAL
*"----------------------------------------------------------------------

Should I be using the two fields in SWR_CONT and populate with all of
the field names in Shai's email below? 

Thanks again for your help.

Kathy

------------------------------

Date: Thu, 8 Jan 2009 13:14:55 +0800
From: "Dart, Jocelyn" <jocelyn.dart at sap.com>
Subject: RE: [LIKELY JUNK]Re: SAP_WAPI_CREATE_EVENT and Workflow
	binding
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>, <sap-wug at mit.edu>
Message-ID:
	<2EAD340DEF223745B1AC9A10B49FBB4701C1C32C at sgsine13.sin.sap.corp>
Content-Type: text/plain;	charset="iso-8859-1"

Dear Kathy,
To clarify - I wanted you to use SAP_WAPI_READ_CONTAINER on an existing
workflow instance to *** UNDERSTAND *** what you had to put in the event
container for SAP_WAPI_CREATE_EVENT.  You still actually have to fill
the parameters for SAP_WAPI_CREATE_EVENT. 
 
Regards,
Jocelyn 

________________________________

From: sap-wug-bounces at mit.edu on behalf of Shai Eyal
Sent: Thu 8/01/2009 6:13 AM
To: sap-wug at mit.edu
Subject: [LIKELY JUNK]Re: SAP_WAPI_CREATE_EVENT and Workflow binding


Dear Kathy,
 
Please make sure to fill all SWCONT structure fields as follows:

*	ELEMENT - your element name, use uppercase! 
*	TAB_INDEX - 00001, 00002, ... if you're transfer a table element
then you should have same index several times. 
*	ELEMLENGTH - according to the data dictionary. 
*	TYPE - according to the data dictionary. 
*	VALUE - your element value.

I assume you did but make sure to append the data to the internal table
you use.

If it's still does not work please copy the source code to txt file and
attach it.

 

I can assure you that is suppose to work - I've done that several times
and it went well.

Good luck.


 

Regards,
Shai Eyal

SAP Logistics senior consultant
SAP Workflow specialist

http://www.linkedin.com/in/shaieyal
Mobile: 972-52-5816633

------------------------------

Message: 2
Date: Wed, 7 Jan 2009 10:47:51 -0600
From: "Penhall, Kathy" <kpenhall at hydro.mb.ca>
Subject: SAP_WAPI_CREATE_EVENT and Workflow binding
To: <sap-wug at mit.edu>
Message-ID:
    <CAD3E86E65D76C47BD61434EDFD7D10F01A12889 at MHMAIL02.hydro.mb.ca>
Content-Type: text/plain; charset="us-ascii"

Hello Workflow folks,

We are having a similar problem as Srinivas Oota recently posted here.
We are attempting to code an event to kick off a workflow and the
container doesn't seem to be passed to the workflow from the function
call.  Originally we just attempted to copy the SAP logic in
LHRTEM00NETF53 to generate the event PDRELA_025.MOVED where approriate,
by copying the code used when PDRELA_025.MOVEREQUESTED is generated,
which uses function SWE_EVENT_CREATE.  However when we did this, our
moved event was not being generated, despite the fact that this same
code still works for the moverequested event.

So as Jocelyn suggested, we changed our code to use function
SAP_WAPI_CREATE_EVENT and have populated the container with the data
required by the workflow.  The event is now generated, but the values in
the container don't appear to have been passed to the workflow even
though the return code from the function is 0 and the only message
generated by the function call is "Event created - at least one receiver
found".    I confirmed the fields were not populated by running
SAP_WAPI_READ_CONTAINER as suggested and found the two container
elements I defined and populated for the event function call are in the
container, but not populated as I would have expected them to be.

Any suggestions on what we might be missing?


Kathy Penhall
HR Applications
SAP Support Services
693 Taylor Avenue
(tel)204-477-7197 


-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://mailman.mit.edu/pipermail/sap-wug/attachments/20090107/40f0c1c1/a
ttachment-0001.htm

------------------------------

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


End of SAP-WUG Digest, Vol 50, Issue 4
**************************************


________________________________

Get your new Email address!
<http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail
.promotions.yahoo.com/newdomains/aa/>
Grab the Email name you've always wanted before someone else does!



------------------------------

Message: 4
Date: Thu, 8 Jan 2009 13:17:20 +0800
From: "Dart, Jocelyn" <jocelyn.dart at sap.com>
Subject: RE: [LIKELY JUNK]RE: Logically Delete Workitem
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>,	"SAP Workflow
	Users' Group" <sap-wug at mit.edu>
Message-ID:
	<2EAD340DEF223745B1AC9A10B49FBB4701C1C32D at sgsine13.sin.sap.corp>
Content-Type: text/plain;	charset="iso-8859-1"

Adam, 
Please *** DO NOT USE *** internal function modules such as
SWW_WI_ADMIN_CANCEL.
 
The equivalent Workflow API which is designed for customer use is
SAP_WAPI_ADM_WORKFLOW_CANCEL.
 
If you don't have the options showing to logically delete the work item
it is probably because you do not have sufficient access to perform this
activity.  Put the hard word on your security team to get it.   Check
the authorizations assigned to security role SAP_BC_BMT_WFM_ADMIN to see
what you are missing. 
 
Regards,
Jocelyn 

________________________________

From: sap-wug-bounces at mit.edu on behalf of Cathy
Sent: Thu 8/01/2009 5:48 AM
To: SAP Workflow Users' Group
Subject: [LIKELY JUNK]RE: Logically Delete Workitem


Not really sure what the logically delete is, I use report RSWWWIDE to
delete workitems.

--- On Wed, 1/7/09, Adam Kheil <adam_kheil at live.com> wrote:


	From: Adam Kheil <adam_kheil at live.com>
	Subject: RE: Logically Delete Workitem
	To: brynn.rutherford at thecreek.com, "Workflow group"
<sap-wug at mit.edu>
	Date: Wednesday, January 7, 2009, 12:18 PM
	
	
	I have tried this it does not give me options under services
available to Administrator. I have tried some other Work item ids not in
this workflow and I do get option of deleting logically in the services
available to administrator. I do not have authorization for SWO1 and
SE37 in the production. I am thinking of writing a small program to use
function SWW_WI_ADMIN_CANCEL in it!  Any other sugestions will be
appreciated.
	 
	Thanks every one for quick replies
	 
	Adam
	
	
	
________________________________


	Subject: Logically Delete Workitem
	Date: Wed, 7 Jan 2009 08:59:50 -0800
	From: Brynn.Rutherford at thecreek.com
	To: adam_kheil at live.com
	
	
	
	 <mailto:adam_kheil at live.com> 
	 
	In SWIA:
	 
	1. Double click the workitem
	
	 
	2. In the first screen go to Menu - GOTO - TECHNICAL WORKITEM
DISPLAY
	3. In the technical workitem display screen go to EDIT - CHANGE
	4. You should now see your options to the left to include
logically delete.
	
	Brynn Rutherford
	Level 3 Support
	SAP Fusion
	Work: (208)265-7395 Cell:(208)610-6705
	 

	The contents of this message, together with any attachments, are
intended only for the use of the individual or entity to which they are
addressed and may contain information that is legally privileged,
confidential or otherwise exempt from disclosure. If you are not the
intended recipient, you are prohibited from disseminating, distributing,
or copying this message or any attachment. If you have received this
message by mistake, please let the sender know by email reply and
immediately delete this message, along with any attachments, from your
system. Thank you.

	 

	 

________________________________

	Windows LiveTM: Keep your life in sync. Check it out.
<http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_01200
9>  
	_______________________________________________
	SAP-WUG mailing list
	SAP-WUG at mit.edu
	http://mailman.mit.edu/mailman/listinfo/sap-wug





------------------------------

Message: 5
Date: Thu, 8 Jan 2009 13:22:06 +0800
From: "Dart, Jocelyn" <jocelyn.dart at sap.com>
Subject: RE: [LIKELY JUNK]Re: Logically delete
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>,	"SAP Workflow
	Users' Group" <sap-wug at mit.edu>
Message-ID:
	<2EAD340DEF223745B1AC9A10B49FBB4701C1C32E at sgsine13.sin.sap.corp>
Content-Type: text/plain;	charset="iso-8859-1"

Hi Adam, 
Please use transaction SWWL_TOPLEVEL rather than SWWL - the toplevel
version is safer as it helps to prevent orphaned work items.
 
Also check your authorizations for authorization object S_WF_WI which
controls the activities you can perform against a work item.
Regards,
Jocelyn

________________________________

From: sap-wug-bounces at mit.edu on behalf of Himanshu Verma
Sent: Thu 8/01/2009 4:20 AM
To: SAP Workflow Users' Group
Subject: [LIKELY JUNK]Re: Logically delete


Hi adam,
 
You can logically delete the workflow by using transaction SWWL.... you
have to enter the work item id (not the workflow instance number).
Delete the workitem and then you can logically delete the workflow using
workflow instance number. But remember the sequence, First, Workitem and
then WOrkflow Instace.
 
Hope it will solve your query.
 
Regards,
Himanshu Verma.
 


 
2009/1/7 Bill Craig <billtcraig at gmail.com>


	Adam,
	It sounds like authorization, but if you can get to SWO1 and
instantiate the business object WORKITEM using the work item id of the
main workflow, the method status_change will give you the option to set
the status to CANCELLED which is the same as logically deleted.
	
	Thanks,
	Bill
	 
	On Wed, Jan 7, 2009 at 11:19 AM, <sap-wug-request at mit.edu>
wrote:
	

		Send SAP-WUG mailing list submissions to
		       sap-wug at mit.edu
		
		To subscribe or unsubscribe via the World Wide Web,
visit
		       http://mailman.mit.edu/mailman/listinfo/sap-wug
		or, via email, send a message with subject or body
'help' to
		       sap-wug-request at mit.edu
		
		You can reach the person managing the list at
		       sap-wug-owner at mit.edu
		
		When replying, please edit your Subject line so it is
more specific
		than "Re: Contents of SAP-WUG digest..."
		
		
		Today's Topics:
		
		  1. Delete logically (Adam Kheil)
		
		
	
----------------------------------------------------------------------
		
		Message: 1
		Date: Wed, 7 Jan 2009 11:18:44 -0500
		From: Adam Kheil <adam_kheil at live.com>
		Subject: Delete logically
		To: Workflow group <sap-wug at mit.edu>
		Message-ID:
<COL112-W69842BA950E267C0CBB51E96DF0 at phx.gbl>
		Content-Type: text/plain; charset="iso-8859-1"
		
		
		Hi,
		I want to delete logically a workflow in error status.
When I go to the log, click on Work item Id, and go through menu ->
Edit-> Change. I don't see an option available under services for
administrator to delete logically. Attached is a print out and we are on
ECC 6.0
		
		Any idea on how to delete logically will be highly
appreciated.
		
		
		
		Thanks
		Adam
	
_________________________________________________________________
		Windows LiveTM: Keep your life in sync.
	
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009
		-------------- next part --------------
		An HTML attachment was scrubbed...
		URL:
http://mailman.mit.edu/pipermail/sap-wug/attachments/20090107/3d872240/a
ttachment.htm
		-------------- next part --------------
		A non-text attachment was scrubbed...
		Name: Screen print.doc
		Type: application/msword
		Size: 78336 bytes
		Desc: not available
		Url :
http://mailman.mit.edu/pipermail/sap-wug/attachments/20090107/3d872240/S
creenprint.doc
		
		------------------------------
		
		_______________________________________________
		SAP-WUG mailing list
		SAP-WUG at mit.edu
		http://mailman.mit.edu/mailman/listinfo/sap-wug
		
		
		End of SAP-WUG Digest, Vol 50, Issue 3
		**************************************
		






	_______________________________________________
	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


End of SAP-WUG Digest, Vol 50, Issue 8
**************************************




More information about the SAP-WUG mailing list