cancel
Showing results for 
Search instead for 
Did you mean: 

Input Parameters in Nested Calculation Views

celo_berger
Active Participant
0 Kudos

Hi,

I have a graphical calculation view (CV1) which has an input parameter (IP1).

CV1 is used as a projection in another graphical calculation view (CV2).

When I do a data preview, I was expecting to see IP1 pop up so it would filter the data from CV1 being used in CV2.

Furthermore, CV2 could be used in other calculation views and I wanted IP1 from CV1 to always popup wherever CV1 is used.

Is that not how an input parameter should work? If not, what's the workaround for this?

Many thanks,

Marcelo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marcelo,

When you are consuming CV2 in SCV1, you can pass values to IP2 using Place Holder Syntax; there is no explicit mapping available;

EX: BEGIN

var_out = SELECT FISCPER AS FISCAL_PERIOD
FROM "_SYS_BIC"."XXX.XXX/SCV1"

('PLACEHOLDER' = ('IP2', ':SCV1_IP1'));

END

SCV1_IP1 is the new IP you may created @SCV.

Cheers,

Prasad

celo_berger
Active Participant
0 Kudos

Prasad,

You're the best. Although I didn't use your solution exactly since it didn't initially work , it allowed me to research the right places. I ended up using the code below:

FROM "_SYS_BIC"."PACKAGE/CALC_VIEW_WITH_INPUT_PARAM"

(PLACEHOLDER."$$IP_YEAR$$" => :IP_YEAR1, PLACEHOLDER."$$IP_MONTH$$" => :IP_MONTH1)

IP_YEAR and IP_MONTH are the input parameters from the SOURCE graphical calculation view

IP_YEAR1 and IP_MONTH1 are the input parameters created in the target scripted calculation view.

I get data in my scripted calculation view.

Thank you for all your help!

Marcelo

celo_berger
Active Participant
0 Kudos

Hi Prasad,

I'm back. So we're exposing our calculation views as CDS Views, so we can consume those in multiple visualization tools.

So you showed me how to 'bind' input controls between graphical/scripted calculation views.

In order for me to expose any Calculation View to the application layer, I first create an External View (EV), which is kind of the link between the two worlds (DB and App layers), then I write my DDL Source for my CDS View (CDS) on top of that External View:

CV1 -> SCV1 -> EV -> CDS -> BOBJ Frontend

For BOBJ purposes, a CDS View is automatically an ODP Transient Provider which can be easily consumed.

My question is, do you know if there's a way, just like you showed me, to bind the Input Parameters from the calculation view, all the way through the External View and to the final CDS View?

I haven't declared any parameters in my CDS view and it's throwing an error when I try to consume it in my BOBJ tools. I found this youtube (https://www.youtube.com/watch?v=i6wAkD6_Vsc) video which is pretty good, but it doesn't really tackle the CV1 as a source of a CDS View.

Thank you again!

Marcelo

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marcelo

In CV2 define new IP (IP2),--> Open IP --> chose Manage Mappings;

In the Right Hand Side Pane, you will have CV2 relevant IP2 and in Left hand Side Pane, will have CV1's IP1; map these two.

IP1 -----> IP2

Cheers,

Prasad

celo_berger
Active Participant
0 Kudos

Hi Prasad,

This worked perfectly, thank you!

Now a follow-on question:

I have mapped IP1 to IP2 in CV2 and it's working perfectly.

CV2 is now being consumed in a Scripted Calculation View (SCV1) and I want to pass the value of IP2 to it.

I tried the same method you explained above but I don't have the option of Datasource in Manage Mappings.

Unfortunately I need the scripted view as I'm doing a cumulative sum by Year, Period, Customer Group and finally day, and that was the most efficient way to do it.

Is there a way to do it in a scripted calculation view?

Much appreciated!

Marcelo