Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
leigh_mason
Employee
Employee

System Details

NetWeaver Gateway

Component

Ver

SP

Description

SAP_BASIS

731

6

SAP Basis Component

SAP_ABA

731

6

Cross-Application Component

GW_CORE

200

6

SAP GW CORE 200

IW_BEP

200

6

Backend Event Provider

UISAPUI5

100

4

SAP UI5

IW_FND

250

6

SAP IW FND 250

SAP Notes of Interest

  • 1805831 - Workflow Support Decision options Nature (Positive/Negative)
  • 1884623 - SP04: Fixes and performance improvements for Fiori Home

Thanks

Thanks to masayuki.sekihara for all his support in providing guidance for our Fiori implementation.  He provided the sample BADI implementation for us as well as answering numerous emails and phone calls.

Useful Links

Assumptions

  • Included some sanity checking with RFC setup etc, this isn’t supposed to be an exhaustive setup guide.  I've assumed you've followed the installation and configuration guide

  • I haven’t gone into a great deal of detail in some cases, I’m assuming you know how to do things such as creating a BADI implementation.

  • You've installed the correct add-ons on both Gateway and target system such as SRM or ECC.

Introduction

A recent twitter conversation between John Moy and Jocelyn Dart prompted me to do a quick blog about the Fiori Generic Approval application. 

The Generic Approval application in Fiori was delivered to provide an Approve / Reject functionality for any SAP workflow with a decision task.  I had a chat to Masa about this and he indicated that the application was also for non-SAP workflow as well ( that would be an interesting blog ).

The application name is ui5_ca_all_apv and you will be able to find the application in the BSP repository via SE80.  If you can’t find the app, then it may not be installed.  Check with whoever did the add-on installations in this case.

We had recently implemented this at a customer and probably went through the same learning curve as everyone else, I hope you find my experiences useful in your implementations.

Apart from the installation of add-ons and making sense of all the SAP Notes ( hardest part ) the Generic Approval ( in our case Leave Request ) was relatively easy to get up and running.

I can hear what you’re all saying, “why not use the standard leave app…” yes, but when you’re working with ITS based leave services, the standard Fiori Leave application doesn’t work hence we used the Generic Approval application instead.

What I wanted to cover:

  • IMG config Gateway + ECC
  • Fiori Catalog and Tile creation
  • PFCG Role Assignment
  • BADI Implementation ( container operation for pushing the workflow along )
  • Adding “approval notes” or “rejection notes”
  • Final Result

What I am not going to cover:

  • Installation - including the SAP Note list for SP6 for Gateway
  • Workflow Build – Assume you have a workflow decision task and workflow scenario ready to rock

Remember, our scenario here is a generic Leave Request approval.  You can apply the same concepts here to other general approval tasks.

OData, RFC Setup and Other Sanity Checks

At some stage, there were a stack of issues for me ( including security stuff ) where I had to go back and verify the configuration of RFC’s and the IMG activities.

This section is just for a sanity check and a place to start looking of things go wrong if your Fiori application starts throwing errors ( such as no RFC destination, OData service errors ).

We also used the Gateway services test harness which shows us the return codes and response for OData services.  When they are returning 200 OK codes you're in good shape, there are some other good tools in there as well to help you work out what's going wrong from the OData side.

Security Issues

Run traces in ST01 when getting authorisation errors, 9 times out of 10 for us, it was a missing authorisation object like S_SERVICE or S_RFCACL.

Follow the installation guide that describes using role templates and copy them.

The other thing to watch out for here is authorisations on the target system.  Ensure your users have the correct authorisations ( e.g. for HR, consider structural auths ).

RFC Entries

  • Check your RFC’s via SM59
  • Ensure that the settings as explained in the installation guide or Masa’s documents are followed.  Take note of the Trust settings

Manage SAP System Aliases

Manage SAP System Aliases SAP NetWeaver->Gateway->OData Channel->Connection Settings->SAP NetWeaver Gateway to SAP System->Manage SAP System Aliases


Check entries here:

  • Check you have two entries, both will point to the same RFC destination.  The alias ending with "PGW" is used for software version /IWPGW/BWF for business workflow, this is the task provider for ECC in our case.
  • Your naming conventions maybe different but ensure the System ID and Client number are populated ( had to blank them out for this blog )

Assign SAP System Aliases to OData Service

SAP NetWeaver->Gateway->OData Channel Development with IW_BEP->Registration->Assign SAP System Aliases to OData Service

Check the entries here:

  • Entry for ZLEAVEAPPROVAL_0001, SAP System Alias will point to the "DEFAULT" software version.
  • Entry for TASKPROCESSING, SAP System Alias will point to the “/IWPGW/BWF" software version.

Activate and Maintain Services

Transaction /IWFND/MAINT_SERVICE SAP NetWeaver->Gateway->OData Channel Development with IW_BEP->Registration->Activate and Maintain Services

Check your entries here:

  • Check ZTASKPROCESSING is pointing to the "/IWPGF/BWF" software version.  The system alias ( in the bottom right corner of the picture ) ends with "_PGW'. 
  • You can also test the service here, which will give you better details and logs if the service fails when called, you’ll have access to the response from the target system too.

Check entries here:

  • For the ZLEAVEAPPROVAL app, make sure the SAP System Alias is pointing to the "DEFAULT" software version, NOT the "/IWPGW/BWF" software version ( see the System Aliases at the bottom right of the picture ).

Testing Services

When you test the services, you should be getting 200OK codes to show you the test was successful. If this is not happening ( could be many reasons ) you can now see the Error Log and the Response which will help you track down SAP Notes, Knowledge Articles on SCN or Service Market Place.

SICF Activation

As always, there is always someone who doesn’t activate their services via SICF.  Make sure the correct SICF entries are activated for the functionality you require.

Gateway Configuration – SPRO

SAP NetWeaver->Gateway Service Enablement->Content->Task Gateway Service->Scenario Definition

You have created a Scenario Definition

  • Notice the Technical Service name is pointing to the IWPGW/TASKPROCESSING

Set your consumer types

  • Make sure your consumer types DESKTOP / MOBILE / TABLET are set.

Assign Task Definition

  • Here check that your SAP System Alias is pointing to the alias with software version "/IWPGW/BWF".
  • Ensure your “TSxxxxxxx” number is correct  This will be the approval task ID in your ECC system.

ECC Configuration – SPRO

There are a couple of things to check here.

SAP NetWeaver->Gateway Service Enablement->Content->Workflow Settings

Check Entries here:

  • Ensure your Workflow ID is correct
  • Ensure the Step ID of the approval task in the worklow is correct ( validate this in SWDD )
  • You have 2 entries for Decision, Approve / Reject ( remember the keys, it’s important when implementing the BADI ).
  • Ensure you’ve selected the POSTIVE, or NEGATIVE from the drop down list
  • NB: Ensure you’ve installed the correct SAP Notes that provide the extensions necessary to perform this configuration.

Tile Configuration – Fiori Admin Page

Here is where we configure the Fiori Tile from the Admin page.  In our implementation we used the catalog ID of SAP_HCM003_HCM_LVRQ_APR only because it already had the appropriate authorisations attached the standard SAP role.  But you can create your own.  Just wanted to explain this because the screen shots may be confusing.

Launch the Admin tool:

http://<host>:<port>/sap/bc/ui5_ui5/ui2/launchpage/admin/admin.html?sap-client=XXX&sap-language=EN

Here is the Catalog page

  • You can create your own Catalog here for the generic application
  • We decided to add another one into HCM003_HCM_LVRQ_APR to take advantage of the SAP Standard Security Role. 

  • When you create a new Tile, create via App Launcher (dynamic)

  • Enter Title, Icon, Service URL and Target URL

Service URL

  • URL for OData service to retrieve data, ensure your SCENARIO ID is included here, the apostrophes are important

/sap/opu/OData/iwpgw/taskprocessing;mo/ScenarioCollection/?$filter=key eq 'Z_APPROVE_LEAVE'

Target URL

  • URL for navigation, you don’t need the apostrophes here.

/sap/bc/ui5_ui5/sap/ui5_ca_all_apv/index.html?backToHome=true&scenarioId=Z_APPROVE_LEAVE

You should have a new Catalog with Tile:

Tile Display via PFCG Role

When you want the tile to display for the Generic Approval application, you can follow the installation guide (7.3 Configure Launch Settings for Custom Workflows).

The screenshot below shows where the settings are made in transaction PFCG.  Note the Type / Object / Text.

  • In object, ensure the PAGEID= <Your Catalog Name>

Launch Page

You should be able to test the launch of the application now.  You should see your Generic Approval application displayed as a Tile.

  • http://<host>:<port>/sap/bc/ui5_ui5/ui2/launchpage/home.html


You can open the application, but it won’t approve/reject yet as you need to implement the BADI in order to process your workflow task.  If you have approval tasks assigned and the app / OData services are working, you should see the work item count.

BADI Implementation

In order to approve/reject your approval task, you need a plug in point to process the decision keys you’ve configured earlier.

You can use BADI definition:

/IWWRK/BADI_WF_BEFORE_UPD_IB

  • Create your own enhancement implementation and also an implementation class
  • Ensure you enter values for Filter Values STEP_ID and WORKFLOW_ID.  This will ensure the BADI is only executed for your defined workflows and steps.

Sample Code

In the method “/iwwrk/if_wf_wi_before_upd_ib~before_update” you implement code for handling the workflow decision triggered for the Generic Approval application.

Here is some sample code from masayuki.sekihara.  I've added in a couple more things like adding attachments.

 DATA ls_object          TYPE swr_obj_2.
  DATA lv_objtype         TYPE swr_struct-object_typ.
  DATA lv_objkey          TYPE swr_struct-object_key.
  DATA lv_subrc           TYPE sy-subrc.
  DATA lt_container       TYPE TABLE OF swr_cont.
  DATA ls_container_line  TYPE swr_cont.
  DATA formnumber         TYPE swxformabs-formnumber.
  DATA ls_formabs         TYPE swxformabs.
  DATA lt_header          TYPE TABLE OF solisti1.
  DATA lv_return          TYPE swotreturn.
  DATA lt_attachments     TYPE TABLE OF swrsobjid.
  DATA ls_attachment      LIKE LINE OF lt_attachments.
  DATA lt_messages        TYPE TABLE OF swr_messag.
  DATA ls_comments_line   LIKE LINE OF it_wf_container_tab.
  DATA ls_attachment_hdr  TYPE swr_att_header.
  DATA lv_notes           TYPE string.
**********************************************************************
* ATTACH NOTES AS SOFM DOCUMENT
**********************************************************************
  READ TABLE it_wf_container_tab INTO ls_comments_line WITH KEY element = 'ACTION_COMMENTS'.
  IF sy-subrc = 0.
    MOVE ls_comments_line-value TO lv_notes.
ls_attachment_hdr-file_extension = '.htm'.
ls_attachment_hdr-file_type      = 'T'.
    ls_attachment_hdr-language       = 'EN'.
ls_attachment_hdr-file_name      = 'Approver Comments'.
    CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
      EXPORTING
workitem_id    = is_wi_details-wi_id
att_header     = ls_attachment_hdr
        att_txt        = lv_notes
        document_owner = sy-uname
        language       = sy-langu
        do_commit      = 'X'
      IMPORTING
return_code    = lv_subrc
      TABLES
message_lines  = lt_messages.
  ENDIF.
  "Read the workflow's container data
  CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
    EXPORTING
      workitem_id      = is_wi_details-wi_id
    IMPORTING
      return_code      = lv_subrc
    TABLES
      simple_container = lt_container.
  " Check which decision was selected and set the data
  " values appropriately
  CASE iv_decision_key.
    WHEN 0001. "Approved
ls_container_line-value = 'A'.
ls_formabs-procstate = 'A'.
    WHEN 0002. "Rejected
ls_container_line-value = 'R'.
      ls_formabs-procstate = 'R'.
  ENDCASE.
  "ACTUALSTATE is what the workflow keys off to determine
  "which path to follow - Approve or Reject path
ls_container_line-element = 'ACTUALSTATE'.
*  "Modify the workflow's container data - we are updating the row that
*  "holds ACTUALSTATE which will be in the second row of the table
  MODIFY lt_container  FROM ls_container_line TRANSPORTING value WHERE element = 'ACTUALSTATE'.
ls_container_line-element = 'USAPPROVER'.
  CONCATENATE 'US' sy-uname INTO ls_container_line-value.
  MODIFY lt_container  FROM ls_container_line TRANSPORTING value WHERE element = 'USAPPROVER'.
**********************************************************************
* WRITE CONTAINER AND COMMIT CHANGES
**********************************************************************
  "Write the updated container back to the workflow engine
  CALL FUNCTION 'SAP_WAPI_WRITE_CONTAINER'
    EXPORTING
      workitem_id      = is_wi_details-wi_id
      do_commit        = 'X'
    IMPORTING
      return_code      = lv_subrc
    TABLES
      simple_container = lt_container.
  IF sy-subrc NE 0.
    "Handle error
  ENDIF.
  "Complete the task
  CALL FUNCTION 'SAP_WAPI_WORKITEM_COMPLETE'
    EXPORTING
      workitem_id = is_wi_details-wi_id.
  "This task requires a confirm to be fully completed
  "and start the next step in the workflow
  CALL FUNCTION 'SAP_WAPI_WORKITEM_CONFIRM'
    EXPORTING
      workitem_id = is_wi_details-wi_id.

Adding Rejection / Approval Comments

When you approve / reject the workflow item, Fiori pops up a screen to allow the user to enter comments.

I couldn’t work out where this was possible to capture for the generic scenario so we used the function 'SAP_WAPI_ATTACHMENT_ADD'.  You can extract the comments from the passed in container with element 'ACTION_COMMENTS'.


The one thing I noticed here, the attachments are created successfully.  What you should see in the Fiori application on the approval page is a purple Icon:

Sometimes the notes are created and the purple Icon displays.  Other times the notes are created and the “paperclip” is show ( a link to a .html document ).

I’m still baffled by this and need to look into it further.  If anyone has the answer, please post it in response to this blog.

Results

You should now be able to approve/reject a workflow task.  When you open your Tile, you’ll see the items waiting to be approved on the left, and some basic details and information on the right.

You’ll see there are few screen elements here worthy of explanation:

  • Title “Process leave request for …” is from the title of the work item task
  • Description, as the name suggest, is the description you have defined in the workflow task
  • SAP WORKFLOW user.  This is the technical name of the workflow batch user.  This appears here when the item is first generated and pulled into the Fiori application.  I’m still working on figuring out how / why this happens.  After you approve / reject the item, the correct name appears instead.

Final Thoughts

I hope this blog helps you during the implementation of the Generic Approval application in Fiori.  I know I haven’t covered a bunch of details here however these should be in the installation and configuration guides.

The biggest challenge we faced was installing all the of the SAP Notes correctly which would make for a good blog for someone else.

Again, the usual suspects need to be checked, SICF and security roles and configuration errors that caused us grief during testing. 

I hope some of the sanity checks help you because I had to trawl through all of this for hours to work out what we had done wrong at some point of our implementation.

Lastly, if you have any feedback on the content in this blog or would like to see more information added, drop me a line.  Share your experiences with the Generic Approval application so we can build on our collective experience

Follow up Blogs

Here are some interesting topics I'd like to blog about next, unless someone else in the community wants to tackle them as well:

  • Using the Generic Approval application in a Non-SAP environment
  • Using the Generic Approval application with another software version /IWPGW/BPM for example
  • Deep Dive into the Task Gateway Service

Questions

I'm going to have a look at answering the following questions which I raised while putting the blog together:

  • Why does SAP_WAPI_ATTACHMENT_ADD create notes in the task differently, sometimes it appears in Notes, other times as an attachment, what the....

39 Comments
masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Nice blog. The app is called "SAP Fiori Approve Requests" which can handle activity type tasks. Event type outcome and multiple decision options are also supported.

Former Member
0 Kudos

Hi,

Quite a helpful blog.

Wanted to know if you could figure out the  mystery behind

"Why does SAP_WAPI_ATTACHMENT_ADD create notes in the task differently, sometimes it appears in Notes, other times as an attachment, ".

Regards,

MB

leigh_mason
Employee
Employee
0 Kudos

Hi Meghna,

No, not yet.  I need to experiment with it a little more.  It's really weird, when I was testing, I'd get random results.  I want to figure out why because the approver comments are supposed to appear under that nice little purple message icon.

Now that Masa has responded I'm going to install those notes and determine the outcome and post the results here..  Those notes look quite new.

Thanks for the comment,

Leigh

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please make sure you have applied mandatory notes for Fiori.

1805986Additional parameter for SAP_WAPI_ATTACHMENT_ADD
1858874Additional parameter for SAP_WAPI_ATTACHMENT_ADD (2)

Regards,

Masa

SAP Rapid Innovation Group - RIG

HemendraS
Participant
0 Kudos

Thank you so much, it is very helpful blog, bookmarked it.

Warm Regards

Hemendra

Murali_Shanmu
Active Contributor
0 Kudos

Nice blog on "SAP Fiori Approve Requests" :smile:

Former Member
0 Kudos

Hi, very useful guide.

We are having problems with the PO Approval app because we don't see the 'Scenario Definition' IMG Activity...

We have a central hub deployment with NW7.4 for the Gateway system with IW_PGW installed (Timesheet app working), but in SPRO we only have the option "Registration" under SAP NetWeaver->Gateway Service Enablement->Content->Task Gateway Service->Scenario Definition!! But not 'Scenario Definition'


Any ideas? Is there some component missing or just the shortcut at the IMG guie? Can anyone share the T-Code for the 'Scenario Definition' activity?

Thank you!

leigh_mason
Employee
Employee
0 Kudos

Hi Alejandro,

in NW7.4 your Gateway components came pre-bundled.  There is a slightly different way to configure this stuff now.

You use the transaction LPD_CUST to configure your Fiori Launch Page.  You then configure the tiles via another URL:

https://<server><port>/sap/bc/ui5_ui5/sap/ARSRVC_UPB_ADMN/main.html?scope=<CUST/CONF>

Cheers

Leigh

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Scenario definition should be maintained in Gateway server, not in ERP.

leigh_mason
Employee
Employee
0 Kudos

Hi again Alejandro,

Just to further Masa-san's comments, on your Gateway system, is there the IW_PGW component installed?

Another colleague and I were just encountered the same problem on of our internal systems, we noticed it's NW7.4 embedded in ERP with no IW_PGW, therefore we cannot see the scenario definition IMG activity.

Former Member
0 Kudos

Hi Leigh, Masa, thank you for the answers.

Yes of course the Gateway system is the one on 7.4 and with IW_PGW installed.

My only doubt with respect to that is that our SP level for IW_PGW is 0 (we have the SARs for SP02 and SP03, but our K-10001INIWPGW.SAR is corrupted and with our SAPRouter down we cannot download it again.

Is the IMG activity included in SP01 02 or 03? I have installed all the notes contained in SP01 but SAP doesn't let me install notes for SP02 and SP03 because we are still on SP00..

Can you help?

Thank you!

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

SP00 is the root cause. Please install SP05.

Former Member
0 Kudos

Correct, thank you Masa

0 Kudos

Hello guys,

I'm running into the same problem as Alejandro, missing cusimizing options. The system I'm using is an SAP system that I set up via SAP HANA Enterprise Cloud  / Cloud Appliance Library (Demo Appliance Landscape for the OpenSAP course 'Introduction to SAP Fiori UX'). There the component IW_PGW is completely missing.

Does anybody have expererience with these CAL-systems? I don't think we have a separate Gateway-server to maintain the Workflow Scenario's.

What would you recommend? Install the Service Packs on the system...if that's possible?

I have also asked the teachers from the course, but found this blog and thought I might ask it here too.

Allright, thanks for any advice!

Kind regards,


Erik

0 Kudos

Hello,

Does each WF task have to be defined for it to show up in approve all or can it be generically defined for all WF tasks?

thanks

chuck

0 Kudos

Hi Chuck,

Each task (TS......) has to be defined seperately. If you are using the standard User Decision task in several workflow, you only need to define that.

Regards,

Erik

0 Kudos

Thank Erik!  Appreciate the answer.  It's too bad the tasks be wildcarded but I understand that's how it works.  thanks again, chuck

Former Member
0 Kudos

Hi Erik, When I give the task definition id, can I give more than one task id? So that I can get an app consisting a set of desired different (say leave approval, travel approval) approvals all in one place?

0 Kudos

Hoi Suneetha,

I have no further experience yet then the SAP training and playing around with it there, but what I've seen so far is that what you're proposing IS possible. Maybe you can better post a seperate question for this, so more experienced developers can confirm this.

Another aspect that you have to take into account is that the 'SAP Fiori way of thinking' is also sometimes a bit different. For each type of task/functionality, you have to create a separate tile in your Launchpad. However the concept of an Inbox with all workflow approvals can be implemented using the Approve Request app.

Kind regards,


Erik

0 Kudos

for me is always showing this error at the app



This XML file does not appear to have any style information associated with it. The document tree is shown below.




<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<code>/IWFND/CM_COS/052</code>

<message xml:lang="pt">

Implementação provedor de dados 'ZTM_TGW_SVC_MODEL_0001_BE' '01' '/IWPGW/BWF' não existente

</message>

<innererror>

<transactionid>54859AFD60E6CE01E10000000A010432</transactionid>

<timestamp>20141219110155.6359810</timestamp>

<Error_Resolution>

<SAP_Transaction>

Run transaction /IWFND/ERROR_LOG on SAP NW Gateway hub system and search for entries with the timestamp above for more details

</SAP_Transaction>

<SAP_Note>

See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)

</SAP_Note>

</Error_Resolution>

<errordetails/>

</innererror>

</error>

vicenteveiga
Participant
0 Kudos

Thank you for this wonderful blog!

I have a question about the "/iwwrk/if_wf_wi_before_upd_ib~before_update" Badi definition: Is there a way to avoid the duplicate note attachment? In the standard Fiori Approve Requests app, after the approve/reject option selected and after filling the "Add note" pop-up, an attachment is added to the workitem. This is the generic behavior.

Now, if I add the abap code from the blog using the 'SAP_WAPI_ATTACHMENT_ADD'  two notes from the same approver will be displayed (the note from the generic app and the one added in this Badi) like the image in the "Adding Rejection / Approval Comments" section of this blog.


The purpose for modifying the original note is to differentiate the Fiori approve/reject notes from the SAP GUI approve/reject notes.


Thank you in advance for your responses.


Best regards,


Vicente

leigh_mason
Employee
Employee
0 Kudos

Hello Vicente, this is a good question.  When I wrote this blog, it was during the Wave 1 Approve Requests app.

Since that time there should have been various improvements and bug corrections that may have corrected this?  If I have read your statement correctly:

"Now, if I add the abap code from the blog using the 'SAP_WAPI_ATTACHMENT_ADD'  two notes from the same approver will be displayed (the note from the generic app and the one added in this Badi)"

Are you saying the standard Fiori app Approve Requests is adding the note correctly from the UI side, and the BADI is duplicating the same note?  If so, problem may have been fixed if you're using a later version than I was.  Maybe you don't need to manage it in the BADI?

Or is your requirement to retrieve the current note, modify it and then update it into the workflow container?

On a side note:  are you using the new Fiori Launchpad as of Wave2 apps? i.e. based on this SCN document:

http://scn.sap.com/docs/DOC-53178

Cheers

Leigh

vicenteveiga
Participant
0 Kudos

Hello Leigh, thank you for your reply.

My requirement is exactly like you wrote:

"Or is your requirement to retrieve the current note, modify it and then update it into the workflow container?"


And yes, I'm saying that the standard Approve Requests Fiori app is adding the note correctly from the UI side. I'm using the new Fiori Launchpad as of Wave2 apps.


The problem is that it's not possible to modify the note comment that exists in the it_wf_container_tab (I get an error "The it_wf_container_tab cannot be modifyed") as a value of ACTION_COMMENTS element and I could not find a way for the original comment to be discarded.


Since that even after calling 'SAP_WAPI_WORKITEM_COMPLETE' function the SOFM document created for the standard comment isn't yet available, in this Badi there's nothing much I can do to retrieve the original comment. And there is no "after update" Badi in Approve Requests Extensibility.


My goal is to try to find a way to inhibit the Fiori framework to apply the note.


Best regards,


Vicente

kammaje_cis
Active Contributor
0 Kudos

Adding something not directly related to, but might be relevant.

Starting Jan-2015, there is a new app called "My Inbox", which seem to be a newer version of the "Approve Requests". You may be better off doing your investigation on the new app, to safeguard your effort.

Regards

Krishna

vicenteveiga
Participant
0 Kudos

Hi Krishna,

Thank you for the info. Didn't know that this new app was out.

I can see it has some extra extensibility options at the UI5 layer level that can be useful for future implementations.

Best regards,

Vicente

leigh_mason
Employee
Employee
0 Kudos

Get your gloves on, may be time for some jiggery pokery with the OData Service.

There is obviously an oData service the Fiori app calls.  If this functionality is essential you can always consider a gateway service enhancement and point your Fiori app to the enhanced oData service ( i.e. Fiori extension project in Eclipse, modify your component.js with custom oData service ).

This way you would have complete control over the data being passed from Fiori->oData and subsequently the backend.

If you're handy with Chrome dev tools and /IWFND/TRACES on Gateway, trace the oData calls and try and find the oData service being called that passes the notes value, then you can pin point the oData implementation that creates the notes.

Let me know if you have any success with this, if not I might try and find it myself on an internal SAP system somewhere for you.

cheers

Leigh

vicenteveiga
Participant
0 Kudos

Hi Leigh,

Thank you very much for your suggestions.

I managed a way to inhibit the Fiori comment to be discarded.


We've added to the workflow a flag "is_fiori" to identify the approvals from Fiori and after some debug of the standard workitem creation process, I've concluded that in the "ADD_COMMENTS_AS_ATTACHMENTS" and "WAPI_WRITE_CONTAINER" methods of the class interface "/IWWRK/CL_WF_UPDATE_WORKITEM", with an enhancement in both methods where the implementation is basically if the "is_fiori" flag is set, the original comment should not be submitted. In other words, the code for submitting the SOFM document with the unformatted comment, is not executed if its been submitted by Fiori.


I'm sure this is probably not the best solution/fix, but does the work! Perhaps the best way was through OData Service but for now will do the trick.

Thank you again for all the help.


King regards,


Vicente

0 Kudos

Excellent blog.

But I have a doubt.


When I try to include the ZLEAVEAPPROVAL_0001 (Service Doc.Identifier), the error occurs "The Entry ZLEAVEAPPROVAL_0001 does not exist in / IWFND / I_MED_SRH (check entry)."


So I need to implement the model with Model Class GW, GW Runtime API Class and Class in the backend ECC?


Best Regards.
Greetings.

Former Member
0 Kudos

Hello,

has anybody please information to the topic "Using the Generic Approval application in a Non-SAP environment". Did someone start this blog already?

I need some guide or instruction for connecting e.g. sharepoint workflows to the generic approval app.

thank you

br

Wolfgang

rahul_yedapally
Active Participant
0 Kudos

Hello

Can we go head with same steps for PO Approval APP


IMG config Gateway + ECC


Please let me know


Thanks,

Rahul

Former Member
0 Kudos

Hi Leigh,

Question, does the current FIORI My Inbox application support collective approvals?

what I mean is the manager should be able to select multiple employees and approve time sheets at the same time. is that some thing possible with standard?

Thanks

Krish

vicenteveiga
Participant
0 Kudos

Hi Krish,

Have you tested the My Inbox Fiori app? You can do it in SapFioriTrial site and take your conclusions. Hope it helps you!

Regards,

Vicente

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes it does. That is supported in standard Fiori My Inbox. Process is as follows:

1. Filter on Task Type

2. Press the multiselect icon RH top of the master list

3. Select the tasks you want to process  (there is a Select All option as well)

4. Press the button in the master list footer representing the action you want to perform

5. Add a comment if desired (or if the action has it marked as mandatory)

Pre-requisites are:

  • Multi action buttons are defined in the task gateway configuration as decision options for the specific workflow/step
  • If the task is a user decision no further work is needed
  • If the task is NOT a user decision, BADI /IWWRK/ES_WF_WI_BEFORE_UPD_IB must be implemented with the code to perform the action on each selected work item

Done. Dusted. Not very hard.

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Fiori My Inbox is essentially Approve Requests upgraded with a lot more functionality and flexibility .. so yes if you are looking for a standard app please check out Fiori My Inbox first.

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Folks please note this was written a while back... the current app to use is Fiori My Inbox

Leigh was working on the earlier Fiori Approve Requests which My Inbox replaces.

It's great work by people like Leigh that have made My Inbox better and easier to use.

Also if you are interested in this topic there is now a collaboration document where all Fiori My Inbox blogs are centralized here: SAP Fiori - My Inbox

0 Kudos

Hi, good tutorial.

There is one thing here though that I don´t understand. What is the relation between the TASKPROCESSING service and the LEAVEAPPROVAL? Why do you have to activate the LEAVEAPPROVAL service? How do they get connected? I would have thought that just configuring the TASKPROCESSING would have been enough.

What if you have a custom WF, there is no service to activate for that in that case. Would it work for such scenario or is tehre something else that should be created/configured?

Thanks,

Leandro

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Leandro, this blog is 2 years old and both the task processing service and the leave approval service have changed significantly in that time.  Also the author may have moved on to a different role, different company, ...

Please raise your questions as a discussion in the Fiori forum - or where you have specific workflow questions in the Business Workflow forum - referencing the original blog by inserting a link to it.  That way you are more likely to get a response from someone on the forum explaining the how this works currently.

Also you may like to look at this collaborative blog on how the inbox/approval works these days... SAP Fiori - My Inbox

From personal experience I can tell you that Fiori My Inbox handles custom workflows just fine out of the box... and you might want to take it to the next level using the Extensibility cookbook.

Rgds,

Jocelyn

former_member210252
Contributor
0 Kudos
Hi,

The Importing Parameter IT_APPL_CONTAINER_TAB TYPE /IWWRK/TT_APPL_CONTAINER

Application Container Elements Table in my implementation is empty.

I am using SAP_WAPI_READ_CONTAINER to get the container elements. But what should be

passed to _WF_ACTUAL_AGENT and AGENT etc. of the container.

My functionality is for Approve or Reject of Shopping Cart from My Inbox App.

 

 

Regards,

Rafi

 
Former Member
0 Kudos
If you want to boost performance of your computer in windows 10 then do one things just   restart your computer  this may brings you for it.