Quantcast
Channel: SCN : All Content - SAP for Mobile
Viewing all articles
Browse latest Browse all 6147

Fiori PO Approval Extension Project

$
0
0

Hi All,

I tried creating an extension project for Fiori PO Appoval.I downloaded the standard UI code (mm_po_apv) and created an extension project for the same using the wizard in eclipse.And created the Fiori Extension for the Views.

Fiori_ext1.png

Fiori_ext2.png

I selected the extInformation Extension Point to add purchasing group information which is coming in the enhanced Standard OData for PO Approval.

Fiori_ext3.png

I added the below code in the fragment file created by the wizard.

<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:form="sap.ui.layout.form" xmlns:layout="sap.ui.layout">              <form:FormElement>                 <form:layoutData>               <layout:ResponsiveFlowLayoutData linebreak="true" margin="false">               </layout:ResponsiveFlowLayoutData>           </form:layoutData>                 <form:label>            <Label text="{i18n&gt;view.PurchaseOrder.PurchasingGroupLabel}">            </Label>           </form:label>                 <form:fields>            <Text text="{ZPurchasingGroup}">             <layoutData>              <layout:ResponsiveFlowLayoutData alignItems="End" weight="2">              </layout:ResponsiveFlowLayoutData>             </layoutData>            </Text>           </form:fields>          </form:FormElement></core:FragmentDefinition>

And this is the standard code in the component.js(Since i enhanced the structure for the standard Odata i didint need to change any Odata Service Url calls in the standard application).

jQuery.sap.declare("ui.s2p.mm.purchorder.approve.ZPO_APPROVALExtension.Component");
// use the load function for getting the optimized preload file if present
sap.ui.component.load({  name: "ui.s2p.mm.purchorder.approve",  url: jQuery.sap.getModulePath("ui.s2p.mm.purchorder.approve.ZPO_APPROVALExtension") + "/../MM_PO_APV" // provide parent project url  // we use a URL relative to our own component; might be different if  // extension app is deployed with customer namespace
});
ui.s2p.mm.purchorder.approve.Component.extend("ui.s2p.mm.purchorder.approve.ZPO_APPROVALExtension.Component", {  metadata: {  version : "1.0",  config : {  "sap.ca.i18Nconfigs": {  "bundleName":"ui.s2p.mm.purchorder.approve.ZPO_APPROVALExtension.i18n.i18n"  },  },  customizing: {  "sap.ui.viewExtensions": {  "ui.s2p.mm.purchorder.approve.view.S3": {  "extInformation": {  className: "sap.ui.core.Fragment",  fragmentName: "ui.s2p.mm.purchorder.approve.ZPO_APPROVALExtension.view.extInformationCustom",  type: "XML",  },  },  },  }  }
});

 

And i uploaded the Extension porject back to ECC as a custom BSP application.I conifigured the application in Fiori Old launchpad as a new tile.But when i test the application i gets the following error.


GET https://<ip>:<port>/sap/bc/ui5_ui5/sap/zpo_aprv_extend/Component-preload.js  404 (NOT FOUND)

Output1.PNG

 

error_new.PNG

 

But when i try to open the Component-preload.js for the original MM_PO_APV application in browser,I am able to see the file.

 

componen_preload.PNG

I Tried to test this application in Fiori New Launchpad.But in LPD_CUST while creating a new application in the custom launchpad.The Link Text field is uneditable mode.I cannot save the application settings without providing the Link Text Field.Is this due to some Authorizations missing.

LPD_CUST.PNG

Regards,

Bince Mathew C


Viewing all articles
Browse latest Browse all 6147

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>