Toolbar buttons
You can add any number of own buttons to the alv grid toolbar of the TM Workflow Monitor. This exit is often used together with the exit WORKFLOW_01. With the Toolbar buttons exit, customers let their users assign a specific attribute and afterwards the value or a dedicated icon is displayed in the workflow monitor using exit WORKFLOW_01.
Location for activation
TM Server
Template function Module
/RTC/TM_TMPL_WF_TOOLBAR
Interface
Import Parameters
Internal Table IT_TRKORR
Field | Description |
---|---|
TRKORR | Transport Request |
Example
The customer uses the attribute PRIORITY to flag a transport request as “normal” or “high”. As users should not be forced to use the general attribute maintenance for that, an additional button is requested.
Step 1 | Copy the function module /RTC/TM_TMPL_WF_TOOLBAR to a new function module |
Add the following code:
case iv_funccode.
* Replace <CustomerFunction1> with the function code, you want to assign to your
button (max. length: 10 characters)
when '<CustomerFunction1>'. "Your defined function code
IF NOT it_trkorr[] IS INITIAL.
SELECT * FROM /rtc/tm_attrib03 INTO TABLE lt_attrib03
FOR ALL ENTRIES IN it_trkorr WHERE
Trkorr = it_trkorr-trkorr AND
Attr_name = ‘PRIORITY’.
LOOP AT lt_attrib03 ASSINGING <lw_attrib03>.
IF <lw_attrib03>-value = space.
<lw_attrib03>-value = ‘HIGH’.
ELSE.
<lw_attrib03>-value = ‘ ’.
ENDIF.
ENDLOOP.
MODIFY /rtc/tm_attrib03 FROM TABLE lt_attrib03.
when others.
message i154(/rtc/tmm00)
with 'Function code'(020) iv_funccode 'not defined'(021)
raising error.
Endcase.
Please note: The template function module let you think that you can add code for several user exit buttons to just one function module, as there are several function code patterns in the template. In fact in the next step you will see that it currently needs one implemented function module per button …
Step 2 | Define the button and assign your function module |
Call transaction /RTC/TM on the TM Server
Goto “TransportManager -> Settings -> Global
Select the Workflow-Monitor Tab
Switch to Edit Mode and press the Insert Line button
Provide the information that is requested:
Confirm and save your settings.