SAP Cookbook For Reuse Inbox From Business Suitee+Inbox+Cookbook+Version+1.12
SAP Cookbook For Reuse Inbox From Business Suitee+Inbox+Cookbook+Version+1.12
SAP Cookbook For Reuse Inbox From Business Suitee+Inbox+Cookbook+Version+1.12
Huaiyang Mao
Volker Guzman
Jrg Brose
Oliver Hilss
Frank Dauscher
Suite Renovation
Cookbook for Reuse Inbox from Business Suite
Foundation Layer
Document Version
Status
Date
0.9
Draft
22.09.09
0.10
Draft
16.10.09
0.11
Draft
27.10.09
1.0
Released
01.12.09
1.1
Released
18.10.09
1.12
Released
10.02.10
Features and functions, which are not mentioned in this document, are
not supported in the current release. You may submit your Development
Request for the next release through SRM Solution Management.
Suite Renovation
Inhaltsverzeichnis:
1 Inbox ................................................................................................................................ 4
1.1 Introduction ................................................................................................................................................. 4
Seite 2
Suite Renovation
4 FAQ ................................................................................................................................ 35
5 APPENDIX ..................................................................................................................... 36
5.1 Standard Actions ......................................................................................................................................36
5.1.1 Standard Actions in Work Item POWL ...................................................................................................36
5.1.2 Standard Actions in Alert POWL ............................................................................................................36
5.1.3 Standard Actions in Notification POWL ..................................................................................................36
5.2 Adapt the layout and pushbuttons of POWL in SRM ............................................................................37
5.2.1 Adjusting the initial table layout ..............................................................................................................37
5.2.2 Configuring the pushbuttons ..................................................................................................................37
Seite 3
Suite Renovation
1 Inbox
1.1 Introduction
The Inbox is a POWL application with extended functionality: workflow task specific action per configuration,
Details Area, Substitution Filter etc. The following figure depicts an overview of building blocks of Inbox.
Inbox
SRB-EBP-INB
WD Inbox
POWL
WD
Substitute
Action
Handler
R
R
Refresh
Handler
Configuration
Provider
Feeder
...
...
Inbox Facade
Subst
Facade
Seite 4
Suite Renovation
Basic re-use with action configuration in step 7 (However, you will not have any application specific
actions avaible except default action for the work item text link). After configuration you can start the
inbox as in step 10.
Advanced re-use with configuration and implementation of your own feeder classes, subclass of
class CL_IBO_INBOX_FEEDER_WI for work items, subclass CL_IBO_INBOX_FEEDER_NOTIF for
notification, or CL_IBO_INBOX_FEEDER_ALERT for alert, respectively. This allows complete
control of work item list and field catalog.
Remark: See chapter 5.1 for a list of default actions provided. For these actions buttons are available without
the need to create your own feeder implementations.
Remark : The POWL framework does not provide customizing tables for buttons and field catalogs; instead,
each using application must implement their own feeder classes. The inbox as a re-use of the POWL
assumes that each application already uses the POWL, already has a framework/ set of utility classes that
assists with POWL buttons and field catalogs, and intends to re-use these.)
The steps to be followed as:
1.
Seite 5
Suite Renovation
should have a default action, this action will be executed on link click (e.g. in SRM, a click opens a
document in a new window).
8. (Optional) Create a Webdynpro component configuration
Create a Webdynpro component configuration for the Webdynpro component IBO_WDC_INBOX and set
the POWL application ID. This is required for finding the correct configuration (e.g. SRM uses the POWL
application ID SAPSRM_IBO_INBOX).
9. (Optional) Create a Webdynpro application configuration
Create a Webdynpro application configuration for the Web Dynpro application IBO_WDA_INBOX
(package IBO_INBOX_UI) and set the Webdynpro component configuration for WD component
IBO_WDC_INBOX and POWL_UI_COMP(e.g. SRM uses a Webdynpro component component
configuration /SAPSRM/IBO_WDCC_INBOX which is referenced in Webdynpro application
configuration /SAPSRM/IBO_WDAC_INBOX).
10. Start the application
Start the Webdynpro application IBO_WDA_INBOX with WDCONFIGURATIONID =
IBO_WDAC_POWL_INBOX (for basic reuse) or the in step 7 created Webdynpro application
configuration.
11. (optional) Maintain the menu of role if Navigation Frame used.
In transaction PFCG ensure that your employee role has the following menu entry:
Inbox referring to WD application IBO_WDA_INBOX with parameter WDCONFIGURATIONID set to
your Webdynpro application configuration created in step 7 (e.g. SRM uses a Webdynpro component
component configuration /SAPSRM/IBO_WDCC_INBOX which is referenced in Webdynpro application
configuration /SAPSRM/IBO_WDAC_INBOX).
These settings are recommended, they ensure that an employee user can open the inbox from his user
menu.
The following figure shows the architecture of reuse inbox in general.
Seite 6
Suite Renovation
Seite 7
Suite Renovation
Seite 8
Suite Renovation
3.1.1 Constructor
The constructor of the feeder should initialize the feeder as in the following coding.
METHOD constructor.
super->constructor( ).
CALL METHOD me->initialize_feeder.
ENDMETHOD.
iv_type
= iv_type
iv_langu
= iv_langu
et_actions = lt_actions ).
IMPORTING
add application specific actions
ls_action-actionid = 'APPROVE'.
ls_action-cardinality = 'S'. "At least one object has to be selected
ls_action-placement = 'B'. "Toolbar
ls_action-enabled = 'X'.
ls_action-placementindx = '1'.
ls_action-text = 'Approve'(001).
ls_action-tooltip = 'Approve'(002).
INSERT ls_action INTO TABLE lt_actions.
et_actions = lt_actions.
ENDMETHOD.
Seite 9
Suite Renovation
METHOD read_cust_fieldcat.
DATA ls_fieldcat
TYPE powl_fieldcat_sty.
DATA lt_fieldcat
TYPE powl_fieldcat_tty.
DATA ls_fieldcat_wa TYPE powl_fieldcat_sty.
*
iv_type
= iv_type
iv_langu
= iv_langu
et_fieldcat = lt_fieldcat ).
*
*
*
*
*
in standard inbox the display type of work item text is LU (Link to URL)
because it is assumed that each re-use application uses the link to
display a URL (OBN or launchpad) if work item text clicked.
you can override its display type of to TV (Text View) if no action needs
to be performed.
ls_fieldcat_wa-display_type = 'TV'. "Text View
MODIFY TABLE lt_fieldcat FROM ls_fieldcat_wa
TRANSPORTING display_type.
et_fieldcat = lt_fieldcat.
ENDMETHOD.
Seite 10
Suite Renovation
if_powl_feeder~get_objects.
lt_results
TYPE your_ibo_t_inbox_workitem.
lr_result
TYPE REF TO your_ibo_s_inbox_workitem.
lt_container
TYPE swrtcont.
lr_container
TYPE REF TO swr_cont.
lt_messages
TYPE powl_msg_tty.
lv_return_code TYPE sy-subrc.
Seite 11
Suite Renovation
i_selcrit_values
i_langu
i_visible_fields
IMPORTING
e_results
e_messages
.
= i_selcrit_values
= sy-langu
= i_visible_fields
= lt_results
= lt_messages
* Fill additional work item information, e.g. from workflow container using
* the function module 'SAP_WAPI_READ_CONTAINER'
LOOP AT lt_results REFERENCE INTO lr_result.
CLEAR lt_container.
CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
EXPORTING
workitem_id = lr_result->wi_id
IMPORTING
return_code = lv_return_code
TABLES
simple_container = lt_container
.
READ TABLE lt_container REFERENCE INTO lr_container WITH KEY element = 'TOTA
L_VALUE_STRING'.
lr_result->total_value_string = lr_container->value.
ENDLOOP.
e_results = lt_results.
ENDMETHOD.
Seite 12
Suite Renovation
Create a context ID
(APPLID)
Transaction:
FPB_MAINTAIN_HIER
Seite 13
Suite Renovation
3.2.1
If you want to reuse the standard inbox with configuration only, you dont need create a new POWL
application; otherwise, start transaction FPB_MAINTAIN_HIER. This transaction is used to create the POWL
application (POWL Application ID = APPLID) and to provide a short textual description (Name of POWL).
APPLID is needed in order to identify your POWL and the content ( POWL Feeder Types ).
Seite 14
Suite Renovation
3.2.2
Create your own POWL Feeder Type with your own Feeder Class
Start transaction POWL_TYPE to create the new POWL Feeder Type. This POWL Feeder Type has to be
assigned to the Feeder Class. Description of this POWL Feeder Type has to be added. The description will
be used within the POWL dialog for the user specific query definition.
In addition attribute Sync must be set for inbox, this will force a synchronous refreshing of this type. By
default the POWL refreshes asynchronous.
Seite 15
Suite Renovation
3.2.3
Assign the POWL Feeder Type to the your Inbox POWL application
Start the transaction POWL_TYPER to tell the POWL Application which feeder types are available for the
new POWL application of Inbox (APPLID). If there are no entries for the Feeder Type in this table or the
following transaction POWL_TYPEU, this Feeder Type will not be available within the POWL and all queries
based on this type wont be available too.
Seite 16
Suite Renovation
Remark: For SRM POWL only the Transaction POWL_TYPER is used without Role assignment.
Figure 10: Assign POWL Feeder Type to POWL application in Transaction POWL_TYPER
Seite 17
Suite Renovation
Query Parameters
Query Parameters for represented Query have to be filled.
Seite 18
Suite Renovation
Query Settings
Query Settings for represented Query have to be maintained.
Seite 19
Suite Renovation
Seite 20
Suite Renovation
Figure 14: Assign POWL Query to POWL Application in the Transaction POWL_QUERYR
Seite 21
Suite Renovation
Note: The Complete action for work item is specific to tasks which has set the flag Confirm end of
processing in the transaction PFTC (maintain task). This action will be enabled if the work item has the
status COMMITTED and its attribute WI_CONFIRM is X.
Seite 22
Suite Renovation
Seite 23
Suite Renovation
Seite 24
Suite Renovation
3.3.8 Defining the Standard Actions for Tasks, Notifications and Alerts
Additionally to the actions assigned to a specific task (see chapter 3.3.7), there are standard actions for all
tasks, notifications and alerts defined in the respective methods GET_STA_ACTIONS_FOR_TASK_TYPE,
GET_ACTIONS_FOR_NOTIFICATION and GET_ACTIONS_FOR_ALERT of class
CL_IBO_WF_INBOX_CFG_PROV.
ACTION_ID
ACTION_TYPE
OBJECTNAVIGATIONLAUNCHER
2.
TASK_ID
DEFAULT_ACTION
3.
ACTION_ID
PROP_NAME
PROP_VALUE
<POWL
application
ID>
'OBJECTNAME'
<BO Name>
<POWL
application
ID>
'OPERATION'
<BO Operation>
<POWL
application
ID>
'SYSTEM'
<System Alias>
<POWL
application
ID>
'OBJECTVALUE'
4.
IBO_C_WF_CAS
In this table you can configure the parameters which value will be read from the Workflow Container; the
OBN parameters configured in IBO_C_WF_APS will be replaced by the values.
APPL_ID
TASK_ID
<workflow
task, e.g.
TS400079
53>
TASK_COMP
LETED
CUST_AT_NAME
<e.g. BOTYPE>
Seite 25
Suite Renovation
<workflow
task, e.g.
TS400079
53>
<e.g. BOID>
ACTION_ID
ACTION_TYPE
LAUNCHPADHANDLER
2.
TASK_ID
DEFAULT_ACTION
3.
ACTION_ID
PROP_NAME
PROP_VALUE
<POWL
application
ID>
' LPD_ROLE'
<POWL
application
ID>
' LPD_INSTANCE'
<POWL
application
ID>
' LPD_APPL_ALIAS'
<POWL
application
ID>
' LPD_BUS_PARAMS'
4.
IBO_C_WF_CAS
In this table you can configure the parameters which value will be read from the Workflow Container; the
OBN parameters configured in IBO_C_WF_APS will be replaced by the values.
APPL_ID
TASK_ID
TASK_COMP
LETED
CUST_AT_NAME
<workflow
task, e.g.
TS400079
53>
<e.g. BOTYPE>
<workflow
task, e.g.
TS400079
53>
<e.g. BOID>
Seite 26
Suite Renovation
Seite 27
Suite Renovation
Type
Description
EV_ADDITIONAL_TASK_DESCRIPTION
STRING
ET_ADDITIONAL_TEXT_FIELDS
IBO_INBOX_T_TEXT
_AND_LABEL
EV_ADDITIONAL_TASK_DESCRIPTION
ABAP_BOOL
Seite 28
Suite Renovation
Seite 29
Suite Renovation
To archieve this you need to create a role in the transaction PFCG and maintain your inbox in the menu.
Seite 30
Suite Renovation
= NAVIGATE
Parameter Mapping:
Transaction SWNWIEX
Value SWF_WIOBN.NAVIGATE
P_NOSECM
{P_NOSECM}
P_ACTION
{P_ACTION}
P_WI_ID
{P_WI_ID}
Seite 31
Suite Renovation
Seite 32
Suite Renovation
First of all, the method HANDLE_SPECIAL_ACTION of the POWL feeder will return E_PORTAL_ACTIONS
of type POWL_FOLLOW_UP_STY as following:
BO_NAME = sc
BO_OP_NAME = detailprof
Then based on this OBN parameters the business client will find out the associated application, in PFCG.
Seite 33
Suite Renovation
Seite 34
Suite Renovation
4 FAQ
1. How to restrict the result list of inbox in general?
You can override the method IF_POWL_FEEDER~GET_OBJECTS in the standard feeder so that
filtering can be performed additionally by the subclasses of inbox feeder, see chapter 3.1.6.
2. How to use OBN navigation with parameters that are not available in the work item container?
You have to configure a FUNCTIONMODULEACTIONHANDLER action. Implement a function module
and assign it to your action. The function module should have an exporting parameter OBN_TARGET of
type IBO_S_WD_UI_OBN. Of course, the function module may also have import parameters that can be
filled with work item container values and used in your function module e.g. work item ID.
In your function module fill the export structure OBN_TARGET with appropriate values. For reference,
you can look at method EXECUTE_ACTION_WITH_PARAMS of class
CL_IBO_CH_WD_INB_ACTHDL_ON on how to work with this structure.
Seite 35
Suite Renovation
5 APPENDIX
5.1 Standard Actions
5.1.1 Standard Actions in Work Item POWL
The following actions are provided as standard buttons in the work item POWL.
Action
Constant
Description
Resubmit
if_ibo_inbox_feeder_c=>gc_action_resubmit
End Resubmission
if_ibo_inbox_feeder_c=>gc_action_end_resubmission
Forward
if_ibo_inbox_feeder_c=>gc_action_forward
Assign To Me
if_ibo_inbox_feeder_c=>gc_action_assigntome
Cancel Assignment
if_ibo_inbox_feeder_c=>gc_action_cancelassignment
Substitution
if_ibo_inbox_feeder_c=>gc_action_substitution
Maintain substitution
rule
Refresh
if_ibo_inbox_feeder_c=>gc_action_refresh
Constant
Description
Subscribe
if_ibo_inbox_feeder_c=>gc_action_subscrib
Subscribe Alert
Category
Forward
if_ibo_inbox_feeder_c=>gc_action_forward_alert
Forward Alert
Complete
if_ibo_inbox_feeder_c=>gc_action_complete_alert
Complete Alert
Refresh
if_ibo_inbox_feeder_c=>gc_action_refresh
Constant
Description
Delete
if_ibo_inbox_feeder_c=>gc_action_delete_notification
Delete
Notification
Resubmit
if_ibo_inbox_feeder_c=>gc_action_resubmit
Resubmit
Notification
Seite 36
Suite Renovation
Refresh
if_ibo_inbox_feeder_c=>gc_action_refresh
Seite 37
Suite Renovation
3. If you want to group several actions, you can use pushbuttons with dropdown boxes containing
several actions. To do so, select an action and choose Action Dropdowns in the dialog structure.
4. Enter the action IDs of the actions as well as the corresponding texts that you want to appear in the
dropdown box.
Seite 38