cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving Workitem id

Former Member
0 Kudos

Hi,

I have a scenario where I need to add an attachment to the workitem i.e suppose the document is with the user to either release or refuse.

If he refuses the document a pop up should appear in which he can enter the rejection reason.

I have modified the standard method 'RELEASE' of B.O. FIPP and used the function module SWL_WI_NOTE_CREATE inside it.

However this F.M. takes as input the workitem which should not be completed.

So how can i get thw workitem no. which is currently being executed to be passed to this F.M i.e the user gets a workitem for release and I need this workitem to be passed to the above F.M.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Venu,

Reason why I want to modify the method is as follows:

Suppose u get a workitem in ur inbox : Release the document.

Now via inbox option if you add an attachment( Create attachment option in inbox ) to it a pop up box will appear.

Further the attachment will be added to this workitem.

However if I create a seperate task then the attachment will be added to this workitem and not the workitem to release the document.

The requirment is to achieve the standard functionality keeping in mind the user may foget to use the standard option and hence as when attachment will be created , we can go to the table SWW_CONTOB , read the workitem using the object key which is the concatenation of doc no. , company code and fiscal year to get the rejection comments.

former_member182466
Contributor
0 Kudos

To add to Arghadip's answser the container element is _Workitem.WorkitemId.

Former Member
0 Kudos

Hi,

This may not be straight answer to your question as Arghdip already told you what you can do.

But, why do you want to modify the std. RELEASE method of FIPP when you can do this Rejection reasons task in a separate task ?. What you can do is, immediately after the user rejects, in the REJECT outcome of user decision, use a dialog task created with SELFITEM.NOTE_CREATE or use FM "TXW_TEXTNOTE_EDIT" to pop-up and this way, you can have the whole text entered in the task container and you can either embed this "reasons" in the mail to next user or send as an attachment.

Just another way of tackling your requirement without modifying the std. Methods. That's all !!

Hope this helps

venu

Former Member
0 Kudos

I think you can get the value from the Task Container only Analyse the Wflow Log and you will get your answer or you can make use of FM SAP_WAPI_WORKITEMS_TO_OBJECT

Thanks

Arghadip