sap-fiori

Set the value of a global variable in a function

拟墨画扇 提交于 2020-01-26 03:59:05
问题 I'm currently working on an SAP Fiori app that consumes an OData service. I created a method in my controller fonct that calculates a variable coming from my OData. I want to capture this value and put it in a global variable every time the view is refreshed. I created a global variable like this: var boo1; return Controller.extend("com.controller.Detail", {...}); and I passed boo1 as a parameter in my method fonct inside my onInit method but it is undefined . Here's a snippet of my

Save global attribute value when new session starts

坚强是说给别人听的谎言 提交于 2020-01-16 16:05:28
问题 I have two fields in SAP Fiori App: Template_ID and Offer_ID . I want to choose value in Offer_ID depending on Template_ID field value. For solving this problem I've tried to do this steps: When the user click on Template_ID field in Back-End runs the method: CL_CUAN_CAMPAIGN_DPC->contentset_get_entityset() . This method has returning paramater et_result . In et_result I have the necessary field temp_id . For saving temp_id value I created a global attribute in class ZCL_CUAN_CLASS . ZCL_CUAN

Fire BarcodeScannerButton after View loads

筅森魡賤 提交于 2020-01-06 17:46:23
问题 I have implemented a scanner button on my Fiori/UI5 application. I used sap.ndc.BarcodeScannerButton and created that button on the controller (I cannot seem to create the button on my view.xml). Anyway, I need to fire this button after the view loads. I have a master-detail application. The scanner button is on the master view ofcourse. First thing I did was call the button itself. But my first problem is that the button does not accept an id as a parameter. It tells me that app cannot

SAPUI5 Data Binding on SimpleForm

感情迁移 提交于 2020-01-04 05:39:09
问题 I am having issues trying to bind data on a simple form. I am using a mock server and have successfully bind data to a list/table My manifest.json looks like this "mock": { "dataSource": "mainService" } My mockdata(UserDetailsSet.json) looks like this [{ "ID_PassNum": "cu001", "Title": "Mr", "Name": "Don", "Surname": "Ownery", "ResType": "SA", "Country": "South Africa" }] My SimpleForm fields looks like this <Label text="Name" /> <Input value="{mock>/UserDetailsSet/0/Name}" /> <Label text=

UsingjQuery.sap.includeScript().then() in HCP Firori Launchpad

被刻印的时光 ゝ 提交于 2019-12-29 09:49:26
问题 I'm trying to include googlemaps in sapui5 jQuery.sap.includeScript({ url: "https://maps.googleapis.com/maps/api/js?key=XXXX", promisify: true }).then(function() { ... } ) This Promise works fine when I run in hanatrial webide, But when I deploy it to hana cloud platform it is not working. The error message it gives me is : InterceptService.js:1 Uncaught (in promise) TypeError: u.indexOf is not a function(…) sap.ushell.cloudServices.interceptor.InterceptService._invokeFilters @

sapui5 pass parameter to value help dialog of smartFilterBar ControlConfiguration

隐身守侯 提交于 2019-12-25 08:58:39
问题 I have SmartFilterBar on my page based on oData service. One of filterable fields has value help dialog. When value help dialog opened i need to fill one of search parameters in this value help dialog. How can i do this? I can't get value help dialog by control because "byId() method" i don't now id of created dialog. 回答1: I found the solution: how can I get id of opened valuehelpdialog: In the event "onValueHelpRequest" of I redigine "onAfterRendering" method of class "sap.ui.comp

Fiori Launchpad HCP launch shell plugin before create component

我怕爱的太早我们不能终老 提交于 2019-12-25 08:41:32
问题 Introduction I am running a testshell project as "Shell plugin" in the HANA Cloud Platform Fiori Launchpad . When I visit the Launchpad in the default front page (with all the tiles), the shell plugin is loaded right. My shell plugin modifies some things in the navigation URL's, so I must ensure, that the shell plugin is loaded before the applications ' Component.js is loaded. Problem But, when I start the Fiori Launchpad with a specific intent (for example https://HCP_URL/hrtest#requestleave

How to recover a error message from oData response [SAPUI5]

自古美人都是妖i 提交于 2019-12-24 07:42:16
问题 I had this issue and i searched a lot how to fix it, but i can't find any solution at the moment... well, the issue is the next error message, i can write the error but i need a specific entry of this batch. Error, Messagebox and Batch response. the code showed on the message box: { "message": "HTTP request failed", "headers": { "Content-Type": "application/xml;charset=utf-8", "Content-Length": "1333", "DataServiceVersion": "1.0" }, "statusCode": "400", "statusText": "Bad Request",

Fiori — Cross application navigation; Handling startup parameters?

回眸只為那壹抹淺笑 提交于 2019-12-22 00:10:33
问题 This question is related to: Fiori - Cross Application Navigation http://help.sap.com/saphelp_uiaddon10/helpdata/en/07/9561b716bb4f2f8ae4e47bacbdb86d/content.htm Remove URL params on routing My use case is like this: I have multiple applications that should link to others (deep). Since documentation of cross navigation mention to avoid deep links I decided to use a startup parameter. For example: Application A has a list of some items in the detail view of one item there is a reference to

GCM Error - googleCloudMessaging.register

与世无争的帅哥 提交于 2019-12-21 07:24:33
问题 I have the problem that the android application says. "The application xxxx Sorry stopped" to work with the push notificaction, when performing the debugger that happens when it passes: method 1 InstanceID InstanceId = InstanceID.getInstance (context); token = instanceID.getToken (key_id.toString () GoogleCloudMessaging.INSTANCE_ID_SCOPE); getToken error, method 2 Both an the same mistake if (googleCloudMessaging == null) { googleCloudMessaging = GoogleCloudMessaging.getInstance(context); }