Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sending Workitem

Former Member
0 Likes
1,299

Requirement - I have made a module pool with one screen in which there is long text, userid text box and a button for send mail.

When ever user write his comments and click send button, it will go to the SAP Inbox of the user. The reciver when doubleclicks, the modulepool screen will open and he can write his own comments aloso and send back to the user or any other user.

I have made one task and one business object for this. In the Business object i write 'CALL TRANASACTION ZPSNOTE'.

ZPSNOTE is the transaction for my modulepoo.

I am using FM SWW_WI_CREATE, but i am not getting the task triggered.And also not getting the workflow itemin inbox. But it is showing in outbox the workitem executed by me.

How to get this.

Please Help !!

Requirement - I have made a module pool with one screen in which there is long text, userid text box and a button for send mail.

When ever user write his comments and click send button, it will go to the SAP Inbox of the user. The reciver when doubleclicks, the modulepool screen will open and he can write his own comments aloso and send back to the user or any other user.

I have made one task and one business object for this. In the Business object i write 'CALL TRANASACTION ZPSNOTE'.

ZPSNOTE is the transaction for my modulepoo.

I am using FM SWW_WI_CREATE, but i am not getting the task triggered.And also not getting the workflow itemin inbox. But it is showing in outbox the workitem executed by me.

How to get this.

Please Help !!

9 REPLIES 9
Read only

Former Member
0 Likes
1,246

1. What's the return value of SWW_WI_CREATE?

2. Have you checked the workflow log and the status of workflow....

3. Is it a dialog task?

3. Also, try running and testing your method independently....

Read only

0 Likes
1,246

I have attached my task in the FM SWW_WI_CREATE and it is returning me the ID of WI Created.

In SWI5, it is showing the object with the ID of WI Created.

In Log its showing the steps and also the FM with no errors.

When i am executing the method independentlly, its working fine and showing the screen.

I have also set the break-point in the method and execut my modulepool program, but it is not going into method.

Read only

0 Likes
1,246

Is your method is selected as a dialog method and background processing is unchecked in task?

Also check the agent assignment of the workflow activity.

Read only

0 Likes
1,246

yes the method is dialog ans background processing is unchecked.

The task is general.

I am just giving the userid on screen and mail should be send to his/her SAP maibox and the screen should be open when user open the mail.

I am passing the userid in FM SWW_WI_CREATE.

Read only

0 Likes
1,246

Are you passing the user id in AGENTS parameter?

Read only

0 Likes
1,246

My problem is solved, i have to change the task to general task in other client also.

Now i have another problem.

How to transfer the data from screen to task cointainer so that it can be displayed when user opens the mail??????

Read only

0 Likes
1,246

You can export the values to memory id from your module pool program. Import the values and set the container elements as shown below.



INCLUDE <cntn01>.

DATA: wf_val   TYPE c VALUE 'X',
      int_tab  TYPE TABLE OF mara,
      wf_wi_id TYPE swwwihead-wi_id.

SELECT * FROM mara
   INTO TABLE int_tab
     UP TO 100 ROWS.

swc_container         int_cont.
swc_create_container  int_cont.

swc_set_element int_cont 'ELMNT'  wf_val.
swc_set_table   int_cont 'TABLE'  int_tab.

CALL FUNCTION 'SWW_WI_CREATE'
  EXPORTING
    task           = 'WS99901011'
  IMPORTING
    wi_id          = wf_wi_id
  TABLES
    wi_container   = int_cont
  EXCEPTIONS
    id_not_created = 1
    read_failed    = 2
    OTHERS         = 3.

Check the container elements in work item log in SWI1.

Read only

0 Likes
1,246

Since i am using FM SWW_WI_CTEATE, it shoul fill the task container if i am passing the table to WI_COINTAINER of this FM.

But it is not populating the cointainer of the task.

I am giving the element name same as defined in task.

Any other way to fill the cointainer of the task.

?????????????????

Read only

0 Likes
1,246

Try passing the workflow number instead. It will create the container elements in the workflow conatiner.

Also can you post the code?