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: 
MattHarding
Active Contributor

Warning

This is written for those who live and breathe Workflow & Inboxes plus are implementing Fiori My Inbox. It's a quick post just to put my thoughts on a solution when moving from POWL based Inbox to Fiori My Inbox; very open to debate!

From Inbox to Fiori My Inbox - The hurdle

As part of an implementation of My Inbox at a customer who already has the POWL based Universal Inbox (Let's Crowd Source a POWL Based Universal Worklist Design for ERP) I quickly discovered how many out-of-the-box task approvals were based on an out-of-the-box visualisation that for unknown reasons, relied on more than just the Work Item and Task Id's (I'm looking at you EH&S & T&M). Now this was fine in the POWL based Inbox as it allowed additional work item container parameters to be dynamically inserted via the Action configuration, but Fiori My Inbox moves back to transaction SWFVISU for visualisation, but without the XML config that the Portal supported which allowed you to map these parameters. This is problem #1.

Problem #2, which is more annoying than a problem, is that the use of Object Based Navigation is not an option. e.g. Since the Fiori Launchpad moves to Intents as opposed to Portal/NWBC OBN's; I'm assuming a decision was made to not allow OBN's to be processed in the Fiori Launchpad for older transactions (very non S/4 requirement I know).

So with that knowledge, I've been toying with the approach today, and just wanted to run it by the community (mainly because it works, but I really wish SAP had done this, so I didn't have to request an implicit enhancement).

Solving Problem #2 is easy, as all we need to do is remove the OBN layer and point directly at the Web Dynpro application (or similar). Of course, this is not simple to do since the OBN is hidden in menu roles (ignoring Portals and focusing on NWBC). Luckily, there is a simple program to find navigation targets (OBN.02 Failed to Resolve Object-Based Navigation - SAP NetWeaver Business Client - SAP Library) but you still need to search around a little to find the menu item in question.

So with that, we just move the underlying menu item and the configuration from the POWL Actions configuration into transaction SWFVISU for the task in question. Now we are just left with Problem #1 in cases where additional workflow container data is required to launch the visualisation.

So my main issue is to do with Web Dynpro ABAP visualisations.  I looked into the code which does the visualisation, and it's quite clear that it will only convert across 2 hard-coded dynamic parameters. Looking through SCN, SMP, Google and talking to others; it was clear that for Fiori My Inbox - There is no hidden functionality to address this, so I then resorted to....A post-method implicit enhancement!

Post Method Implicit Enhancement

Now anyone who knows me, knows that I think this is the same as a modification, and you really need a strong business case if you are doing to do an implicit enhancement, but I have a sexy new Inbox with 50+ tasks to get up and running; and just no way to achieve all of these as UI5 based approvals in the near future; so I think I have a temporary business case if there is no other way.

Anyway, the code is pretty straightforward (and below is my first cut at just seeing this will work for first level Work Item Container data) In short, it's just quickly scanning the returned parameters, and if it detects a ${ITEM.SOMETHING}; then it will get all work item container variables then replace them in the returning parameters table:


METHOD IPO_ZENH_BADI_MYINBOX_EXECPAR~GET_WD_PARAMETERS.
*"------------------------------------------------------------------------*
*" Declaration of POST-method, do not insert any comments here please!
*"
*"methods GET_WD_PARAMETERS
*"  changing
*"    value(RE_PARAMETERS) type TIHTTPNVP . "#EC CI_VALPAR
*"------------------------------------------------------------------------*
  data:
    lt_parameters type IBO_T_WF_CFG_INBOX_TS_ATTR.
  loop at re_parameters ASSIGNING FIELD-SYMBOL(<ls_parameter>).
    IF <ls_parameter>-value cs '${'.
      " Get parameter to replace
      append <ls_parameter>-value to lt_parameters.
    endif.
  endloop.
  if lines( lt_parameters ) > 0.
    try.
    data(lt_dynamic_task_attributes) = cl_ibo_wf_inbox_facade=>get_task_container_params(
      iv_workitem_id     = me->core_object->m_wiid->*
      it_attribute_names = lt_parameters
      ).
      LOOP AT lt_dynamic_task_attributes ASSIGNING FIELD-SYMBOL(<lv_attribute>).
        CONCATENATE '${ITEM.' <lv_attribute>-name '}' INTO DATA(lv_name).
          LOOP AT re_parameters ASSIGNING <ls_parameter>.
            IF <ls_parameter>-VALUE = lv_name.
              REPLACE ALL OCCURRENCES OF lv_name IN <ls_parameter>-value with <lv_attribute>-value.
            ENDIF.
          ENDLOOP.
      ENDLOOP.
    catch cx_ibo_wf_error cx_ibo_wf_abort.
    endtry.
  endif.
ENDMETHOD.

Is there a better way?

So that's it - But is there a less drastic way to do this? Will SAP release a backwards compatible note with better code than above to help us out (or have they already)? Whatever the outcome, I hope this helps you if you also go down this path in the near future! Thanks for reading.

9 Comments
Labels in this area