Skip to Content
Author's profile photo Former Member

Opening of GRC Approver Screen

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 sytabix.

lw_visible_fields-colid = ‘CREATED_BY’.

    APPEND lw_visible_fields TO it_visible_fields.

    CLEAR lw_visible_fields.

    lw_visible_fieldscolid = ‘CREATED_ON’.

    APPEND lw_visible_fields TO it_visible_fields.

    lw_visible_fieldscolid = ‘DUE_DATE’.

    APPEND lw_visible_fields TO it_visible_fields.

    CLEAR lw_visible_fields.

    lw_visible_fieldscolid = ‘STATUS_DESC’.

    APPEND lw_visible_fields TO it_visible_fields.

    CLEAR lw_visible_fields.

    lw_visible_fieldscolid = ‘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       = syuname

        i_applid         = ‘GRFN_INBOX’

        i_type           = ‘GRFN_INBOX’

        i_selcrit_values = lt_selcrit_values

        i_langu          = sylangu

        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

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Colleen Hebbert
      Colleen Hebbert

      Hey Katrice

      is it possible for you to include some screen shots of what thus code translates to?

      cheers

      Colleen

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Colleen,

      Thanks for reminding me.Due to hectic schedule,i forgot to add snapshots.I'll add them.

      Thanks

      KH

      Author's profile photo Former Member
      Former Member

      Hi everyone,

      you may also use this method:

      rt_inst_wi = cl_grfn_msmp_wi_api=>retrieve_instance_wis( i_instance_id = i_instance_id

                                                                    i_path_id     = i_path_id

                                                                    i_path_seq    = i_path_seq ).



      Regards

      Pourang