workitem id
Kjetil Kilhavn
KJETILK at statoil.com
Mon Dec 4 07:57:32 EST 2006
Put the following code in your object method.
I guess you should have some error handling since the work item ID is
required information in your method. You could possibly also add an
optional parameter for work item ID and only use the following code when
that parameter has no value.
* Started from work item?
DATA: t_requester TYPE STANDARD TABLE OF swotobjid,
l_workitem TYPE swwwihead-wi_id.
FIELD-SYMBOLS: <requester> LIKE LINE OF t_requester.
CALL FUNCTION 'SWO_QUERY_REQUESTER'
TABLES
requester = t_requester
EXCEPTIONS
not_found = 1
OTHERS = 99.
IF syst-subrc = 0.
LOOP AT t_requester
ASSIGNING <requester>
WHERE objtype = 'WORKITEM'.
l_workitem = <requester>-objkey.
ENDLOOP.
ENDIF.
--
Kjetil Kilhavn, Statoil OFT GBS BAS DEV SAP
> -----Original Message-----
> From: sap-wug-bounces at mit.edu
> [mailto:sap-wug-bounces at mit.edu] On Behalf Of Yifat Bar
> Sent: Monday, December 04, 2006 12:39 PM
> To: sap-wug at mit.edu
> Subject: workitem id
>
>
> hello!
> I am new with WS, so i apologize in advance for my questions.
> I created a new method for a new object type. The method is a
> transaction that reads the container of the WS (
> SAP_WAPI_READ_CONTAINER ).
> I need to pass the workitem id from the WS to the function.
> What parameter do i have to pass, and how can i run the task
> in background.
>
> Regards yifat
> Yifat Bar
> Sap developer IBM
> mail-: yifatb at il.ibm.com
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.
More information about the SAP-WUG
mailing list