Quantcast
Channel: SCN : All Content - SAP BusinessObjects Design Studio
Viewing all 4216 articles
Browse latest View live

Design Studio 1.4 SDK - What is the correct approach for binding events to script methods for UI5-based components?

$
0
0

Design Studio 1.4 has introduced the concept of binding events to script methods, which allows an SDK component to access the BIAL API.  This is documented towards the end of the article What's Coming in Design Studio 1.4 SDK. In an attempt to apply this new feature to an SDK component based on a UI5 control I'm not getting the desired result so would appreciate any suggestions to resolve the issue.

 

As a way to test the approach, I have simply modified the UI5 Application Header component provided with the SDK Samples so that the logo title of the component is automatically set to the Design Studio application name as determined by a call to the APPLICATION.getInfo().name API method.  However, for some reason, the logo title isn't populated as shown below:

 

ApplicationHeader.png

 

The intended result is that the application name obtained from APPLICATION.getInfo().name should appear next to the SAP logo.

 

 

I have added two properties to the contribution.xml file, as shown below:

 

<property  id="onSetAppName"  title="Set Application Name"  type="ScriptText"    visible="false"/>  <property  id="appName"  title="Application Name"  type="String"    visible="false"/><initialization>  <defaultValue property="LEFT_MARGIN">0</defaultValue>  <defaultValue property="RIGHT_MARGIN">0</defaultValue>  <defaultValue property="WIDTH">auto</defaultValue>  <defaultValue property="HEIGHT">38</defaultValue>  <defaultValue property="displayWelcome">true</defaultValue>  <defaultValue property="onSetAppName">this.setAppInfoName();</defaultValue><initialization>

The onSetAppName event is for invoking the script method this.setAppInfoName() as defined in the default value.  The property appName is intended to store the application name to be populated in the Application Header.

 

I have defined a script method in the contribution.ztl file as follows:

 

/* Sets the value of the invisible property appName to the application name */  @Visibility(private)  void setAppInfoName() {*    this.appName = APPLICATION.getInfo().name;  *}

 

Then I have updated the component.js file as follows:

 

sap.ui.commons.ApplicationHeader.extend("com.sap.sample.ui5.ApplicationHeader", {  metadata : {     properties : {      "appName" : { type : "string", defaultValue : "App Name" }    }  },  getAppName : function() {  return this.getProperty("appName");  },  setAppName : function(v) {  this.setProperty("appName", v);  return this;  },  initDesignStudio: function() {  // Raise the onSetAppName event to execute the script for getting the application name  this.fireDesignStudioEvent("onSetAppName");  // Set the logo text to the appName property filled by the onSetAppName event script  this.setLogoText(this.getAppName());  this.attachLogoff(function() {  this.fireDesignStudioEvent("onLogoff");  });  },  renderer: {}
});

 

In the initDesignStudio function I raise the event onSetAppName which should invoke the setAppInfoName() method in the contribution.ztl file, in turn setting the appName property to the application name.  The LogoText property of the Application Header is then set to the value of the AppName property.

 

So, it all seems to look good in theory but in practice the LogoText of the Application Header component isn't updated with the application name.  I'd appreciate any ideas about what I may have missed.

 

Thanks,

 

Mustafa.


Anyone know how to wrap a text in the cell of the design studio crosstab

$
0
0

Anyone know how to display a full text long description in the cell of the crosstab? I have a very long text description showing in the crosstab cell. however it is not showing the full text. it displays only at a certain length then continue with comma.

 

i was thinking of the wrapping text in the crosstab cell by styling with css code. but it seems like does not work.

 

any idea?

How to rename a measure on a chart's legend?

$
0
0

Hi all,

 

I have a chart where the name of the measures in the legend is a bit long.

I would like to rewrite/rename the legend on that chart.


Is there any way to do it?

Chart axis number format decimals issue in 1.2 (svg properties?)

$
0
0

Hi all

 

As I'm facing an issue with axis number format (see below : no decimals, which is a problem when scale goes from an integer to another only, example 0 to 1 with a several scale marks), I'm wondering how to change their format, and I'd like to have the confirmation that it's not possible to fix it thanks to svg properties... If you have any other solution (other than migrating to 1.3 which I can't plan in the coming months at my current customer), please let me know

 

axis label format.png

 

 

 

thanks in advance

 

best regards

Rémi

Not able to define decimal places for chart Axis

$
0
0

Hi experts,

 

I use a typical Design Studio chart (column combination - dual axis). Axis 1 = key figures with 2 decimals (e.g 0,43, 0,75, ...), Axis 2 = 1 key figure (e.g 93 pieces)

 

 

In the initial view I had define 2 decimals each key figure (of Axis 1).

 

 

Is there a way to define the decimals of Axis values?

DS11.png

 

Thanks in advance!

 

Best regards,

Michael

Problem to create Design Studio Application on NW

$
0
0

Hello,

 

we have problem to create a Design Studio (1.4) application on a NW System. To connect to the BW System in local mode and access the queries work without problem but when we change to NW mode we get the following error:

 

com.sap.ip.bi.zen.ui.internal.editor.LoadException: The application could not be found in the backend. It has probably been deleted since you last worked on it, or you are not authorized any more.

at com.sap.ip.bi.zen.ui.internal.editor.ApplicationEditor.loadResource(ApplicationEditor.java:692)

at com.sap.ip.bi.zen.ui.internal.commands.OpenApplicationHandler$1.run(OpenApplicationHandler.java:62)

at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

at com.sap.ip.bi.zen.ui.internal.commands.OpenApplicationHandler.openApplications(OpenApplicationHandler.java:58)

at com.sap.ip.bi.zen.ui.internal.commands.NewApplicationHandler.openEditor(NewApplicationHandler.java:179)

at com.sap.ip.bi.zen.ui.internal.commands.NewApplicationHandler.execute(NewApplicationHandler.java:81)

at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)

at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)

at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)

at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)

at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)

at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)

at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)

at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)

at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)

at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)

at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:401)

at com.sap.ip.bi.zen.ui.ZenUiPlugin.executeCommand(ZenUiPlugin.java:482)

at com.sap.ip.bi.zen.ui.internal.intro.NewApplicationFromTemplateAction.run(NewApplicationFromTemplateAction.java:14)

at com.sap.ip.bi.zen.ui.internal.intro.Intro$2$1.runInUIThread(Intro.java:544)

at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)

at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)

at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)

at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)

at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)

at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)

at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)

at com.sap.ip.bi.zen.ui.internal.application.ZenApplication.start(ZenApplication.java:37)

at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)

at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

 

The user has SAP_all permission in the BW System. To create application in NW mode works for 2 other systems without problem.

Any idea where the Problem is located (Design Studio, NW BW or NW Java) or how to fix it?

 

Many thanks

Use File upload planning function in design studio

$
0
0

Hi,

 

Can you please let me know if it possible to use the 'File upload' planning function in the Design studio Application?

 

----------------------------------------From Application guide--------------------------------------------------------

●Planning Sequence

In the outline view, you can add an existing planning function or sequence for the selected planning system by choosing Planning ModelsAdd Planning Function... or Add Planning Sequence.... In the Add Planning Function or Add Planning Sequence dialog box, enter the name of an existing planning function or sequence, or alternatively use the Browse... button.

------------------------------------------------------------------------------------------------

 

http://visualbi.com/blogs/design-studio/integrated-planning-with-sap-design-studio/

 

Regards,

Raj.

Apply filter to filter_filterpanel

$
0
0

FILTER_FILTERPANEL is bound at Data Sorce DS1.

 

Is it possible by code to filter between 2 values and to sort descending an dimension in component FILTER_FILTERPANEL before the user view this component?

Thank you


Top 10 Bar Chart with Scroll bar

$
0
0

Hello all and thanks in advance.

 

I'm struggling to find a way to implement a Ranking view of a measure and a dimension. My requeriment is to show the top 10 in a Bar Chart but I have two problems:

 

1. How to filter the results to the top 10? I've trying a lot of different things like sorting the Datasource and save the top 10 in an array for later use this array to filter the datasource with the setFilter script function, but I cannot get the results I want. I'm working with a predefined view with HANA so it is not possible to alter the view, the Top has to be done in Design Studio.

 

2. If I get the top 10 results, how can I activate the scrollbar feature in the bar chart? I have height to only show 5 results but I would like the posibility to show the top 10 results. I have tried with the SDK components available here in the community but nothing fits exactly my requeriment.

 

I would like to obtain something like:

example.png

 

It is possible?

 

Thanks

Excel or CSV Download / Plugin / SDK available for 1.4. ?

$
0
0

Hi,

 

is there an Excel or CSV Download / Plugin / SDK available

for SAP BusinessObjects Design Studio Release 1.4 (Version: 14.0.3)

 

 

ThanXs

 

Martin

Update Data Source while running Application

$
0
0

Hello Everyone

 

I'm just getting familiar with the Design Studio (Vers. 14.0.5)

 

I wanted to update CSS Class and text of a text box according to the value from a data source.

I use the following script:

2015-02-10 16_56_42-Script Editor.png

I'm facing two issues with the script:

 

1) Once I run the application, the data source won't update anymore. As soon as I change something in the values, the running application shows not the updated values, although I'm clicking on the button which triggers this script. The only workaround I know so far is to press F5 to refresh the browser, but this is not the preferred the solution.

 

2) Is there any possibility to convert text to string? In this case I could change the script to a more generic code and use the rtext.setCSSClass(s); directly to the value given by the datasources. (I would like to rename  textboxes to a particular names, on this way I would save a lot of coding since there are many resource members.

 

btw: I'm accessing dimensions from a unx universe.

 

I appreciate any advice!

 

Thanks and best regards

Alex

accessing BEx Properties Pane from DS 1.4

$
0
0

hi,

 

We have conditions and exceptions defined within BEx queries and we are trying to access their properties using Design Studio 1.4.

We would like to create a button that would open the web item and display the CONDITIONS_PROPERTIES or EXCEPTIONS_PROPERTIES, like WAD does ( Properties Pane -  BEx Web Application Designer - SAP Library).

 

Is this possible in DS 1.4?

 

thanks

Dan

Hide/Unhide Component based on Exceptions from Query

$
0
0

Hi,

 

We want to hide / unhide a button in DS based on the result of query that have exceptions, if we get a bad any exception from any element from our result set then we want to hide a button (fyi : button is to call a planning sequence).  Any idea how can we do this.

 

Screenshot below shows we have bad exceptions (in red), so we want to hide a button.

Exceptions_Button.png

Update - Mastering SAP Design Studio with SAP NetWeaver BW

$
0
0

As lately several people have asked when I will update my eBook on SAP Design Studio I thought I will just leave a short notice to everyone that I am planning to update the eBook for the release 1.5 of SAP Design Studio.

 

Release 1.5 is away only a few months, so there is no point in updating the book now for release 1.4 and then update it again for release 1.5 again as it does take a few weeks to update something like a complete book.

 

In the new release I will also include all the new topics such as Global scripting, online composition, enhanced bookmarking, ... and so on.

 

I will also include a chapter on SAP Design Studio with SAP HANA and most important, I am planning to include actual videos into the eBook (offline videos) so that are able to follow along in the video as well.

 

and as I am now with Visual BI, the book will also include a chapter on how you can use our Visual BI Design Studio Extensions.

 

So....

 

- Yes the update is planned for the release 1.5

- No you don't have to pay extra for the update if you own the book already

- No I am not planning to increase the price.

 

I hope that clarifies it and you are all looking forward to the book.

Context menu customization

$
0
0

Hi experts,

 

does anybody know if it is possible to customize the Context Menu technical component (mainly hide some entries) using for example a custom CSS or any other way?

 

Thank you for your support,

 

Christian


Design studio SDK: Text component: translate text and display comments

$
0
0

This blog is written by Arwold Koelewijn (sr SAP BI consultant, Tacstone) and Attila Houtkooper (sr Web Developer, Roughdot websolutions).


Introduction


This component is used to translate descriptions of elements and to display comments in the dashboards, based on a datasource as input.

As of DS1.4 standard functionality is available to do translating. However, this component will remain useful since:

  • The business users are in charge of translating. Changes and additions are easily uploaded into SAP BI;
  • Dashboard comments (up to 2000 characters) are loaded from a source system;

Initially we started of using Design Studio scripting to do the translating.

But since it can occur that several lines of 60 characteristics need to be compounded, it is more efficient to do this in a SDK component. Also, in our environment it turned out to be better for performance as well.


How does it work?

 

For example, the text:

‘There were sufficient opportunities (assignments, activities, interim exams) for my study progress to be tested during the course’

Is delivered by the datasource (DS_TAAL) as:

 

plaatje1.png

 

In the properties of the component, the language (EN) and de key (T142) is set.

 

plaatje2.png

 

The component uses the language (EN) and the key (T142) to retrieve the corresponding data set, and join the rows together in one string.

The dashboard comments are stored in a similar way.

 

The source systems delivers the comments in html format, example:

 

<strong>This course</strong> has been well attended and well reviewed.</br></br>Next year we will improve the course in the following way:<ul> <li>smaller groups in the tutorials</li> <li>new reading material</li></ul>  </br>Further will we…

 

In BW using start- and endroutines this string is cut into pieces of 60 characters.


Example of a dashboard using translated text and comments

Screenprint report.png



The component has been build by Attila Houtkooper, he will shed some light on the scripting of the component in this blog


Building the component


Well, there were a couple of considerations from the get-go.

The component needed to have a simple interface that allowed updates through scripting, such as setting the language automatically. It also needed to be fast; this component is used a lot throughout a single report, so there it can take up only a small footprint in terms of memory usage. Following the best practice of Don’t Repeat Yourself (DRY), the translation data is loaded only once, when the page loads.

 

To accommodate for this the interface of the component became quite simple, there are setters (and for no particular reason also getters) for the following properties: language, phrase (identifier) and data(source).

  • Language; denotes the internal key representing a language, this can be a locale such as “en_US” or “de_DE”, in our implementation simple two letter codes are used, namely “EN” and “NL”.
  • Phrase (identifier); this is the specific phrase identifier that is to be displayed, e.g. “T142”.
  • Data(source); this is where the datasource (DS_TAAL) goes that is described above.

 

When translations are larger than 60 characters, the string gets split up into blocks of 60 characters and within the component it is important to put them together again. The translations are aggregated as follows:

The component will want to look up a translation with a simple 2-dimensional map; the first level being the language and the second being the phrase identifier.

The most interesting logic is where the different parts of a phrase are concatenated together to form a single string. This logic is described in the JavaScript source below:

// It is assumed to be chopped up into chunks of max 60 characters each.
// These chunks are concatenated and stored for displaying.
customComponent_translations = {};
var dimensions = resultSet["dimensions"];

resultSet["axis_rows"].forEach(function(valueIndexRow) {
var languageIndex = valueIndexRow[0];
var languageId = dimensions[0]["members"][languageIndex]["text"];
var phraseIndex = valueIndexRow[1];
var phraseId = dimensions[1]["members"][phraseIndex]["text"];
var chunkIndex = valueIndexRow[3];
var chunkText = dimensions[3]["members"][chunkIndex]["text"];

       // If there are no translations aggregated yet for the language, add a new map.
if (customComponent_translations[languageId] === undefined) {
customComponent_translations[languageId] = {};
}

       // If the phrase (identifier) has not been encountered before, initialize it.
if (customComponent_translations[languageId][phraseId] === undefined) {
customComponent_translations[languageId][phraseId] = "";
}

       customComponent_translations[languageId][phraseId] += chunkText;
});


Two elements of the data source are used; the axis_rows and the dimensions. Looping through the axis_rows, we assume that the data is ordered as follows: languageId, phraseId, chunkText. It is the chunkText that may only be a part of the entire text. Notice that while getting the positions of each of these values an index is skipped. Element 2 contains a serial number of the chunk. We assume the data to be ordered so we do not make use of the index.

Once all important values (languageId, phraseId and chunkText) have been identified, subsequently the language and the phraseId will be initialized if necessary. After that the chunkText is added to the value of the phraseId.


I hope you enjoyed reading about the TranslatedText component, and I look forward to any comments in the section below.


Happy hacking


To conclude


Attila has placed the component in the directory: https://github.com/am-houtkooper/translated-text-design-studio-component

We have not tried to place it in the SDK Development Community yet, maybe later.

Coloring a Traffic Light based on a BEX exception

$
0
0

I've been wrestling with this for a couple of days so wanted to get a sanity check that I'm even approaching it the right way. I've a requirement to color a traffic light green/yellow/red in a UI component based on the value of a BEX exception:

 

TrafficLight.png

The exception works great ... the crosstab in Design Studio shows the correctly colored cells. However, I have been unable to implement this properly using script contributions (ZTL) and the getConditionalFormatValueExt() method. I couldn't identify another method for retrieving the BEX exception value from the object other than using a script like this:

 

DS_1.getConditionalFormatValueExt("00733D6SQ53WODKEN1C53S73O",

 

 

{

  "SBOP2_D05": "KIDS_CARS",

  "0UNIT": "PC",

  "0CURRENCY": "EUR"

}

 

 

);

 

This script works properly but I found that implementing this in my SDK component was a lot harder! I managed to capture the properties in a for loop that iterates over all of the hierarchy node members and I'm generating the correct pieces individually (just a quick excerpt from Chrome developer tools):

 

  1. kfExceptionKey: "00733D6SQ53WODKEN1C53S73O"

  2. conditionalFormatMultiDim: "{"SBOP2_D05":"ALL_CARS","0UNIT":"ST","0CURRENCY":"EUR"}"

I had hoped to call the script contribution function for each member, thus attaching a property d.color that I could use when rendering the component above (just a simple function to return a color based on the number returned by the conditional formatting call):


this.trafficLight = this.getDataSource().getConditionalFormatValueExt(this.getExceptionKF(), this.getConditionalFormatMultiDim());


The problem I have not been able to overcome is that whenever I fire the properties necessary to build the conditional formatting MultiDim parameter, I have to make them available for BIAL usage:


that.firePropertiesChangedAndEvent(["driver1Key", "driver2Key", "currentMember", "conditionalFormatMultiDim"], "setTrafficLight");


As soon as I do that, Design Studio automatically fires off an afterUpdate() function and I get into a nasty recursion loop that I can't escape from!


So my questions are:


1. Is there a better way I should be trying to implement conditional formatting based on a BEX exception in a custom component?

2. Can you think of any ideas to escape my recursion situation?


The only other idea I have at the moment is to somehow build an array of the conditional formatting values in advance and pass that array instead of trying to build it individually for each member after an update. This would require a ton of code refactoring so I wanted to touch base here first.

Dimension filter Data Sorting

$
0
0

I'm showing the TEXT of the object (not key) in the dimension file. I would like the text to be sorted ascending. By default it is being sorted by Key which I'm not showing in the dimension filter. Is there a way to sort the content in the dimension filter? I tried the characteristic sort setting in BEx query. It didn't work. Can CSS do the magic?

 

Thanks,

Milind

Missing concepts behind StringArray in Script Contribution

$
0
0

Hi guys.

 

Suppose I have a custom component, and made an API in order to get ids of boxes that are in my component.

 

I want the designer to be able to parse all the ids I will send him, so in my .ztl file, I've made

 

StringArray getBoxesId() {*     return this.sendBoxesIdToRuntime;
*}

The value returned from sendBoxesIdToRuntime is like so :

 

"["id1","id2",...]"

 

Note the "" encapsulating the [ ] because actually properties can't hold plain javascript array, so it is "stringifyied".

 

In the Dialog Window of Script Text, when calling

 

var value = COMPONENT.getBoxesId();

 

I receive a StringArray (this is why DS is telling why when I hover above value variable), but I'm not able to call split method on it for example, as exepected in the documentation.

 

If I change StringArray to String in the .ztl, then doing a

 

APPLICATION.alert(value);

is showing me the right string (and in this case, DS offers me to call split method on it) :

 

["id1","id2",...]

Any idea why I'm not able to call methods that are supposed to be exposed for StringArray type ?

Is there something more I need to do in my .ztl file ?

 

Thanks.

 

Br,

Vincent

Design Studio 1.4: Use the Online Composition Feature

$
0
0

The online composition feature enables users to create and edit an application at runtime. In this tutorial, you will save fragments of the application, drag the saved fragments from the fragment gallery and drop them into the split cell to create new views, and then share them using a URL at runtime.

Watch this Tutorial

Viewing all 4216 articles
Browse latest View live


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