Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8746

Approve Request Fiori app - UI Extensions not working

$
0
0

We have configured the standard Approve Requests app to show Customer Invoice approval and it works fine. And there are 3 requirements I am trying to achieve in our sandbox on top of the Approve Requests (CA_ALL_APV) app.

1. Add a custom UI field in the info tab of the details page.

2. Enable to show the attachment and notes tab (standard app has these 2 not visible)

3. Enable multiple approval(I think i'll start another discussion for this requirement since standard doesn't support mass approval-which is such a negative for this app)

 

After downloading the application and adding it to an SAPUI5 project in eclipse, I made the following changes:

 

For requirement 1, I created  InfoFields.fragment.xml where i have the below code:

<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core">

    <Label  text="Vendor ID"/>

      <Text  text="1234"/>

    <Label  text="Custom Field 2"/>

      <Text text="Custom Text 2"/>

</core:FragmentDefinition>

 

Additionally for requirement 1 along with requirement 2, i created a customizing object under the metadata object with the below code in Component.js:

customizing : {

  "sap.ui.viewModifications": {

  "cross.fnd.approve.requests.view.S3": {

  "ARAttachmentIconTabFilter": {

  "visible": true,

  }

     },

  "cross.fnd.approve.requests.view.S3": {

  "ARNoteIconTabFilter": {

  "visible": true,

     }

  },

  "sap.ui.viewExtensions" : {

  "cross.fnd.approve.requests.view.S3":{

  "CustomerExtensionForInfoTabContent": {

  className: "sap.ui.core.Fragment",

  fragmentName: "cross.fnd.approve.requests.view.InfoFields",

  type : "XML"

  }

   }

  }

  }

  }

After making the changes, I uploaded the WebContent folder of the project back to the backend with the report /UI5/UI5_REPOSITORY_LOAD.

 

I named the new BSP application ZVCA_ALL_APV5.

How i tested? I tested it in 2 ways:

1. From SE80, Right Click and test. This does not load anything. A blank page is shown. The console in the IE developer tools shows no errors.

2. Change the URL in LPD_CUST to point to the new BSP. The run the fiori launchpad. this will show the tile for Approve Requests with the correct number of workitems as 2. But once you click on the tile, an error popup is shown which reads 'Failure - Unable to start App'. The console in IE has an error: "TypeError - Object doesn't support property or method '_createRequestUrl' Approve Requests".

 

I made the changes to Component.js and did not touch Component-dbg.js or Component-preload.js. Do i need to change these 2 files too each time i change Component.js?

 

We are in process to decide if we really want to use Fiori or go with Kony. So I would want to get Fiori working in sandbox with our custom requirement to give it a chance.

@Fiori Gurus: What do you think the problem is? Am i making any silly mistake here?

 

Best Regards,

Varun


Viewing all articles
Browse latest Browse all 8746

Trending Articles