The following steps will explain you on how to add the custom button and handle corresponding functionality in PO Worklist screen of Supply Network Collaboration.
Below is the PO Worklist screen with standard functionality. We will add a new push button next to 'Base UoM' button.
Enhance method 'IF_POWL_FEEDER~GET_ACTIONS' of class '/SCF/CL_FEEDER_CONFPUB_POWL' to add custom button.
Pass below values to insert new row to table 'mt_action_def'.
actionid : 'ZTEST'
cardinality : 'I'
placement : 'B'
enabled : 'X'
placementindx : 3
text : 'Test'
tooltip : 'Test Button'
Activate the enhancement.
PO Worklist screen will now have the custom button 'Test' as shown below.
Handling custom button functionality:
Enhance the method 'IF_POWL_FEEDER~HANDLE_ACTION' of class '/SCF/CL_FEEDER_CONFPUB_POWL'.
Add custom button functionality when the action id is 'ZTEST'.
You can make use of the following fields, structures, tables:
I_USERNAME, I_APPLID, I_TYPE, I_ACTIONID, I_CHANGED, I_ACTION_INDEX, I_ACTION_CONF, I_LANGU, I_ADDITIONAL_DATA, I_VISIBLE_FIELDS, C_SELECTED, C_RESULT_TAB, C_WORKFLOW_RESULT_COUNT, C_ACTION_DEFS, C_FIRST_VISIBLE_ROW, C_FIRST_VISIBLE_SCROLL_COL.
You can populate/update following fields, structures, tables:
E_PORTAL_ACTIONS, E_MESSAGES, E_DO_REFRESH, E_RESULT_LINES_CHANGED, E_CHANGES_PROCESSED, E_SELECTED_CHANGED, E_ACTIONS_CHANGED, C_SELECTED, C_RESULT_TAB, C_WORKFLOW_RESULT_COUNT, C_ACTION_DEFS, C_FIRST_VISIBLE_ROW, C_FIRST_VISIBLE_SCROLL_COL.
The custom functionality can be added to other screens of supplier network collaboration using this approach.