Skip to Content

Dear followers of the scn-community,

I am new in the community and this is my first BLOG. So I want to present you my first customer solution in MDG!

The topic of my post is how to change the user interface of the worklist. There are just a few steps to follow and I promise that you won’t regret a closer look on the pictures. 😉

Let’s get started!


The first screenshot below shows the worklist view of the standard. Especially the “Subject”-column is full of information and looks much overloaded. Therefore the adaptation of this view is getting more and more a part of the customer’s requirements.  The second picture you can see below is one example of an adapted view which is clear and limited to the essential information.


Standard:

Adapted:


But how can you adapt this?
The following st
eps should help you, how you can handle this:


Agenda

  1. Basics
  2. POWER List Design
  3. POWER List Implementation
  4. POWER List Registration
  5. POWER List UI configuration
  6. Role assignment
  7. Test it



1.    Basics

1.1    Basic Concept

The POWER List is a framework which can list business objects and allows specific actions based on these objects. The central concept is that all properties can be specified within on central class…the feeder class. The feeder class is handling between the database and the POWER List. So this is the most important place while developing and modifying a POWER List.


1.1    Role Dependency

The roles are the access point to all the POWER Lists in the system. A so called APPLID determines which POWER List will be called. Therefore the assignment of APPLIDs to a role determines which POWER List will be available for the role.



2.    POWER List Design

2.1    Creating a structure

Create a new structure within the transaction [SE11] and include the standard structure of the POWL. You can also add addional components too.


/wp-content/uploads/2014/02/structure_388037.gif


2.1    Creating a table type

Copy the standard table type of the POWL within the transaction [SE11] and replace the line type with your recently created structure.


/wp-content/uploads/2014/02/tabletype_388038.gif



3.    POWER List Implementation

3.1    Creating a feeder class

Copy the feeder class of the standard within the transaction [SE24]. To adapt the design of the POWL you have to change the reference to the table type and structure of the standard. So just fix the two method implementations you can see in the following animation.



/wp-content/uploads/2014/02/copyfeeder_388039.gif

3.2    Adapt Content

Coding of method: IF_POWL_FEEDER~GET_OBJECTS 

Within the method ~getObjects you can adapt the content of the POWL. This implementation is an example how to change the columns and their content. Just delete the existing coding and replace it with my short demo implementation. It might helps you to understand how this method works.


  METHOD IF_POWL_FEEDER~GET_OBJECTS.

* Structures
 
DATA ls_workitem      TYPE ibo_s_wf_facade_inbox_wi.
 
DATA ls_result        TYPE ibo_s_inbox_workitem.
 
DATA ld_crequest      TYPE usmd_crequest.
 
DATA ls_crequest_ext  TYPE usmd_s_crequest_ext.
 
DATA ls_creq_type_txt TYPE usmd110t.
 
DATA ls_creq_stat_txt TYPE usmd202t.

* Objects
 
DATA lo_model        TYPE REF TO if_usmd_model.
 
DATA lo_crequest_util TYPE REF TO cl_usmd_crequest_util.

* Field Symbols
 
FIELD-SYMBOLS: <ls_wi> TYPE zmdg_s_crequest_powl.

* Table
 
DATA lt_creq_type_txt TYPE STANDARD TABLE OF usmd110t.
 
DATA lt_creq_stat_txt TYPE STANDARD TABLE OF usmd130t.

*——————————————————————–*
* Select Action Texts
*——————————————————————–*
 
SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_creq_stat_txt
     
FROM usmd130t
     
WHERE langu = sylangu.

*——————————————————————–*
* Get C/R Type texts
*——————————————————————–*

  SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_creq_type_txt
   
FROM usmd110t
   
WHERE langu = sylangu.

*——————————————————————–*
* Get POWL parameters
*——————————————————————–*

  CALL METHOD super->if_powl_feeder~get_objects
   
EXPORTING
      i_username             
= i_username
      i_applid               
= i_applid
      i_type                 
= i_type
      i_selcrit_values       
= i_selcrit_values
      i_langu               
= i_langu
      i_visible_fields       
= i_visible_fields
   
IMPORTING
      e_results             
= e_results
      e_messages             
= e_messages
      e_workflow_result_count
= e_workflow_result_count.

*——————————————————————–*
* Get instance of MDG Data Model
*——————————————————————–*

  CALL METHOD cl_usmd_model=>get_instance
   
EXPORTING
      i_usmd_model
= space
   
IMPORTING
      eo_instance 
= lo_model.

*——————————————————————–*
* Get Workflow Data
*——————————————————————–*

  CREATE OBJECT lo_crequest_util.
 
LOOP AT e_results ASSIGNING <ls_wi>.
   
CLEAR ld_crequest.
   
CLEAR ls_crequest_ext.
   
CALL METHOD cl_usmd_wf_service=>get_wi_crequest
     
EXPORTING
        id_wi_id   
= <ls_wi>wi_id
     
IMPORTING
        ed_crequest
= ld_crequest.

*——————————————————————–*
* Get C/R header data
*——————————————————————–*

    IF ld_crequest IS NOT INITIAL.
     
CALL METHOD lo_crequest_util->get_crequest
       
EXPORTING
          id_crequest   
= ld_crequest
          io_model       
= lo_model
       
IMPORTING
          es_crequest_ext
= ls_crequest_ext.
   
ENDIF.

*——————————————————————–*
* Assign/Overwrite values of the target structure
*——————————————————————–*

    READ TABLE lt_creq_type_txt INTO ls_creq_type_txt
   
WITH KEY usmd_creq_type = ls_crequest_extusmd_creq_type.

    MOVE-CORRESPONDING ls_crequest_ext TO <ls_wi>.

* Assign C/R information to POWL fields:
    <ls_wi>
wi_text            = ls_crequest_extusmd_creq_text.            “Subject
    <ls_wi>
wi_created_by      = ls_crequest_extusmd_created_by.            “User-ID
    <ls_wi>
wi_end_ts          = ls_crequest_extusmd_created_at.            “Sent on
    <ls_wi>
usmd_status_descr  = ls_crequest_extusmd_creq_status_text.      “Status

    <ls_wi>crequest          = ls_crequest_extusmd_crequest.

  endloop.

  ENDMETHOD.


3.3    Fixing action links

Within the methods HANDLE_SPECIAL_ACTION and ~GET_ACTIONS you have to adapt the action links. The following coding is handling

the action linking like it is in the standard.


Coding of method: IF_POWL_FEEDER~GET_ACTIONS

METHOD if_powl_feeder~get_actions.

*——————————————————————–*
* Adapt Link Actions of own POWL.
*——————————————————————–*
 
DATA lv_applid TYPE powl_applid_ty.
 
DATA lv_type TYPE powl_type_ty.

  IF i_applid = ‘ZMDG_CREQUEST_POWL_APPL’ AND i_type = ‘ZMDG_CREQUEST_WI’.
    lv_applid
= ‘FIN_MDM_CREQUEST’.
    lv_type
= ‘USMD_CREQUEST_WI’.
 
ENDIF.
*——————————————————————–*

  CALL METHOD super->if_powl_feeder~get_actions
   
EXPORTING
      i_username       
= i_username
      i_applid         
= lv_applid
      i_type           
= lv_type
      i_selcrit_para   
= i_selcrit_para
*    i_langu          = SY-LANGU
*  IMPORTING
*    e_actions_changed =
   
CHANGING
      c_action_defs   
= c_action_defs
     
.
ENDMETHOD.


4.    POWER List Registration

4.1    Creating an application Id

Create a new application id within the transaction [FPB_MAINTAIN_HIER].


/wp-content/uploads/2014/02/applid_388040.gif


4.2    Creating POWL type

Create a new POWL type within the transaction [POWL_TYPE].  Fill in the feeder class field with you recently createdfeeder class.


/wp-content/uploads/2014/02/powltype_388041.gif

4.3    Creating POWL query

Create a new POWL query within the transaction [POWL_QUERY] and fill in the POWL type field with your recently created POWL type.

After saving that task you can choose this button  to get into customizing view of the POWL. However in this case we do not need any further customizings.

/wp-content/uploads/2014/02/powlquery_388042.gif

5.    POWER List UI configuration
Open the IBO_WDC_INBOX Web Dynpro Component within transaction [SE80]. Start the component configuration of USMD_CREQUEST_POWL. Make a copy of the standard and change application id of the configuration context. After that start the configuration mode of the application configuration USMD_CREQUEST_POWL. Now you can assign your own component configuration like you can see it in the animation.


5.1    Component configuration

/wp-content/uploads/2014/02/ui_comp_conifg_388060.gif


5.2    Application configuration


/wp-content/uploads/2014/02/ui_app_conifg_388070.gif


6.    Role Assignment

6.1    Creating POWL role assignment

Create a new role assignment within the transaction [POWL_TYPER]. Fill in the lines with your own application id and POWL type. Then assign it to a role, e.g. in this case SAP_MDGC_REQ_03. Create another role assignment within the transaction [POWL_QUERYR] and fill in the required fields. The category can be set like it is customized in the standard (USMD_CREQUEST_DEFAULT). Attention: Do not forget to assign the activation flag!


/wp-content/uploads/2014/02/roleassign_388046.gif


6.2    Assign application configuration to role

Within the transaction [PFCG] you can now assign your application configuration to the role you have chosen in the step before. Show the details of the change request view – service within the menu tree by executing a double click. Now just change the standard application configuration to your own.


/wp-content/uploads/2014/02/addtorole_388047.gif



7.    Test it!

/wp-content/uploads/2014/02/testit_388087.gif



Best regards,

Flo

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Florian Raab Post author

    Hi again,

    I would like to add something to chapter 3 (implementation):

    Of course you can inherit from the class CL_USMD_CREQUEST_POWL and redefine these methods too!

    It’s not necessary to do a whole copy of this class.

    Best regards,

    Flo

    (0) 
  2. Sreenivas Raju

    Hi Florian,

    Thank you for the nice blog. I have tried the same way you have advised. But I am getting a dump in the GET_OBJECTS method at assigning into <ls_wi> regarding type_conflct.

    Please advise.Dump.JPGDump2.JPG

    (0) 
    1. Florian Raab Post author

      Hi Raju,

      It seems to be that the assignments of the table type and the structure is missing. I have noticed that I have forgot to mention this, sry for that!

      Please also implement these assignments wihtin your feeder class:

      Unbenannt.PNG

      Coding of method: IF_POWL_FEEDER~SET_MV_RESULTS

      Unbenannt1.PNG

      Coding of method: IF_POWL_FEEDER~SET_MV_RESULTSTRUCTURE

      Unbenannt2.PNG

      Would you please give me a feedback then? 🙂

      Kind regards

      Flo

      (0) 
  3. mohd waliullah

    Hi Florian,

    Great information.

    Had one query i have created a custom Workflow with BUS2250- Process method and i want the work item to be appeared in the my change request POWL under to be approved by me section.

    Can you help me with necessary configuration to be done.

    Thanks in Advance.

    (0) 

Leave a Reply