cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulating datasource while launching Chart

Former Member
0 Kudos

Hello ,

I have a req where I have 3 tabs in a report, and Time dimension as selection for all the charts in 3 tabs.

AccountActualBusget
20110045000004600000
25100456789654678

In one of the tabs I have

Tab1Tab2Tab 3
RevenueOverallCapital

Each tab has a chart. While doing data binding in Time Property,Target data sources, I gave 3 charts. Therefore when I select any time it effects all charts. This works fine.

now I wan to manipulate my chart in such a way that, if I select August in time dim..it shld only Pass Actual until August and from August everything should be Budget. So I need to somehow know the values selected, I tried OnApply events on Time dimension. I need to some how pass these to only restrict to Actual.

Any help please;

Regards,

Krishna

Accepted Solutions (0)

Answers (3)

Answers (3)

kohesco
Active Contributor
0 Kudos

Hi,

Is it based on a bex report, I think best way is to create a rcombination with a resticted keyfigure and calculated KF, with the variable (selection) in it.

When you fill the variable on runtime, it wil show the correct numbers directly.  Data manipulation is not well suported in DS.

Grtz

Koen

Former Member
0 Kudos

Thanks for the pointer. My intention is to get out of Bex..That looks so native..Being new tools like DS and Lumira, I intend to write manipulate something in here.

I believe there sould be some way to manipulate with API functionality. This is much intuitive to use than Bex.

Its unfortunate there are still no How to do guides etc...available yet for DS..

kohesco
Active Contributor
0 Kudos

Hi,

I understand you, I did a POC for DS one on bex/bw and one Hana.  On hana it was far more difficult to accomplish the same, because the query designer is still a strong tool to have between back and front end.

I read that it was possible to use lumira between hana and ds, but then still you have the "extra layer"

Former Member
0 Kudos

Hello.

Exactly. I know. we are also doing POC, when SAP releases atleast 2 versions DS from 1.1 to 1.3 (we are using 1.3) I assume they would be mature as a product to the customers. SAP is having a stack of tools for reporting. All one needs is to reduce the systems in stack and have a uniform look and feel. The more tools you have in the stack, the more work for maintenance e.g. Heirarchy authorization that we configure in RSECADMIN, how to handle the same in all these layers..

Anyway someone in SAP notices and gets a solution, its a hope.

Yeah I have that in mind as a last resort to try and deal in Bex.

Regards,

Krishna

Karol-K
Advisor
Advisor
0 Kudos

ok, then have you tried to use the method:

String DATA_SOURCE.getFilterExt(dimension)

this brings you the selection as string, but you need to parse it.

possibly, you will need a fourth data source which you can bind to the filter dialog and then try to make following script:

String selection = DS_4.getFilterExt("DATE");

// here you have to parse the selection, you can use the script to check the value:

APPLICATION.createErrorMessage("Selection : " + selection);

// and then you can modify and pass to your other data sources:

DS_1.setFilterExt(newSelection);

Former Member
0 Kudos

Hello. I managed to get those things into a string variable.

Can I see those selected values in debugging. How can I pass those values into the Datasource for Chart.

STR is a string global variable..REVCY_EXP is the datasource for chart and TEST is the datasource for dimension filter field.

Idea is to capture selected values into STR and pass them to the Chart as the source.

STR = TEST.getFilterExt("/CPMB/NDD9Q3V");

REVCY_EXP.setFilterExt("/CPMB/NDD9Q3V", STR); it shows error...

Please help.

Regards,

Krishna

Former Member
0 Kudos

Any help on this issue please. Any tips on how to put break points and check my code step by step..

Any tips on how can I use API's correctly..any sample how to do guides etc ??

Regards,

Krishna

Karol-K
Advisor
Advisor
0 Kudos

first, what is the error message?

and how this sting STR looks like?

Former Member
0 Kudos

Hello -

I did add that statement and it returned me the following

  • VALUE :1415.APR; 1415.MAY; 1415.JUN.
  • This is exactly what I want to pass (I selected these 3 time periods in the Time dim) to the chart.
  • For passing the above values in the STR variable, I am using this in the Data binding area DataSelection : {"/CPMB/NDD9Q3V": +STR } Does it replace STR variable with all these values ?
  • I want to know how I can pass the STR variable into the chart.DataSelection : {"/CPMB/NDD9Q3V": +STR } does not work. It gives error. I tried without + sign as well.Thanks for the pointer.
  • This is where I am stuck at the moment.
  • I also tried with REVCY_EXP.setFilterExt("/CPMB/NDD9Q3V", STR); but still could not make the chart appear.


Thanks.

Karol-K
Advisor
Advisor
0 Kudos

hi, try to reimplement script from my blog...

Former Member
0 Kudos

Hello Karol,

Can something like the following be possible.

e.g. we have March April May in horizontal axis and are linked to DimensionFilter type time dim. If you select March April in the time Dim..

The corresponding chard should show the Amounts for March and April but should also show May with Null value. Now for me I am getting only 2 values if I hard code but or getting all 3 months with Amounts..

Hope I am clear with what I need. Its some simple setting I believe...

Can you help.

Regards,

Krishna

Karol-K
Advisor
Advisor
0 Kudos

Hi Krishna,

is it possible for you to make some screenshots and attach the application, you have defined?

if you select only 2 values in dimension filter - why are you expecting 3? the may is not selected then, correct?

Karol

Former Member
0 Kudos

Hi Karol,

I have 2 pages below. the chart on page one has a default Datasource driven by the cross tab..

Once we select the say April May in time dimension the chart should still show all the the months still in the axis but only with selected months with values for that month.

If you select April May in the time dimension, we should show all months but values only for April and May...

Here I wrote a small piece of code to pass to chart ...

CHART_14.setDataSelection( {"/CPMB/NDD9Q3V": ["1415.APR", "1415.MAY"] } ).

this shows only April and May..if I want to show all I can give all the months but I want to pass zero values so that it has blank value for that month which is not selected in the time dim...

Please help.

Regards,

Krishna

Karol-K
Advisor
Advisor
0 Kudos

Hi,

I hope I understand now.

you would like to just visualize the selection which was done, but not restrict the data set.. and in addition put the not selected values on "0"...

ok, with data bound components this is not duable on the data side - setDataSelection is restricting the result set only.

I am not sure if this would be possible by changing CSS styles for the Chart Bars (manipulating only the visualization based on the selection).

but on quick, I am afraid I will not have any good answer for you.

Karol

Former Member
0 Kudos

Thanks Karol anyway..exactly that is what I wanted. Yes I may need to take help of CSS..

Need to explore that side of the coding..I will search but if you can say any pointers..please let me know.

Kind Regards,

Krishna

Karol-K
Advisor
Advisor
0 Kudos

Hi,

do I understand you correctly?

you want to filter on 3 data sources (bound to 3 charts), BUT when filtered (onApply event) you want to make additional sub-filtering to distinguish Actuals (<= today) and Budget (> today)?

if this is correct, you have to check what date is today and then rework the filters. for the date manipulation you can use

then, on every data source you can apply script "DS_X.setFilter(...);"

Of course some additional scripts will be required to calculate the correct filters per data source.

if it is not correct, you would need to describe more details and make some screen shots.

Regards, Karol

Former Member
0 Kudos

Hello,

you almost got what I wanted. Its not on date but on a Period, Quarter, Year etc. which are BPC time dimensions which is a Dimension Filter property.

So Its a Heirarchy which is assigned to a field in the report. User can select one month / Period etc. I want to capture what is selected e.g if more than one month is selected, and then Pass that value as input to the Datasource for the chart in the Data selection area of the data binding..

If it is any clear now. I checked all the API functions which can be used with Dimension Filter property but could not find any function to return the dynamic selected values at runtime.

Regards,

Krishna