Hi,
I came across the requirement where in i need to develop custom work inbox screen(using webdynpro) same as standard screen with additional fields.
On the click of subject hyperlink, i need to open custom approver screen instead of standard approver screen.In my custom approver screen, i have button namely change and approve request. On the click of that button, i need to open standard approver screen.
I followed below link to open standard approver screen( drawback is that : it opens approver screen in display mode)
Customizing Access request and approval screens in GRC Access Control
DATA: it_visible_fields TYPE powl_visible_cols_tty,
lt_results TYPE grfn_t_unified_powl,
lw_results TYPE grfn_s_unified_powl,
lt_messages TYPE powl_msg_tty,
lt_selcrit_values TYPE rsparams_tt,
lt_requser TYPE grac_t_api_user_info,
lv_index TYPE sy-tabix.
lw_visible_fields-colid = 'CREATED_BY'.
APPEND lw_visible_fields TO it_visible_fields.
CLEAR lw_visible_fields.
lw_visible_fields-colid = 'CREATED_ON'.
APPEND lw_visible_fields TO it_visible_fields.
lw_visible_fields-colid = 'DUE_DATE'.
APPEND lw_visible_fields TO it_visible_fields.
CLEAR lw_visible_fields.
lw_visible_fields-colid = 'STATUS_DESC'.
APPEND lw_visible_fields TO it_visible_fields.
CLEAR lw_visible_fields.
lw_visible_fields-colid = 'SUBJECT'.
APPEND lw_visible_fields TO it_visible_fields.
*----->data retrieval for represented object type
CREATE OBJECT obj.
CALL METHOD obj->if_powl_feeder~get_objects
EXPORTING
i_username = sy-uname
i_applid = 'GRFN_INBOX'
i_type = 'GRFN_INBOX'
i_selcrit_values = lt_selcrit_values
i_langu = sy-langu
i_visible_fields = it_visible_fields
IMPORTING
e_results = lt_results
e_messages = lt_messages.
In lt_results, we will get all workitem data, we just need to read that internal table with index( index of hyperlink on which it is clicked).
READ TABLE lt_results INTO ls_results INDEX r_param_index.
if sy-subrc = 0.
workitem_id = ls_results-request_no. ( ls_results-request_no holds workitem id).
endif.
Thanks
KH