Sei sulla pagina 1di 3

    Getting Started Newsletters Store

Hi, Guest Log On Join Us Search the Community

Products Services & Support About SCN Downloads


Activity Communications Actions
Industries Training & Education Partnership Developer Center

Lines of Business University Alliances Events & Webinars Innovation Browse

SAP Fiori 

My Inbox and SWFVISU Visualisation Limitations in
Migration (Plus possible solution)
Posted by Matt Harding in SAP Fiori on 08­Aug­2016 13:55:34

Share 0 Tweet Like 0

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:
01.  METHOD IPO_ZENH_BADI_MYINBOX_EXECPAR~GET_WD_PARAMETERS.  
02.  *"­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­*  
03.  *" Declaration of POST­method, do not insert any comments here please!  
04.  *"  
05.  *"methods GET_WD_PARAMETERS  
06.  *"  changing  
07.  *"    value(RE_PARAMETERS) type TIHTTPNVP . "#EC CI_VALPAR  
08.  *"­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­*  
09.    data:  
10.      lt_parameters type IBO_T_WF_CFG_INBOX_TS_ATTR.  
11.    loop at re_parameters ASSIGNING FIELD­SYMBOL(<ls_parameter>).  
12.      IF <ls_parameter>­value cs '${'.  
13.        " Get parameter to replace  
14.        append <ls_parameter>­value to lt_parameters.  
15.      endif.  
16.    endloop.  
17.    if lines( lt_parameters ) > 0.  
18.      try.  
19.      data(lt_dynamic_task_attributes) = cl_ibo_wf_inbox_facade=>get_task_container_params(  
20.        iv_workitem_id     = me­>core_object­>m_wiid­>*  
21.        it_attribute_names = lt_parameters  
22.        ).  
23.        LOOP AT lt_dynamic_task_attributes ASSIGNING FIELD­SYMBOL(<lv_attribute>).  
24.          CONCATENATE '${ITEM.' <lv_attribute>­name '}' INTO DATA(lv_name).  
25.            LOOP AT re_parameters ASSIGNING <ls_parameter>.  
26.              IF <ls_parameter>­VALUE = lv_name.  
27.                REPLACE ALL OCCURRENCES OF lv_name IN <ls_parameter>­value with <lv_attribute>­value.  
28.              ENDIF.  
29.            ENDLOOP.  
30.        ENDLOOP.  
31.      catch cx_ibo_wf_error cx_ibo_wf_abort.  
32.      endtry.  
33.    endif.  
34.  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.

226 Views  

Average User Rating

(2 ratings)

Share 0 Tweet Like 0

4 Comments

Christopher Solomon 08­Aug­2016 14:41

Wow! Great work in sleuthing out a "workaround". I am sure you aren't the first to hit this. Thanks for
sharing! I have had my share of headaches with SWFVISU......sometimes it is used....sometimes it is
ignored....sometimes you think it is being looked at when in fact it's not. I got tired of trying to figure it
out and just put my config in there" just in case". haha Guess like many things with SAP, when it is
used simply "depends". haha

Like (0)

Matt Harding 09­Aug­2016 01:06 (in response to Christopher Solomon)

Hi Chris,
 
The fun of multiple clients is everyone does things differently, but sort of the same ­ meaning
you always need to keep on your toes! But sometimes it's just nice when everything just
works so I wish you had been around to set­up the SWFVISU config before I implemented
My Inbox!
 
Cheers,
Matt

Like (1)

Susan Keohan 08­Aug­2016 15:14

Thanks for the great blog, Matt.  As someone who does, in fact, live and breathe Workflow inboxes, I
hope SAP *does* come up with a better way to do this ­ in the next few years it will take me to get to
Fiori (so there's lots of time!).
Cheers,
Sue

Like (0)

Matt Harding 09­Aug­2016 01:08 (in response to Susan Keohan)
Of course, when I wrote "live and breath(e) workflow" you came to mind immediately! (and
thanks for the correction)

Like (0)

Site Index Contact Us SAP Help Portal


Follow SCN
Privacy Terms of Use Legal Disclosure Copyright

Potrebbero piacerti anche