Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 

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. :wink:

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.




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.




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.



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 = sy-langu.

*--------------------------------------------------------------------*
* Get C/R Type texts
*--------------------------------------------------------------------*

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


*--------------------------------------------------------------------*
* 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_ext-usmd_creq_type.

   
MOVE-CORRESPONDING ls_crequest_ext TO <ls_wi>.

* Assign C/R information to POWL fields:
    <ls_wi>
-wi_text            = ls_crequest_ext-usmd_creq_text.            "Subject
    <ls_wi>
-wi_created_by      = ls_crequest_ext-usmd_created_by.            "User-ID
    <ls_wi>
-wi_end_ts          = ls_crequest_ext-usmd_created_at.            "Sent on
    <ls_wi>
-usmd_status_descr  = ls_crequest_ext-usmd_creq_status_text.      "Status

    <ls_wi>
-crequest          = ls_crequest_ext-usmd_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].




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.




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.

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


5.2    Application configuration




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!




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.




7.    Test it!




Best regards,

Flo



7 Comments
Labels in this area