on 10-06-2015 12:19 PM
Hi,
I'm extending sales order creation app to send Z order type while placing the order. I extended oData service and it is working fine when Z order type is sent.
I extended SalesOrderReviewCart.controller.js and modified salesOrderCreate function in the extended controller and deployed.
While placing the order, above extended controller is not triggering and order is creating with OR order type.
I didn't find much information on extending / replacing controllers. Can anyone help on this? Thanks in advance.
Component.js
Regards,
Chaitanya.
Hi Chaitanya.,
Make changes by comparing your code with below. Remove Type:XML from controller extension.
Also, check if you have mentioned, standard app name while loading extended bsp's component like below in component.js.
sap.ui.component.load({
name: "cus.sd.salesorder.create",
url: jQuery.sap.getModulePath("cus.sd.salesorder.create.Create_SalesExtension") +
"/../SD_SO_CRE" // provide parent project url
// we use a URL relative to our own component; might be different if
// extension app is deployed with customer namespace
});
Regards,
Bhagyashree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhagyashree,
Here is my Component.js code,
=====================================================================================
jQuery.sap.declare("cus.sd.salesorder.create.SD_SO_CREExtension.Component");
// use the load function for getting the optimized preload file if present
sap.ui.component.load({
name: "cus.sd.salesorder.create",
url: jQuery.sap.getModulePath("cus.sd.salesorder.create.SD_SO_CREExtension") + "/../SD_SO_CRE" // provide parent project url
// we use a URL relative to our own component; might be different if
// extension app is deployed with customer namespace
});
cus.sd.salesorder.create.Component.extend("cus.sd.salesorder.create.SD_SO_CREExtension.Component", {
metadata: {
version : "1.0",
config : {
"sap.ca.i18Nconfigs": {
"bundleName":"cus.sd.salesorder.create.SD_SO_CREExtension.i18n.i18n"
},
"sap.ca.serviceConfigs": [{
name: "SRA017_SALESORDER_CREATE_SRV",
serviceUrl: "/sap/opu/odata/sap/ZSRA017_SALESORDER_CREATE_SRV/",
isDefault: true
}],
},
customizing: {
"sap.ui.viewReplacements": {
"cus.sd.salesorder.create.view.SalesOrderCreatePriceAndAvailabilityCheck": {
viewName: "cus.sd.salesorder.create.SD_SO_CREExtension.view.SalesOrderCreatePriceAndAvailabilityCheckCustom",
type: "XML"
}
},
"sap.ui.viewReplacements": {
"cus.sd.salesorder.create.view.SalesOrderReviewCart": {
viewName: "cus.sd.salesorder.create.SD_SO_CREExtension.view.SalesOrderReviewCartCustom",
type: "XML"
}
},
"sap.ui.controllerExtensions": {
"cus.sd.salesorder.create.view.SalesOrderReviewCart": {
controllerName: "cus.sd.salesorder.create.SD_SO_CREExtension.view.SalesOrderReviewCartCustom",
}
}
}
}
});
=====================================================================================
Regards,
Chaitanya.
What exactly is the problem? Did you deploy extension as BSP? Do you launch the extension BSP app or original?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I extended sales order creation app using eclipse IDE (JUNO), UI5 version 1.20.9.
Changes made in extension app:
============================
salesOrderCreate function has been extended in SalesOrderReviewCart.controller.js to send Z order type from the app. (corresponding oData service has been extended to read this Z order type).
This is working fine (order is creating with Z order type) when app is tested on Tomcat server in eclipse.
Deployed extended application and configured in launchpad. Through launchpad, app is not triggering this Z oData service while placing the order. You can see the console log attached in previous reply where standard oData service is triggering when trying to process through launchpad.
Please let me know if you need any further info. Thanks in advance.
Regards,
Chaitanya.
Hi Chaitaanya,
I have faced the same issue. The file that SAP has generated there is some problem while defining the of the fragement name.
Can you please share the screen shot of the console for better understanding.
Thanks
Nishant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.