Use
You can assign function codes on your tab page and use the functions already implemented on the SAP main screen for processing.

You can use the released interfaces to develop your own ways of manipulating the work items and objects to process your function codes. The released function modules of the SAP WAPI interface are in the development class
Features
If you set one of the following function codes, you can use existing functions and dialogs in the work item display on your tab page.
Description of function |
Function code to be set (typing: like sy-ucomm ) |
Display agents currently selected |
0008 |
Send mail |
0001 |
Change attachment |
0005 |
Display attachment |
0004 |
Remove attachment |
0003 |
Add attachment |
0002 |
Display excluded agents |
0012 |
Change work item deadlines |
0011 |
Display graphical workflow log |
0022 |
Go to technical work item display |
0007 |
Display possible agents |
0015 |
Change work item priority |
0016 |
Display process description |
0006 |
End resubmission |
0019 |
Display workflow log |
0021 |
Reserve work item |
0020 |
Resubmit work item |
0018 |
Execute work item |
0013 |
Forward work item |
0014 |
Replace work item |
0009 |
Reject work item processing |
0017 |
Display work item container |
0010 |
The above function codes are returned to the SAP main screen only via the macro
SWL_USER_WIDISP_SET_OKCODE .
You define a function on your tab page for displaying the workflow log. You specify a function code from your namespace (for example ZPRO) for this function.
You include this function code in the
CASE FCODE.
WHEN 'ZPRO'.
SWL_USER_WIDISP_SET_OKCODE '0021'.
WHEN [...]
ENDCASE.
Once the macro has been called you do not have to concern yourself with the execution of the function, since the PAI of the SAP main screen is executed. The relevant function is then started.